StatisticsInference for Regression and Several Means1 of 3
Inference for Regression and Several Means · 1

Inference for the Regression Slope

When we fit a regression line to a small sample, we need a way to tell whether its tilt reflects a real trend in the whole population or just the luck of which points we happened to pick.

1

Sample Slope vs. Population Slope

Suppose we take a random sample of n=10n = 10 people to see how hours of screen time before bed (xx) relate to sleep quality score the next morning (yy), and we find a least-squares regression line with a slope of b=−4\slope{b} = \slope{-4}. Does screen time actually go with worse sleep across the entire population, or could a completely flat population line produce a sample slope of −4\slope{-4} just by random chance?

Sample Slope vs. Population Slope
sleep quality score\htmlClass{lc-ink}{\text{sleep quality score}}
50\htmlClass{lc-ink}{50}
60\htmlClass{lc-ink}{60}
70\htmlClass{lc-ink}{70}
80\htmlClass{lc-ink}{80}
90\htmlClass{lc-ink}{90}
100\htmlClass{lc-ink}{100}
0\htmlClass{lc-ink}{0}
1\htmlClass{lc-ink}{1}
2\htmlClass{lc-ink}{2}
3\htmlClass{lc-ink}{3}
4\htmlClass{lc-ink}{4}
5\htmlClass{lc-ink}{5}
screen time before bed (hours)\htmlClass{lc-ink}{\text{screen time before bed (hours)}}

In our sample of 1010 people, the sample slope is known (b=−4\slope{b} = \slope{-4}, sometimes written b1\slope{b_1}), while the true slope for the entire population is an unknown parameter β\truth{\beta} (or β1\truth{\beta_1}) that tracks how the population's average yy changes for each 11-unit increase in xx.

Because every random sample of 1010 people picks a different set of points, the sample slope b\slope{b} wobbles from sample to sample around the true slope β\truth{\beta}. That gives us two questions to answer about β\truth{\beta}:

2

Standard Error of the Slope

To tell whether b=−4\slope{b} = \slope{-4} is unusually far from 0\truth{0}, we first need to find the standard error of the slope (SEb\se{SE_b}), which is the typical amount the sample slope b\slope{b} wobbles from one random sample to the next. Three features of our sample control how much the line wobbles.

Standard Error of the Slope
sleep quality score\htmlClass{lc-ink}{\text{sleep quality score}}
50\htmlClass{lc-ink}{50}
60\htmlClass{lc-ink}{60}
70\htmlClass{lc-ink}{70}
80\htmlClass{lc-ink}{80}
90\htmlClass{lc-ink}{90}
100\htmlClass{lc-ink}{100}
0\htmlClass{lc-ink}{0}
1\htmlClass{lc-ink}{1}
2\htmlClass{lc-ink}{2}
3\htmlClass{lc-ink}{3}
4\htmlClass{lc-ink}{4}
5\htmlClass{lc-ink}{5}
screen time before bed (hours)\htmlClass{lc-ink}{\text{screen time before bed (hours)}}
b=−4\htmlClass{lc-blue}{b} = \htmlClass{lc-blue}{-4}
SEb=?\htmlClass{lc-pink}{SE_b} = {?}

Putting the vertical scatter around the line on top and the two anchoring factors on the bottom gives the standard error of the slope:

SEb=s⏞vertical scatterof residualssx⏟horizontalspread of x⋅n−1\displaystyle \se{SE_b} = \frac{\overbrace{\scatter{s}}^{\begin{gathered}\scriptstyle \text{vertical scatter} \\ \scriptstyle \text{of residuals}\end{gathered}}}{\underbrace{\xspread{s_x}}_{\begin{gathered}\scriptstyle \text{horizontal} \\ \scriptstyle \text{spread of } x\end{gathered}} \cdot \sqrt{n - 1}}

Here s\scatter{s} measures the typical vertical distance of the points from the sample line, calculated using df=n−2\text{df} = n - 2 degrees of freedom because the first 22 points are used up just to fix a straight line (22 points alone always have zero scatter). For our n=10n = 10 people, SEb=1.5\se{SE_b} = \se{1.5}, meaning sample slopes from random groups of 1010 people naturally vary around β\truth{\beta} by about 1.5\se{1.5} points per hour.

