Porisma

Worked solution

Fit a straight line to logarithms of both variables

A researcher gave eight children lists of words of varying difficulty and asked each child to define them. The ages xx (years) and numbers of correctly defined words yy are:

Childxxyy
A2.59
B3.113
C4.318
D5.025
E5.935
F7.153
G8.181
H9.4132

(i) Sketch the scatter diagram and comment on whether a linear regression of yy on xx is suitable.

(ii) Calculate the product moment correlation coefficient between ln⁡y\ln y and ln⁡x\ln x. Comment on the suitability of ln⁡y=a+bln⁡x\ln y=a+b\ln x.

(iii) Find the least-squares regression of ln⁡y\ln y on ln⁡x\ln x. Sketch it on the scatter diagram of ln⁡y\ln y against ln⁡x\ln x.

CJC · Lecture · Example 10

(i) Inspect the original scale

Answer

A straight-line model is unsuitable for the visibly curved original pattern.

Plot all eight pairs, age horizontally and correctly defined words vertically. The source marks input extremes 2.5 and 9.4 and output extremes 9 and 132. The points rise increasingly steeply, rather than scattering about a straight line. This completes the source’s blank suitability comment. The original lower-left O is a cropped sketch corner; the reconstruction labels the actual input ticks.

How did this part go?

(ii) Generate logarithmic lists and assess the fit

Answer

rln⁡x,ln⁡y=0.982r_{\ln x,\ln y}=0.982 (3 s.f.); the transformed pattern supports a linear model.

Keep xx in L1 and yy in L2. Highlight L3, press ENTER, enter L3=ln(L1) and ENTER. Highlight L4, press ENTER, enter L4=ln(L2) and ENTER. The source screen displays, for example, ln⁡2.5=0.91629073187416\ln2.5=0.91629073187416 and ln⁡9=2.1972245773362\ln9=2.1972245773362. Both variables must be positive for these real logarithms.

Use STAT → CALC → 8:LinReg(a+bx), Xlist=L3, Ylist=L4, Store RegEQ=Y1. Calculator x represents ln⁡x\ln x and calculator y represents ln⁡y\ln y. The printed output is a=0.240217873a=0.240217873, b=1.95341374b=1.95341374, r2=0.9636608958r^2=0.9636608958, r=0.9816623125r=0.9816623125, reported as 0.9820.982. The transformed scatter is approximately linear with strong positive association, supporting the proposed form; the blank suitability explanation is authored. A large coefficient alone does not establish validity outside this sample.

How did this part go?

(iii) Plot the regression in transformed coordinates

Answer

ln⁡y=0.240+1.95ln⁡x\ln y=0.240+1.95\ln x (3 s.f.).

The full printed fit is ln⁡y=0.240217873+1.95341374ln⁡x\ln y=0.240217873+1.95341374\ln x. Use Plot1 ON, scatter type, Xlist=L3, Ylist=L4, with the regression already stored in Y1. The source sketch labels ln⁡2.5\ln2.5, ln⁡9.4\ln9.4, ln⁡9\ln9 and ln⁡132\ln132; both logarithmic axis labels must be retained.

The reconstruction draws the full-precision line through the exact logged observations. Its caption can report the requested 3-s.f. coefficients without using those rounded values for later calculations. In original units this is the power-law model y=e0.240217873x1.95341374y=e^{0.240217873}x^{1.95341374}, not an exponential in xx; this last equivalence is an authored clarification.

How did this part go?

Compare your sketch

Expand diagram

Use the scrollbars or arrow keys to inspect details.

Two panels retain all eight exact age/word pairs (2.5,9),(3.1,13),(4.3,18),(5,25),(5.9,35),(7.1,53),(8.1,81),(9.4,132). The first curves upward; the second plots their natural logarithms with fitted line ln y0.240217873+1.95341374 ln x. Cropped input axes are labelled numerically; response axes begin at zero.
Two panels retain all eight exact age/word pairs (2.5,9),(3.1,13),(4.3,18),(5,25),(5.9,35),(7.1,53),(8.1,81),(9.4,132). The first curves upward; the second plots their natural logarithms with fitted line ln y0.240217873+1.95341374 ln x. Cropped input axes are labelled numerically; response axes begin at zero.
Two panels retain all eight exact age/word pairs (2.5,9),(3.1,13),(4.3,18),(5,25),(5.9,35),(7.1,53),(8.1,81),(9.4,132). The first curves upward; the second plots their natural logarithms with fitted line ln y0.240217873+1.95341374 ln x. Cropped input axes are labelled numerically; response axes begin at zero.

Solution notes

All eight pairs, all three asks, two source scatter roles, logarithmic list generation, variable mapping, StoreY1 and plot settings retained. Suitability comments complete visible blanks and are labelled authored. No printed marks.