How to compute the slope and intercept coefficients |
| y | x | xy | x² |
| 52 | 2.5 | 130 | 6.25 |
| 56 | 1.0 | 56 | 1.00 |
| 56 | 3.5 | 196 | 12.25 |
| 72 | 3.0 | 216 | 9.00 |
| 72 | 4.5 | 324 | 20.25 |
| 80 | 6.0 | 480 | 36.00 |
| 88 | 5.0 | 440 | 25.00 |
| 92 | 4.0 | 368 | 16.00 |
| 96 | 5.5 | 528 | 30.25 |
| 100 | 7.0 | 700 | 49.00 |
| | | 3438 | 205.00 |
| | | x̅ = | 4.2 |
| | | y̅ = | 76.4 |
| | | ∑xy = | 3438 | 3438 |
| | | ∑x² = | 205 | 205 |
| | | n = | 10 |
| | | b₁ = | (∑xy − nx̅y̅)/(∑x² − nx̅²) |
| | | b₁ = | 8.014 | 8.014 |
| | | b₀ = | y̅ − b₁x̅ |
| | | b₀ = | 42.741 | 42.741 |
Predicted value of y for a given x |
| | x = | 6 |
| | ŷ = | 90.83 |
Prediction error and sum of squared errors (SSE) |
| y | x | ŷ | e = y − ŷ | e² |
| 52 | 2.5 | 62.78 | -10.78 | 116.13 |
| 56 | 1.0 | 50.76 | 5.24 | 27.51 |
| 56 | 3.5 | 70.79 | -14.79 | 218.75 |
| 72 | 3.0 | 66.78 | 5.22 | 27.21 |
| 72 | 4.5 | 78.80 | -6.80 | 46.30 |
| 80 | 6.0 | 90.83 | -10.83 | 117.18 |
| 88 | 5.0 | 82.81 | 5.19 | 26.92 |
| 92 | 4.0 | 74.80 | 17.20 | 295.94 |
| 96 | 5.5 | 86.82 | 9.18 | 84.31 |
| 100 | 7.0 | 98.84 | 1.16 | 1.35 |
| | | | -0.00 | 961.59 |
| | | ∑e = ∑(y − ŷ) = | -0.00 |
| | | SSE = ∑e² = ∑(y − ŷ)² = | 961.59 |
Variance of prediction errors or mean squared error |
| | | var(e) = MSE = | ∑(y − ŷ)²/(n − 2) |
| | | ∑(y − ŷ)² = | 961.59 |
| | | n − 2 = | 8 |
| | | var(e) = MSE = | 120.199 |
Standard error of estimate |
| | | se(e) = | √var(e) = √MSE |
| | | se(e) = | 10.964 | 10.964 |
Compute se(e) when y is measured from a scale of 25. |
| y | x |
| 13 | 2.5 |
| 14 | 1.0 |
| 14 | 3.5 |
| 18 | 3.0 |
| 18 | 4.5 |
| 20 | 6.0 |
| 22 | 5.0 |
| 23 | 4.0 |
| 24 | 5.5 |
| 25 | 7.0 |
| | | se(e) = | 2.741 |
Compute R² |
| | | y̅ = | 76.4 |
| | | b₀ = | 42.741 |
| | | b₁ = | 8.014 |
| y | x | ŷ | (y − y̅)² | (ŷ − y̅)² | (y − ŷ)² |
| 52 | 2.5 | 62.78 | 595.36 | 185.61 | 116.13 |
| 56 | 1.0 | 50.76 | 416.16 | 657.65 | 27.51 |
| 56 | 3.5 | 70.79 | 416.16 | 31.47 | 218.75 |
| 72 | 3.0 | 66.78 | 19.36 | 92.48 | 27.21 |
| 72 | 4.5 | 78.80 | 19.36 | 5.78 | 46.30 |
| 80 | 6.0 | 90.83 | 12.96 | 208.09 | 117.18 |
| 88 | 5.0 | 82.81 | 134.56 | 41.10 | 26.92 |
| 92 | 4.0 | 74.80 | 243.36 | 2.57 | 295.94 |
| 96 | 5.5 | 86.82 | 384.16 | 108.54 | 84.31 |
| 100 | 7.0 | 98.84 | 556.96 | 503.52 | 1.35 |
| | | | 2798.40 | 1836.81 | 961.59 |
| | | | SST = ∑(y − y̅)² = | 2798.40 | 2798.40 |
| | | | SSR = ∑(ŷ − y̅)² = | 1836.81 |
| | | | SSE = ∑(y − ŷ)² = | 961.59 |
| | | | R² = | SSR/SST |
| | | | R² = | 0.6564 | 0.6564 |
Standard error of the slope coefficient | | | | | se(b₁) |
| | | se(b₁) = | se(e)/√∑(x − x̅)² |
| y | x | (x − x̅)² |
| 52 | 2.5 | 2.89 |
| 56 | 1.0 | 10.24 |
| 56 | 3.5 | 0.49 |
| 72 | 3.0 | 1.44 |
| 72 | 4.5 | 0.09 |
| 80 | 6.0 | 3.24 |
| 88 | 5.0 | 0.64 |
| 92 | 4.0 | 0.04 |
| 96 | 5.5 | 1.69 |
| 100 | 7.0 | 7.84 |
| | | 28.6 |
| | | x̅ = | 4.2 |
| | | ∑(x − x̅)² = | 28.6 | 28.6 |
| | | se(e) = | 10.964 | 10.964 |
| | | se(b₁) = | 2.0501 |
Confidence interval for the slope parameter β₁ |
| | | L, U = | b₁ ± tα/2,(n −2) se(b₁) |
| | | b₁ = | 8.014 |
| | | 1 − α = | 0.95 |
| | | α = | 0.05 |
| | | n − 2 = | 8 |
| | | tα/2,(n −2) = | 2.306 |
| | | se(b₁) = | 2.050 |
| | | MOE = tα/2,(n −2) se(b₁) = | 4.727 |
| | | L = b₁ − MOE = | 3.287 |
| | | U = b₁ + MOE = | 12.741 |
Test of hypothesis for the slope parameter β₁ |
| | | H₀: | β₁ = 0 |
| | | H₁: | β₁ ≠ 0 |
| | | TS = | b₁/se(b₁) |
| | | b₁ = | 8.014 |
| | | se(b₁) = | 2.050 |
| | | TS = | 3.909 |
| | | CV = tα/2,(n −2) = | 2.306 |
| Reject H₀: β₁ = 0, if | | TS > | CV |
| | | 3.909 > | 2.306 | Reject H₀ |
| | | p-value = 2 × P(t > TS) = | 0.0045 |
| | | α = | 0.05 |
| Reject H₀: β₁ = 0, if | | p-value < | α |
| | | 0.0045 > | 0.05 | Reject H₀ |