Try changing the spread of the xx-values to see how anchoring the ends of the line shrinks SEb\se{SE_b}.

For the same vertical scatter around the true line, spreading the sampled X-values wider apart holds the sample lines closer together and shrinks the standard error of the slope.
3

Conditions for Regression Inference

Before we can trust SEb=1.5\se{SE_b} = \se{1.5} and use a tt-distribution with df=n−2\text{df} = n - 2, we have to check that our data meets the four assumptions behind them. We check the first three on two graphs of the residuals: the residual plot (residuals against xx) and a dotplot or histogram of the residuals themselves. We check the fourth from how the sample was collected.

Conditions for Regression Inference
sleep quality score\htmlClass{lc-ink}{\text{sleep quality score}}
50\htmlClass{lc-ink}{50}
60\htmlClass{lc-ink}{60}
70\htmlClass{lc-ink}{70}
80\htmlClass{lc-ink}{80}
90\htmlClass{lc-ink}{90}
100\htmlClass{lc-ink}{100}
0\htmlClass{lc-ink}{0}
1\htmlClass{lc-ink}{1}
2\htmlClass{lc-ink}{2}
3\htmlClass{lc-ink}{3}
4\htmlClass{lc-ink}{4}
5\htmlClass{lc-ink}{5}
screen time before bed (hours)\htmlClass{lc-ink}{\text{screen time before bed (hours)}}
Linear\htmlClass{lc-ink}{\text{Linear}}
Equal variance\htmlClass{lc-ink}{\text{Equal variance}}
Normal residuals\htmlClass{lc-ink}{\text{Normal residuals}}
Independent\htmlClass{lc-ink}{\text{Independent}}
Curved pattern\htmlClass{lc-ink}{\text{Curved pattern}}
(fails linearity)\htmlClass{lc-ink}{\text{(fails linearity)}}
residual\htmlClass{lc-ink}{\text{residual}}
−10\htmlClass{lc-ink}{-10}
0\htmlClass{lc-ink}{0}
10\htmlClass{lc-ink}{10}
0\htmlClass{lc-ink}{0}
1\htmlClass{lc-ink}{1}
2\htmlClass{lc-ink}{2}
3\htmlClass{lc-ink}{3}
4\htmlClass{lc-ink}{4}
5\htmlClass{lc-ink}{5}
Fan-out\htmlClass{lc-ink}{\text{Fan-out}}
(fails equal variance)\htmlClass{lc-ink}{\text{(fails equal variance)}}
residual\htmlClass{lc-ink}{\text{residual}}
−10\htmlClass{lc-ink}{-10}
0\htmlClass{lc-ink}{0}
10\htmlClass{lc-ink}{10}
0\htmlClass{lc-ink}{0}
1\htmlClass{lc-ink}{1}
2\htmlClass{lc-ink}{2}
3\htmlClass{lc-ink}{3}
4\htmlClass{lc-ink}{4}
5\htmlClass{lc-ink}{5}
screen time (hours)\htmlClass{lc-ink}{\text{screen time (hours)}}
Dotplot of residuals\htmlClass{lc-ink}{\text{Dotplot of residuals}}
(checks normality)\htmlClass{lc-ink}{\text{(checks normality)}}
−10\htmlClass{lc-ink}{-10}
0\htmlClass{lc-ink}{0}
10\htmlClass{lc-ink}{10}
residual\htmlClass{lc-ink}{\text{residual}}

Each condition checks a specific part of our tt-procedure:

Try dragging one point far from the line to see how a single outlier in a small sample pulls the slope b\slope{b} and inflates s\scatter{s}.

In a small sample of 10, a single outlier can pull the slope like a seesaw, widen the vertical scatter, and stand out alone in the residuals.
4

Hypothesis Test for the Slope

With all four conditions met, we can test our first question: could a flat population line (β=0\truth{\beta} = \truth{0}, no linear relationship) produce a sample slope as steep as b=−4\slope{b} = \slope{-4} just by random sampling luck?

