Sum of Squares — Variance & ANOVA Foundation
SS = Σ(x-x̄)². Compute SS total, between, within. Step-by-step table. Single dataset or multiple groups (ANOVA decomposition).
Why This Statistical Analysis Matters
Why: Sum of squares is the foundation for variance, standard deviation, and ANOVA. SS total = SS between + SS within.
How: Single mode: one dataset, get SS for variance. ANOVA mode: groups separated by semicolons, get SS between/within/total.
- ●SS = Σ(x-x̄)²
- ●Variance = SS/(n-1)
- ●ANOVA decomposition
Sum of Squares — Variance, ANOVA, Regression
Compute SS total, between, within. Step-by-step table. Single dataset or multiple groups (ANOVA decomposition).
Example Presets — Click to Load
Inputs
Step-by-Step Table: xᵢ, x̄, (xᵢ−x̄), (xᵢ−x̄)²
| i | xᵢ | x̄ | (xᵢ−x̄) | (xᵢ−x̄)² |
|---|---|---|---|---|
| 1 | 4.0000 | 6.1000 | -2.1000 | 4.4100 |
| 2 | 8.0000 | 6.1000 | 1.9000 | 3.6100 |
| 3 | 6.0000 | 6.1000 | -0.1000 | 0.0100 |
| 4 | 5.0000 | 6.1000 | -1.1000 | 1.2100 |
| 5 | 3.0000 | 6.1000 | -3.1000 | 9.6100 |
| 6 | 9.0000 | 6.1000 | 2.9000 | 8.4100 |
| 7 | 7.0000 | 6.1000 | 0.9000 | 0.8100 |
| 8 | 6.0000 | 6.1000 | -0.1000 | 0.0100 |
| 9 | 8.0000 | 6.1000 | 1.9000 | 3.6100 |
| 10 | 5.0000 | 6.1000 | -1.1000 | 1.2100 |
| Sum | 32.9000 | |||
Deviation Squares (xᵢ − x̄)²
For educational and informational purposes only. Verify with a qualified professional.
📈 Statistical Insights
SS total = Σ(x-x̄)²
— Definition
SS = Σx² - (Σx)²/N
— Computational
SS total = SS between + SS within
— Decomposition
Key Takeaways
- Total Sum of Squares: SS_total = Σ(xᵢ − x̄_grand)² — measures total variation around the grand mean
- Shortcut formula: SS_total = Σxᵢ² − (Σxᵢ)²/N — computationally efficient
- For single dataset: SS = Σ(xᵢ − x̄)²; Variance = SS/(n−1) for sample, SS/n for population
- ANOVA decomposition: SS_total = SS_between + SS_within — partitions variance into group and error
- Regression: SS_total = SS_regression + SS_residual; R² = SS_reg / SS_total
Did You Know?
How It Works
1. Single Dataset — SS for Variance
Compute mean x̄, then SS = Σ(xᵢ − x̄)². Sample variance = SS/(n−1); population variance = SS/n.
2. Shortcut Formula
SS = Σxᵢ² − (Σxᵢ)²/N. Algebraically equivalent; fewer rounding errors for large datasets.
3. ANOVA Decomposition
SS_between = Σ nⱼ(x̄ⱼ − x̄_grand)²; SS_within = ΣΣ(xᵢⱼ − x̄ⱼ)²; SS_total = SS_between + SS_within.
4. Step-by-Step Table
For each value: xᵢ, x̄, (xᵢ−x̄), (xᵢ−x̄)². Sum the last column to get SS.
5. Regression SS
SS_reg = Σ(ŷᵢ − ȳ)²; SS_res = Σ(yᵢ − ŷᵢ)²; SS_total = SS_reg + SS_res; R² = SS_reg/SS_total.
Expert Tips
Use Shortcut for Large Data
SS = Σx² − (Σx)²/N avoids subtracting mean from each value — fewer rounding errors
Check Decomposition
In ANOVA, SS_total must equal SS_between + SS_within — use this to verify
Sample vs Population
Sample variance divides by n−1 (Bessel correction); population by n
Interpret R²
R² = SS_reg/SS_total — proportion of variance explained by the model
Formulas Reference
SS_total = Σ(xᵢ − x̄_grand)²
Shortcut: SS = Σxᵢ² − (Σxᵢ)²/N
SS_between = Σ nⱼ(x̄ⱼ − x̄_grand)²
SS_within = ΣΣ(xᵢⱼ − x̄ⱼ)²
Variance (sample) = SS / (n − 1)
Variance (population) = SS / n
Frequently Asked Questions
What is the difference between SS and variance?
SS is the raw sum of squared deviations. Variance = SS divided by degrees of freedom (n−1 for sample, n for population).
Why use the shortcut formula?
SS = Σx² − (Σx)²/N is algebraically equivalent but requires one pass through the data and avoids subtracting the mean from each value, reducing rounding errors.
What does SS_between measure in ANOVA?
SS_between measures variation due to group differences (treatment effect). Large SS_between relative to SS_within suggests groups differ.
What does SS_within measure?
SS_within measures random variation within each group (error). It is the sum of squared deviations from each group mean.
How is SS used in regression?
SS_total = Σ(yᵢ−ȳ)²; SS_reg = Σ(ŷᵢ−ȳ)²; SS_res = Σ(yᵢ−ŷᵢ)². R² = SS_reg/SS_total.
Can SS ever be negative?
No. SS is a sum of squares, so each term (xᵢ−x̄)² ≥ 0. SS is always non-negative.
Sum of Squares by the Numbers
Applications
ANOVA
SS decomposition is the first step in one-way ANOVA. MS = SS/df, F = MS_between/MS_within.
Regression
R² and F-tests in regression use SS_reg and SS_res. Goodness of fit depends on SS decomposition.
Quality Control
Variance (from SS) measures process variability. Control charts use SS-based statistics.
Education
Step-by-step SS tables help students understand variance and ANOVA decomposition.
Why Use This Calculator vs Other Tools?
| Feature | This Calculator | Excel | R | Python |
|---|---|---|---|---|
| Step-by-step table | ✅ | ❌ | ❌ | ❌ |
| Single + ANOVA modes | ✅ | ⚠️ Manual | ✅ | ✅ |
| Deviation squares chart | ✅ | ❌ | ⚠️ Manual | ⚠️ Manual |
| ANOVA decomposition chart | ✅ | ❌ | ⚠️ | ⚠️ |
| Educational content | ✅ | ❌ | ❌ | ❌ |
| No software installation | ✅ | ❌ | ❌ | ❌ |
Data Entry Tips
- Single mode: separate values with commas, spaces, tabs, or newlines.
- ANOVA mode: separate groups with semicolons (;). Within each group, use commas or spaces.
- Example ANOVA: "10, 12, 14; 20, 22, 24; 30, 32, 34" — three groups of three values each.
- Non-numeric values are ignored. Paste directly from Excel or CSV.
Official Sources
Disclaimer: This calculator uses standard formulas for sum of squares. For ANOVA, verify assumptions (normality, equal variances). Sample variance uses n−1; population variance uses n.
Related Calculators
Pooled Standard Deviation Calculator
Computes pooled standard deviation from multiple groups/samples. Used in t-tests, ANOVA, and meta-analysis. Summary stats or raw data.
StatisticsVariance Calculator
Comprehensive variance calculator: sample variance, population variance, grouped data, weighted variance, and from summary. Step-by-step computation with...
StatisticsDispersion Calculator
Compute ALL measures of dispersion: Range, IQR, Variance (population & sample), Standard Deviation, MAD, CV, Relative Range, Quartile Deviation. Side-by-side...
StatisticsDescriptive Statistics Calculator
All-in-one: mean, median, mode, range, variance, SD, SEM, CV, skewness, kurtosis, quartiles, IQR, percentiles, min, max, count, sum. The comprehensive...
StatisticsFrequency Polygon Calculator
Create frequency polygons from grouped data. Plots midpoints vs frequencies. Supports overlaying multiple datasets for comparison. Raw data or frequency...
StatisticsMean Absolute Deviation Calculator
Compute MAD = Σ|xᵢ - x̄|/n from data. Compare MAD about the mean vs MAD about the median. See relationship to standard deviation.
Statistics