Inference on the slope and prediction
Test the advertising slope and find the interval for mean sales and the wider interval for one week.
It opens on
The slope of the line is 4.2106 with standard error 0.2729. Is the slope about 1, about 5 or about 15 standard errors above zero?
Why it matters
A budget decision needs more than a fitted line: it needs to know how sure we are that advertising works, how large the effect could be, and how much one future week can differ from the forecast.
Good to know first
- t test
Step by step
Testing and estimating the slope
Test H₀: β₁ = 0 with t, build the 95% interval for the slope and test a break-even slope of 3.
A common mix-up
A significant slope means the line predicts any single week accurately.
In fact: The slope test says the relationship is real; a single week still varies around the line by about the Standard Error 4.29 and more.
Intervals for a mean response and for one week
Compute the 95% confidence interval for the mean sales at advertising 21 and the wider prediction interval for one week.
The 95% confidence interval for the mean response is 177.65 ± 2.306 × 1.598 = 177.65 ± 3.68, from 173.97 to 181.34.
(173.97, 181.34)
A common mix-up
The 95% interval for the mean tells us where most individual weeks will fall.
In fact: It describes the average only, and most individual weeks vary much more, as the prediction interval shows.
How the intervals depend on x, and a decision
Show that intervals widen away from the mean of x, and use the intervals to judge a sales target.
At the mean advertising, x = 17.9, se_fit = 4.2873 × √(1 / 10) = 1.356, and at x = 26 it is 4.2873 × √(0.1 + 8.1² / 246.9) = 2.593.
se_fit = 1.356 at 17.9 and 2.593 at 26
A common mix-up
The intervals have the same width at every x.
In fact: They are narrowest at the mean of x and flare out toward the ends of the data.
Try it
A slope is 5.0 with standard error 2.0 and 8 degrees of freedom. Find the 95% interval with t* = 2.306.Answer
5.0 ± 4.612, so 0.39 to 9.61
Hint: b ± t* SE
A forecast is 100 with se_fit = 2 and Standard Error 5, with t* = 2.306. Find the 95% prediction interval.Answer
√(25 + 4) = 5.385, margin 12.42, so 87.58 to 112.42
Hint: √(s² + se_fit²)
Write the forecast for a week with advertising 21 in context.Answer
We are 95% confident that sales for one such week will be between $167,100 and $188,200
Hint: Use the prediction interval
A different fit has b = 2.0 and SE(b) = 1.2 with 8 degrees of freedom. What is t for H₀: β₁ = 0?Answer
2.0 / 1.2 = 1.67
A manager wants the range for the sales of next Tuesday's week alone. Which interval does she use?Answer
The prediction interval, 167.10 to 188.20