Hypothesis Test for the Slope
sleep quality score\htmlClass{lc-ink}{\text{sleep quality score}}
50\htmlClass{lc-ink}{50}
60\htmlClass{lc-ink}{60}
70\htmlClass{lc-ink}{70}
80\htmlClass{lc-ink}{80}
90\htmlClass{lc-ink}{90}
100\htmlClass{lc-ink}{100}
0\htmlClass{lc-ink}{0}
1\htmlClass{lc-ink}{1}
2\htmlClass{lc-ink}{2}
3\htmlClass{lc-ink}{3}
4\htmlClass{lc-ink}{4}
5\htmlClass{lc-ink}{5}
screen time before bed (hours)\htmlClass{lc-ink}{\text{screen time before bed (hours)}}
β=0\htmlClass{lc-violet}{\beta} = \htmlClass{lc-violet}{0}
b=−4\htmlClass{lc-blue}{b} = \htmlClass{lc-blue}{-4}
Text solution
Set the hypotheses for the unknown population slope β\truth{\beta}Test the flat population line (β=0\truth{\beta} = \truth{0}) against a two-sided alternative (or use Ha:β<0H_a: \truth{\beta} < \truth{0} if a negative direction was suspected before looking at the data).
H0:β\displaystyle H_0: \truth{\beta} =0Ha:β≠0\displaystyle = \truth{0} \qquad H_a: \truth{\beta} \neq \truth{0}
Divide the distance from β0=0\truth{\beta_0} = \truth{0} by the standard error SEb\se{SE_b}This counts how many standard errors our sample slope b=−4\slope{b} = \slope{-4} sits from a flat line.
t\displaystyle \tstat{t} =b−β0SEb\displaystyle = \frac{\slope{b} - \truth{\beta_0}}{\se{SE_b}} =−4−01.5\displaystyle = \frac{\slope{-4} - \truth{0}}{\se{1.5}} =−2.67\displaystyle = \tstat{-2.67}
Find the two-tail area under the tt-distribution with n−2n - 2 degrees of freedomUsing df=10−2=8\text{df} = 10 - 2 = 8, combine the tail areas beyond −2.67\tstat{-2.67} and +2.67\tstat{+2.67} to get the p\share{p}-value.
df=10−2=8  ⟹  p-value=0.028\displaystyle \begin{aligned} \text{df} &= 10 - 2 = 8 \\ \implies \share{p}\text{-value} &= \share{0.028} \end{aligned}

Because 0.028<0.05\share{0.028} < 0.05, we reject H0:β=0H_0: \truth{\beta} = \truth{0}: a flat population line would produce a sample slope at least this far from 0\truth{0} by random chance only 2.8%\share{2.8\%} of the time, giving convincing evidence of a linear relationship between screen time before bed and sleep quality in the population.

5

Confidence Interval for the Slope

Rejecting β=0\truth{\beta} = \truth{0} gives us convincing evidence that the population line isn't flat, so our next goal is to estimate how steep the true population slope β\truth{\beta} actually is by building a 95%\share{95\%} confidence interval around b=−4\slope{b} = \slope{-4}.

Confidence Interval for the Slope
−10\htmlClass{lc-ink}{-10}
−8\htmlClass{lc-ink}{-8}
−6\htmlClass{lc-ink}{-6}
−4\htmlClass{lc-ink}{-4}
−2\htmlClass{lc-ink}{-2}
2\htmlClass{lc-ink}{2}
0\htmlClass{lc-violet}{0}
slope (points per hour)\htmlClass{lc-ink}{\text{slope (points per hour)}}
b=−4\htmlClass{lc-blue}{b} = \htmlClass{lc-blue}{-4}
β=?\htmlClass{lc-violet}{\beta} = {?}
Text solution
Look up the critical value t∗t^* for n−2n - 2 degrees of freedomFor 95%\share{95\%} confidence with df=10−2=8\text{df} = 10 - 2 = 8, t∗t^* gives how many standard errors capture the middle 95%\share{95\%} of random sample slopes.
t∗\displaystyle t^* =2.31(for df=8)\displaystyle = 2.31 \quad (\text{for } \text{df} = 8)
Multiply t∗t^* by SEb\se{SE_b} to get the margin of errorThis is the farthest we expect b\slope{b} to wobble from β\truth{\beta} in 95%\share{95\%} of samples.
Margin of error=t∗⋅SEb=2.31⋅1.5=3.46\displaystyle \begin{aligned} \text{Margin of error} &= t^* \cdot \se{SE_b} \\ &= 2.31 \cdot \se{1.5} = \se{3.46} \end{aligned}
Add and subtract the margin of error from the sample slope b\slope{b}Center the interval at b=−4\slope{b} = \slope{-4} to catch the plausible values of β\truth{\beta}.
b±t∗⋅SEb=−4±3.46=(−7.46,−0.54)\displaystyle \begin{aligned} \slope{b} \pm t^* \cdot \se{SE_b} &= \slope{-4} \pm \se{3.46} \\ &= (-7.46, -0.54) \end{aligned}

