Porisma

Worked solution

Fit both regression directions and recover the means

Eight pairs of observations are given below.

xxyy
167
1317
1612
1511
1618
1210
1717
1512

(i) Find the regression line of yy on xx.

(ii) Find the regression line of xx on yy.

(iii) On a scatter diagram, sketch the two regression lines.

Use your answers in (i) and (ii) to find xˉ\bar x and yˉ\bar y.

CJC · Lecture · Example 3

(i) Regress y on x

Answer

y=0.35x+7.75y=0.35x+7.75.

For a small dataset the source gives a home-screen alternative to STAT Edit: enter {16,13,16,15,16,12,17,15} STO→ L1 and {7,17,12,11,18,10,17,12} STO→ L2. Use curly braces, comma-separated values, STO→, then 2nd 1 for L1 or 2nd 2 for L2. Preserve the paired order.

Press STAT → CALC → 8:LinReg(a+bx). Set Xlist=L1, Ylist=L2. Enter Y1 in Store RegEQ using ALPHA TRACE 1, highlight Calculate, then ENTER. Y1 retains this fit for the sketch. The display gives a=7.75a=7.75, b=0.35b=0.35, r2=0.0226851852r^2=0.0226851852 and r=0.150616019r=0.150616019. Here the calculator’s x and y match the question variables: aa is the intercept and bb the gradient.

Independently, Sxx=20S_{xx}=20 and Sxy=7S_{xy}=7 give b=7/20b=7/20 and a=13−(7/20)15=7.75a=13-(7/20)15=7.75.

How did this part go?

(ii) Swap the input and response lists

Answer

x=7108y+1529108≈0.0648y+14.2x=\dfrac{7}{108}y+\dfrac{1529}{108}\approx0.0648y+14.2 (3 s.f.).

Again select STAT → CALC → 8:LinReg(a+bx), but set Xlist=L2, Ylist=L1, highlight Calculate, then ENTER. The calculator’s displayed x now represents the question’s yy and its displayed y represents the question’s xx. Write the result with the original variables in their correct roles.

The printed output is a=14.15740741a=14.15740741, b=0.0648148148b=0.0648148148, with the same r2r^2 and rr. Hence x=0.0648148148y+14.15740741x=0.0648148148y+14.15740741, or the source’s 3-s.f. form x=0.0648y+14.2x=0.0648y+14.2. Independently, d=Sxy/Syy=7/108d=S_{xy}/S_{yy}=7/108 and c=15−(7/108)13=1529/108c=15-(7/108)13=1529/108. Keep the exact or full-precision values for later calculations; do not invert the first fitted line.

How did this part go?

(iii) Plot all pairs and both fitted lines

Answer

The shallow yy-on-xx line and steep xx-on-yy line meet at (15,13)(15,13).

  1. Press 2nd Y= to open STAT PLOTS.
  2. Press ENTER for Plot1; select ON, scatter type, Xlist=L1, Ylist=L2 (the source uses a square marker and blue colour).
  3. Press Y=. Y1 already contains 0.35X+7.750.35X+7.75. To plot the reverse fit on these same axes, make yy the subject and enter it in Y2: Y2=(X−c)/dY2=(X-c)/d. The source screen uses (X−14.15741)/0.064810(X-14.15741)/0.064810; use stored full coefficients or Y2=13+(108/7)(X−15)Y2=13+(108/7)(X-15) to avoid rounding effects.
  4. Press ZOOM → 9:ZoomStat to include all observations and both fits.
  5. Press TRACE, using left/right arrows to see each observation’s coordinates at the screen bottom.

The printed sketch labels observed extrema x=12,17x=12,17 and y=7,18y=7,18, with a cropped lower-left O; this does not mean the plotted corner is the true origin. Its blue caption prints y=0.35+7.75y=0.35+7.75, omitting xx. The earlier equation and calculator screen correctly show y=0.35x+7.75y=0.35x+7.75; the reconstruction uses that equation. Its reverse-line caption is rounded to x=0.0648y+14.2x=0.0648y+14.2, while this plot uses exact coefficients. All eight points are preserved.

How did this part go?

Use the two fitted equations to find the means

Answer

xˉ=15.0\bar x=15.0, yˉ=13.0\bar y=13.0 (3 s.f.).

Both lines pass through (xˉ,yˉ)(\bar x,\bar y). Solve their full-precision equations together:

y=720x+314,x=7108y+1529108.y=\frac7{20}x+\frac{31}4,\qquad x=\frac7{108}y+\frac{1529}{108}.

Substitution gives x=15x=15, then y=13y=13. The source’s calculator intersection procedure is 2nd TRACE → 5:intersect, then ENTER for the first curve, ENTER for the second curve and ENTER for the guess. Its display is approximately (14.999999,12.999999)(14.999999,12.999999), reported as (15.0,13.0)(15.0,13.0) to 3 s.f. Small display errors come from stored rounding, not different means.

The unnumbered final ask specifically requires the regression lines. The source offers two checks when that restriction does not apply: calculate the arithmetic means directly, xˉ=120/8=15\bar x=120/8=15 and yˉ=104/8=13\bar y=104/8=13; or use STAT → CALC → 2:2-Var Stats, Xlist=L1, Ylist=L2, Calculate → ENTER, then scroll through the statistics. The printed totals are ∑x=120\sum x=120, ∑x2=1820\sum x^2=1820, ∑y=104\sum y=104, ∑y2=1460\sum y^2=1460, ∑xy=1567\sum xy=1567, n=8n=8, with sample standard deviations Sx=1.690308509S_x=1.690308509, Sy=3.927922024S_y=3.927922024 and population standard deviations σx=1.58113883\sigma_x=1.58113883, σy=3.674234614\sigma_y=3.674234614. These independently recover the same means.

How did this part go?

Compare your sketch

Expand diagram

Use the scrollbars or arrow keys to inspect details.

All eight exact pairs: (16,7),(13,17),(16,12),(15,11),(16,18),(12,10),(17,17),(15,12). Blue y-on-x line y0.35x+7.75; amber x-on-y line x15+(7/108)(y−13). Both meet at means(15,13). Axes are cropped, not zero origins. The reverse line is plotted using exact coefficients, not the rounded source caption.
All eight exact pairs: (16,7),(13,17),(16,12),(15,11),(16,18),(12,10),(17,17),(15,12). Blue y-on-x line y0.35x+7.75; amber x-on-y line x15+(7/108)(y−13). Both meet at means(15,13). Axes are cropped, not zero origins. The reverse line is plotted using exact coefficients, not the rounded source caption.
All eight exact pairs: (16,7),(13,17),(16,12),(15,11),(16,18),(12,10),(17,17),(15,12). Blue y-on-x line y0.35x+7.75; amber x-on-y line x15+(7/108)(y−13). Both meet at means(15,13). Axes are cropped, not zero origins. The reverse line is plotted using exact coefficients, not the rounded source caption.

Common mistakes

Swapping the input lists changes the regression direction. The reverse regression is not obtained by inverting the first regression, and its rounded equation should not be used for a precision intersection.

Solution notes

Student-only source. All printed calculator procedures, mathematical outputs, both fits, the sketch and the unnumbered means task are retained. The missing x in the printed blue sketch caption is explicitly corrected using the earlier printed equation. No marks are printed.

Read the hint