Here n=5. First the means:
xˉ=52+4+6+8+10=530=6,yˉ=55+7+9+8+11=540=8.
Take dx=x−6 and dy=y−8:
| x | y | dx | dy | dxdy | dx2 | dy2 |
|---|
| 2 | 5 | −4 | −3 | 12 | 16 | 9 |
| 4 | 7 | −2 | −1 | 2 | 4 | 1 |
| 6 | 9 | 0 | 1 | 0 | 0 | 1 |
| 8 | 8 | 2 | 0 | 0 | 4 | 0 |
| 10 | 11 | 4 | 3 | 12 | 16 | 9 |
| Total | | 0 | 0 | 26 | 40 | 20 |
(The checks ∑dx=0, ∑dy=0 confirm the means.) The regression coefficients are
byx=∑dx2∑dxdy=4026=0.65,bxy=∑dy2∑dxdy=2026=1.3.
Both are positive (consistent) and their product 0.65×1.3=0.845≤1 (valid).
Line of Y on X: y−yˉ=byx(x−xˉ)
y−8=0.65(x−6) ⇒ y=0.65x−3.9+8 ⇒ y=0.65x+4.1.
Line of X on Y: x−xˉ=bxy(y−yˉ)
x−6=1.3(y−8) ⇒ x=1.3y−10.4+6 ⇒ x=1.3y−4.4.
Estimates. To estimate y use Y on X: at x=7, y=0.65(7)+4.1=4.55+4.1=8.65. To estimate x use X on Y: at y=10, x=1.3(10)−4.4=13−4.4=8.6.
Independent check (raw totals). ∑x=30, ∑y=40, ∑xy=10+28+54+64+110=266, ∑x2=220, ∑y2=340.
byx=n∑x2−(∑x)2n∑xy−∑x∑y=5(220)−9005(266)−30(40)=1100−9001330−1200=200130=0.65,
bxy=n∑y2−(∑y)2n∑xy−∑x∑y=5(340)−1600130=1700−1600130=100130=1.3.
Both methods agree.
✓Final answer
Line of Y on X: y=0.65x+4.1; line of X on Y: x=1.3y−4.4. Estimated y=8.65 when x=7, and estimated x=8.6 when y=10.