We are 95%\share{95\%} confident that in this population, for every 11-hour increase in screen time before bed, the average sleep quality score is lower by between 0.540.54 and 7.467.46 points. Notice two words to be careful with: we say average sleep score rather than an individual person's score, and we never say screen time causes the drop because our data came from an observational study rather than a randomized experiment.

Slide the sample slope b\slope{b} to see how the 95%\share{95\%} confidence interval and the two-sided test at α=0.05\alpha = 0.05 always agree on β=0\truth{\beta} = \truth{0}.

A 95% confidence interval for the slope stays completely off 0 at the exact tilts where the two-sided p-value drops below 0.05.
6

Reading Computer Regression Output

In practice, software computes SEb\se{SE_b}, t\tstat{t}, and the p\share{p}-value for us, so we just need to pull the right numbers out of a computer regression table.

Reading Computer Regression Output
Predictor\htmlClass{lc-ink}{\text{Predictor}}
Coef\htmlClass{lc-ink}{\text{Coef}}
SE Coef\htmlClass{lc-ink}{\text{SE Coef}}
T\htmlClass{lc-ink}{\text{T}}
P\htmlClass{lc-ink}{\text{P}}
Constant\htmlClass{lc-ink}{\text{Constant}}
88.00\htmlClass{lc-ink}{88.00}
4.20\htmlClass{lc-ink}{4.20}
20.95\htmlClass{lc-ink}{20.95}
0.000\htmlClass{lc-ink}{0.000}
Screen Time\htmlClass{lc-ink}{\text{Screen Time}}
−4.00\htmlClass{lc-ink}{-4.00}
1.50\htmlClass{lc-ink}{1.50}
−2.67\htmlClass{lc-ink}{-2.67}
0.028\htmlClass{lc-ink}{0.028}
s=6.12\htmlClass{lc-ink}{s = 6.12}
R-Sq=47.1%\htmlClass{lc-ink}{\text{R-Sq} = 47.1\%}
PredictorCoefSE CoefTPConstant88.00⏟y-intercept a4.2020.950.000Screen Time−4.00⏟sampleslope b1.50⏟SEb−2.67⏟t-statistic0.028⏟two-sidedp-value\displaystyle \begin{array}{lcccc} \textbf{Predictor} & \textbf{Coef} & \textbf{SE Coef} & \textbf{T} & \textbf{P} \\ \hline \text{Constant} & \underbrace{88.00}_{y\text{-intercept } a} & 4.20 & 20.95 & 0.000 \\ \text{Screen Time} & \underbrace{\slope{-4.00}}_{\begin{gathered}\scriptstyle \text{sample} \\ \scriptstyle \text{slope } \slope{b}\end{gathered}} & \underbrace{\se{1.50}}_{\se{SE_b}} & \underbrace{\tstat{-2.67}}_{\tstat{t}\text{-statistic}} & \underbrace{\share{0.028}}_{\begin{gathered}\scriptstyle \text{two-sided} \\ \scriptstyle \share{p}\text{-value}\end{gathered}} \end{array}
s=6.12⏟vertical scatter of pointsaround the lineR-Sq=47.1%\displaystyle \underbrace{\scatter{s} = \scatter{6.12}}_{\begin{gathered}\scriptstyle \text{vertical scatter of points} \\ \scriptstyle \text{around the line}\end{gathered}} \qquad R\text{-Sq} = 47.1\%
Text solution
Read the slope numbers from the explanatory variable's row (`Screen Time`), ignoring the `Constant` rowThe `Constant` row is for the yy-intercept aa in y^=a+bx\hat{y} = a + \slope{b}x, while the `Screen Time` row gives b\slope{b}, SEb\se{SE_b}, and t\tstat{t} for the slope, and s=6.12\scatter{s} = \scatter{6.12} below the table gives the typical vertical distance of points from the line.
b=−4.00,SEb=1.50,t=−4.001.50=−2.67\displaystyle \begin{aligned} \slope{b} &= \slope{-4.00}, \\ \se{SE_b} &= \se{1.50}, \\ \tstat{t} &= \frac{\slope{-4.00}}{\se{1.50}} = \tstat{-2.67} \end{aligned}
Divide the table's `P` by 22 when testing a one-sided alternativeComputer output always gives the two-sided p\share{p}-value for Ha:β≠0H_a: \truth{\beta} \neq \truth{0}, so when b=−4.00\slope{b} = \slope{-4.00} points in the direction of a one-sided Ha:β<0H_a: \truth{\beta} < \truth{0}, we take half the two-tail area.
One-sided p-value=0.0282=0.014\displaystyle \begin{aligned} \text{One-sided } \share{p}\text{-value} &= \frac{\share{0.028}}{2} \\ &= \share{0.014} \end{aligned}

