What Is Sxx?
In statistics, Sxx = Σ(x − x̄)² is the sum of squared deviations of x from its mean. It is the numerator of the sample variance and the denominator of the least squares slope. The companion quantities are Syy = Σ(y − ȳ)² and Sxy = Σ(x − x̄)(y − ȳ).
Enter x values, and optionally y values, to get all three sums together with the means, Σx, Σx², Σxy, the slope Sxy/Sxx, the intercept, the correlation r = Sxy/√(Sxx·Syy), SSE and R². A working table shows each deviation so you can follow a hand calculation.
The sections below give the formulas, a variables table, a worked example and answers to common questions about notation and the link to variance.
How to Use the Sxx Calculator
- Enter the x values.
- Optionally enter the y values, in the same order.
- Read Sxx, Syy and Sxy.
- Use the slope, intercept, r and SSE shown below them.
Sxx Formula
Sxx
Sxy
Slope and correlation
Sxx Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| Sxx | Sum of squared deviations of x | Σ(x − x̄)² |
| Syy | Sum of squared deviations of y | |
| Sxy | Sum of cross-products of deviations | |
| b₁ | Regression slope | Sxy ÷ Sxx |
| r | Correlation coefficient | Sxy ÷ √(Sxx Syy) |
Sxx Worked Example
For x = 1, 2, 3, 4: Σx = 10 and Σx² = 30, so Sxx = 30 − 10² ÷ 4 = 5. If y = 2, 4, 5, 8 then Σy = 19, Σxy = 2 + 8 + 15 + 32 = 57, so Sxy = 57 − 10 × 19 ÷ 4 = 9.5. The slope is 9.5 ÷ 5 = 1.9.
With the example values loaded in the calculator above, the steps are:
- Σx = 36, Σx² = 204, n = 8.
- Sxx = Σx² − (Σx)² ÷ n = 204 − 162 = 42.
- Syy = Σy² − (Σy)² ÷ n = 167.795.
- Sxy = Σxy − (Σx)(Σy) ÷ n = 408.8 − 324.9 = 83.9.
- b₁ = Sxy ÷ Sxx = 1.997619; b₀ = ȳ − b₁x̄ = 0.035714286; r = 0.99941947.
Result: Sxx = Σ(x − x̄)² = 42; Syy = Σ(y − ȳ)² = 167.795; Sxy = Σ(x − x̄)(y − ȳ) = 83.9; Slope b₁ = Sxy/Sxx = 1.997619.
Where Sxx Is Used
Hand regression
Checking the building blocks of a least squares line.
Variance by hand
Getting Sxx for a sample variance.
Correlation
Computing r from sums of squares.
Exam practice
Verifying A-level and intro statistics answers.
Common Sxx Mistakes to Avoid
- Use the shortcut formula with Σx² for hand calculation, but beware rounding with large numbers.
- Sxx ≥ 0 always; it is zero only if all x are equal.
- Notation varies: some books write SSxx or Σxx.
Sxx Terms and Definitions
- Corrected sum of squares
- A sum of squared deviations from the mean, such as Sxx.
- Cross-product sum
- Sxy, which is positive when x and y rise together.
Sxx FAQs
What is Sxx in statistics?
The sum of squared deviations of x from its mean, Σ(x − x̄)².
How is Sxx related to variance?
Sample variance equals Sxx divided by n − 1.
What are Sxy and Syy?
Sxy is the sum of cross-products of deviations and Syy the sum of squared deviations of y.
How do I get the regression slope from Sxx?
Slope = Sxy ÷ Sxx, and the intercept is ȳ − slope × x̄.