Home

SStotal

SStotal, or the total sum of squares, is a statistical measure of the overall variability in a data set around the grand mean. It expresses how much the observed values deviate from the mean of all observations combined.

Formally, for a data set with n observations Yi and grand mean Ybar, SStotal is defined as

In the context of one-way analysis of variance (ANOVA) or linear models, SStotal can be decomposed into

Alternative formulations arise when group means and sizes are known. SSbetween can be computed as sum over

Notes: some sources use TSS or SSTotal interchangeably with SStotal, while conventions vary slightly across statistical

SStotal
=
sum
over
i
of
(Yi
−
Ybar)².
It
quantifies
the
total
dispersion
of
the
data
without
regard
to
any
grouping
or
model.
components
that
reflect
different
sources
of
variation.
Specifically,
SStotal
=
SSbetween
+
SSwithin,
where
SSbetween
measures
variation
due
to
differences
among
group
means,
and
SSwithin
measures
variation
within
groups.
The
corresponding
degrees
of
freedom
are
df_total
=
n
−
1,
df_between
=
k
−
1,
and
df_within
=
n
−
k,
with
k
being
the
number
of
groups.
groups
of
n_j
times
(Ybar_j
−
Ybar)²,
and
SSwithin
as
sum
over
groups
and
observations
within
a
group
of
(Yi_j
−
Ybar_j)²,
with
Ybar_j
the
mean
of
group
j.
The
relationship
SST
=
SSbetween
+
SSwithin
is
central
to
common
tests
such
as
the
F-test
in
ANOVA
and
to
the
partitioning
of
variance
in
regression,
where
SST
=
SSR
+
SSE
and
R²
is
SSR/SST.
packages.