So for a one-sided test of Ha:β<0H_a: \truth{\beta} < \truth{0}, the p\share{p}-value is 0.014\share{0.014}.

Key concepts

Every inference problem on a regression slope asks about the unknown population slope β\truth{\beta} using the known sample slope b\slope{b} (such as b=−4\slope{b} = \slope{-4} for our n=10n = 10 screen-time points) and its standard error SEb=ssxn−1=1.5\se{SE_b} = \frac{\scatter{s}}{\xspread{s_x}\sqrt{n - 1}} = \se{1.5} with df=n−2=8\text{df} = n - 2 = 8 degrees of freedom.

When you can use tt-procedures, and when to stop

First check that the residual plot has no curved pattern (Linearity) and no megaphone fan-out (Equal variance), that a dotplot or histogram of the residuals (not xx) has no heavy skew or extreme outliers (Normality), and that the nn observations were sampled independently rather than in pairs like twins or couples (Random and independent). If the residual plot fans out or the subjects come in pairs, stop: the formula for SEb\se{SE_b} does not work.

Testing whether a linear relationship exists (H0:β=0H_0: \truth{\beta} = \truth{0})

Count how many standard errors b\slope{b} sits from 0\truth{0} using t=b−0SEb=−41.5=−2.67\tstat{t} = \frac{\slope{b} - \truth{0}}{\se{SE_b}} = \frac{\slope{-4}}{\se{1.5}} = \tstat{-2.67} with df=n−2=8\text{df} = n - 2 = 8. Use both tails for Ha:β≠0H_a: \truth{\beta} \neq \truth{0} (p=0.028\share{p} = \share{0.028}), or half of the computer table's two-sided `P` when b\slope{b} matches a one-sided alternative set beforehand (Ha:β<0  ⟹  p=0.0282=0.014H_a: \truth{\beta} < \truth{0} \implies \share{p} = \frac{\share{0.028}}{2} = \share{0.014}).

Estimating how steep β\truth{\beta} is (b±t∗⋅SEb\slope{b} \pm t^* \cdot \se{SE_b})

Multiply t∗t^* (from df=n−2\text{df} = n - 2) by SEb\se{SE_b} to get the margin of error (−4±2.31(1.5)=(−7.46,−0.54)\slope{-4} \pm 2.31(\se{1.5}) = (-7.46, -0.54)). Describe the interval as the change in the population average yy for each 11-unit increase in xx, never as cause-and-effect in an observational study. And if a question simply asks for the typical vertical distance of data points from the regression line, read s=6.12\scatter{s} = \scatter{6.12} directly; do not compute SEb\se{SE_b} or a confidence interval.

7

Practice

1

Before collecting data from a random sample of 15 mountain streams, a biologist suspects that higher water temperature (°C) is associated with lower dissolved oxygen (mg/L). After finding a sample slope of b=−0.32\slope{b} = \slope{-0.32} from the data, a student writes the hypotheses as H0:b=0H_0: b = 0 and Ha:b<0H_a: b < 0. Identify the error in the student's hypotheses, write the correct hypotheses, and define the parameter in context.

Ask yourself which slope is already known from the 15 streams and which slope is still unknown for all mountain streams.

Hypotheses must be statements about the unknown population slope β\truth{\beta}, never the known sample slope b=−0.32\slope{b} = \slope{-0.32} (and be careful not to plug the sample value −0.32\slope{-0.32} into the hypotheses as H0:β=−0.32H_0: \truth{\beta} = \slope{-0.32}, or use Ha:β≠0H_a: \truth{\beta} \neq \truth{0} when a negative direction was suspected beforehand). Because the biologist suspected a negative relationship before collecting data, the correct hypotheses are:
H0:β\displaystyle H_0: \truth{\beta} =0Ha:β<0\displaystyle = \truth{0} \qquad H_a: \truth{\beta} < \truth{0}
where β\truth{\beta} is the true slope of the population regression line relating water temperature (°C) to average dissolved oxygen (mg/L) across all such mountain streams.
2

For a random sample of n=17n = 17 used cars, a linear regression predicting price (in thousands of dollars) from mileage (in thousands of miles) gives a sample slope of b=−0.18\slope{b} = \slope{-0.18}, residual standard deviation s=2.4\scatter{s} = \scatter{2.4}, and standard deviation of mileage sx=15.0\xspread{s_x} = \xspread{15.0}. Calculate the standard error of the slope (SEb\se{SE_b}), the test statistic t\tstat{t} for testing H0:β=0H_0: \truth{\beta} = \truth{0}, and the degrees of freedom for the tt-distribution.

Check which number goes under the square root in the denominator of SEb\se{SE_b}, and which number counts the degrees of freedom for a line.

First find SEb\se{SE_b}, being careful to use n−1=16\sqrt{n - 1} = \sqrt{16} in the denominator rather than n−2=15\sqrt{n - 2} = \sqrt{15} (which would give SEb≈0.0413\se{SE_b} \approx 0.0413 and t≈−4.36\tstat{t} \approx -4.36):
SEb=ssx⋅n−1=2.415.0⋅17−1=2.415.0⋅4=0.04\displaystyle \begin{aligned} \se{SE_b} &= \frac{\scatter{s}}{\xspread{s_x} \cdot \sqrt{n - 1}} \\ &= \frac{\scatter{2.4}}{\xspread{15.0} \cdot \sqrt{17 - 1}} \\ &= \frac{\scatter{2.4}}{\xspread{15.0} \cdot 4} = \se{0.04} \end{aligned}
Next divide the sample slope by SEb\se{SE_b} to find t\tstat{t}, and subtract 22 (not 11, which would give df=16\text{df} = 16) for the two points needed to fix a line:
t=b−β0SEb=−0.18−00.04=−4.50,df=n−2=17−2=15\displaystyle \begin{aligned} \tstat{t} &= \frac{\slope{b} - \truth{\beta_0}}{\se{SE_b}} = \frac{\slope{-0.18} - \truth{0}}{\se{0.04}} = \tstat{-4.50}, \\ \text{df} &= n - 2 = 17 - 2 = 15 \end{aligned}
3

An agronomist takes a random sample of n=12n = 12 corn plots to study the linear relationship between fertilizer amount (xx) and yield (yy). (a) In the residual plot (residuals vs. fertilizer), the points stay close to the zero line on the left but fan out widely like a megaphone on the right. Which condition is violated, and why does this break the formula for SEb\se{SE_b}? (b) To check the normality condition, the agronomist checks a dotplot of the 12 fertilizer amounts (xx-values) and sees that it is roughly symmetric with no outliers. Explain what is wrong with this check and what graph she should inspect instead.

(a) Look at the numerator of SEb\se{SE_b}: does it allow vertical scatter to change across xx? (b) Which values need a roughly symmetric distribution with no extreme outliers for the small-sample tt-distribution to work?

(a) The Equal Variance (constant scatter) condition is violated (not Linearity, since the pattern is still straight rather than curved). The formula for SEb\se{SE_b} uses a single number s\scatter{s} in the numerator for vertical scatter around the line, which does not work when vertical scatter changes across xx and makes the line much less accurate on the right than on the left. (b) The normality condition applies to the residuals, not the explanatory variable xx (and cannot be judged from the residual plot against xx alone). Instead, she should check a dotplot, histogram, or normal probability plot of the 12 residuals themselves for heavy skew or extreme outliers.
4

Before looking at the data, a nutritionist suspects that higher daily fiber intake (grams) is associated with lower LDL cholesterol (mg/dL). A random sample of n=22n = 22 adults gives the following computer regression table (with all inference conditions met): Constant row: Coef = 142.50, SE Coef = 8.10, T = 17.59, P = 0.000; Fiber (g) row: Coef = −1.20, SE Coef = 0.50, T = −2.40, P = 0.026; below the table: s = 11.40, R-Sq = 22.4%. (a) Give the sample slope b\slope{b}, the standard error of the slope SEb\se{SE_b}, and the typical vertical distance that an individual's LDL cholesterol falls from the regression line. (b) Find the p\share{p}-value for testing H0:β=0H_0: \truth{\beta} = \truth{0} against Ha:β<0H_a: \truth{\beta} < \truth{0} and state the conclusion at the α=0.05\alpha = 0.05 level in context.

(a) Separate how much the sample slope wobbles (SEb\se{SE_b}) from how far individual points fall vertically from the line (s\scatter{s}). (b) Check whether the computer table's `P` column is one-sided or two-sided.

(a) Reading from the `Fiber (g)` row rather than the `Constant` row (142.50142.50 and 8.108.10), the sample slope is b=−1.20\slope{b} = \slope{-1.20} and its standard error is SEb=0.50\se{SE_b} = \se{0.50}. The typical vertical distance of an individual's LDL cholesterol from the regression line is the residual standard deviation s=11.40 mg/dL\scatter{s} = \scatter{11.40}\text{ mg/dL} below the table (not SEb=0.50\se{SE_b} = \se{0.50}). (b) The computer table gives a two-sided p\share{p}-value of 0.026\share{0.026}, so be careful not to use 0.026\share{0.026} directly for a one-sided test. Since b=−1.20\slope{b} = \slope{-1.20} is in the direction of Ha:β<0H_a: \truth{\beta} < \truth{0}, the one-sided p\share{p}-value is:
p-value\displaystyle \share{p}\text{-value} =0.0262\displaystyle = \frac{\share{0.026}}{2} =0.013\displaystyle = \share{0.013}
Because 0.013<0.05\share{0.013} < 0.05, we reject H0H_0 and conclude there is convincing evidence of a negative linear relationship between daily fiber intake and LDL cholesterol in the population.
5

In an observational study of a random sample of n=10n = 10 office workers (all conditions met), a researcher predicts afternoon alertness score (0 to 100) from hours of outdoor daylight exposure, finding a sample slope of b=5.0\slope{b} = \slope{5.0} and a standard error of SEb=2.0\se{SE_b} = \se{2.0}. Using df=8\text{df} = 8 and critical value t∗=2.31t^* = 2.31: (a) Construct a 95%\share{95\%} confidence interval for the population slope β\truth{\beta}. (b) Explain what is wrong with claiming "Each extra hour of daylight causes a worker's alertness score to rise by between 0.380.38 and 9.629.62 points," and give a correct interpretation. (c) Based on this interval alone, state whether a two-sided test of H0:β=0H_0: \truth{\beta} = \truth{0} at α=0.05\alpha = 0.05 would reject H0H_0, and explain why.

(a) Margin of error is t∗⋅SEbt^* \cdot \se{SE_b}. (b) Check how the data was collected and whether a regression line tracks an individual or a population average. (c) Check where 0\truth{0} sits relative to your interval.

(a) Multiply t∗t^* directly by SEb=2.0\se{SE_b} = \se{2.0} (do not divide SEb\se{SE_b} by 10\sqrt{10} again, which would mistakenly give 5.0±1.46=(3.54,6.46)\slope{5.0} \pm 1.46 = (3.54, 6.46)):
b±t∗⋅SEb=5.0±2.31(2.0)=5.0±4.62=(0.38,9.62)\displaystyle \begin{aligned} \slope{b} \pm t^* \cdot \se{SE_b} &= \slope{5.0} \pm 2.31(\se{2.0}) \\ &= \slope{5.0} \pm \se{4.62} \\ &= (0.38, 9.62) \end{aligned}
(b) Because the data came from an observational study rather than a randomized experiment, we cannot claim causation, and the regression line tracks the population mean (average) alertness score rather than an individual worker's change. Correctly interpreted: we are 95%\share{95\%} confident that in this population, for every 11-hour increase in outdoor daylight exposure, the average afternoon alertness score is higher by between 0.380.38 and 9.629.62 points. (c) It would reject H0:β=0H_0: \truth{\beta} = \truth{0} because the null value 0\truth{0} is not inside the 95%\share{95\%} confidence interval (0.38,9.62)(0.38, 9.62) (avoid comparing 0.050.05 to the interval endpoints; check whether 0\truth{0} is inside the interval), meaning every plausible value for β\truth{\beta} is positive.
6

Two researchers each sample n=26n = 26 runners from a large population to estimate the slope β\truth{\beta} relating weekly training mileage (xx) to 5K race time in minutes (yy), where the vertical scatter around the regression line is s=1.8\scatter{s} = \scatter{1.8} minutes in both studies. Researcher A samples 26 runners whose weekly mileage all falls narrowly between 18 and 22 miles (sx=1.2\xspread{s_x} = \xspread{1.2} miles). Researcher B samples 26 runners whose weekly mileage spans 5 to 50 miles (sx=12.0\xspread{s_x} = \xspread{12.0} miles), formed by picking 13 pairs of identical twins who train together. (a) Calculate SEb\se{SE_b} for Researcher A, and explain how having ten times the horizontal spread (sx=12.0\xspread{s_x} = \xspread{12.0} instead of 1.2\xspread{1.2}) would change SEb\se{SE_b} and the width of a 95%\share{95\%} confidence interval if all inference conditions were met. (b) Explain why Researcher B cannot validly use that smaller SEb\se{SE_b} to run a tt-test for β\truth{\beta}, even if the residual plots look linear, equal in vertical spread, and roughly normal.

(a) Notice where sx\xspread{s_x} sits in SEb=ssxn−1\se{SE_b} = \frac{\scatter{s}}{\xspread{s_x}\sqrt{n-1}}: is it inside or outside the square root? (b) Check the fourth condition, which doesn't show up in a residual plot.

(a) For Researcher A, using n−1=25=5\sqrt{n - 1} = \sqrt{25} = 5:
SEb=1.81.2⋅26−1=1.81.2⋅5=0.30 minutes per mile\displaystyle \begin{aligned} \se{SE_b} &= \frac{\scatter{1.8}}{\xspread{1.2} \cdot \sqrt{26 - 1}} = \frac{\scatter{1.8}}{\xspread{1.2} \cdot 5} \\ &= \se{0.30}\text{ minutes per mile} \end{aligned}
Because sx\xspread{s_x} sits outside the square root in the denominator (unlike nn, so be careful not to divide by 10\sqrt{10} to get 0.0950.095), multiplying the horizontal spread sx\xspread{s_x} by 1010 (to 12.0\xspread{12.0}) while keeping s\scatter{s} and nn fixed divides SEb\se{SE_b} by 1010 to 0.03 minutes per mile\se{0.03}\text{ minutes per mile}, making the 95%\share{95\%} confidence interval one-tenth as wide. (b) Passing the three residual-plot checks is not enough: Researcher B's sample violates the Random and Independent condition because 13 pairs of identical twins who train together are not independent observations, so the sample does not give 26 independent pieces of information and the standard error formula does not apply.