Regression Inference and General Inference, STAT 301 Ch. 12 Part 2 – Study Notes
offline

Source: Objectives for Final Exam, Introduction to Statistics (Purdue University)

Difficulty: Intermediate to Advanced | Prerequisites: Linear Regression Basics (Ch. 12 Part 1), ANOVA concepts (Ch. 11), confidence intervals and hypothesis testing from Midterms 1 and 2.

Big Picture

Once you have a regression line, the natural next questions are: is the relationship statistically significant, how precisely do we know the slope, and how should we make predictions? This section covers three closely related inference procedures (the model utility F-test, the t-test for the slope, and the confidence interval for the slope), plus two types of prediction intervals. It also covers causality, extrapolation, and the general skill of choosing the right inference method for a given scenario. This is where everything from the course comes together.


TL;DR

The F-test checks whether X and Y are associated at all (model utility). The t-test for the slope tests whether beta_1 equals a specific value. The confidence interval for beta_1 gives a range of plausible slopes. Confidence intervals at x = x* estimate the mean response, while prediction intervals estimate a single new observation, and the prediction interval is always wider. Choosing the right inference method for any scenario is a core exam skill.


Key Terms

Model utility test (F-test for association)

A hypothesis test asking whether the linear model is useful, i.e. whether there is a statistically significant linear relationship between X and Y. Uses the F statistic from the regression ANOVA table.

SE_b1 (standard error of the slope)

The estimated standard deviation of the sampling distribution of b1. Calculated as sqrt(MSE / S_XX).

Confidence interval for beta_1

A range of plausible values for the population slope. Calculated as b1 plus or minus t * SE_b1, with df = n - 2.

Confidence interval for the mean response at x = x*

Estimates the average value of Y for all individuals in the population at a specific X value. The centre is y-hat at x*, and the interval uses SE_mu-hat.

Prediction interval at x = x*

Estimates the value of Y for a single new individual at a specific X value. The centre is the same y-hat, but the interval is wider because it accounts for both the uncertainty in the line and the natural variability of individual observations.

Causality

The claim that changes in X directly produce changes in Y. Association alone does not establish causality. Causality requires a well-designed experiment (random assignment to treatments) or other strong evidence ruling out confounders.

Generalisation

The extent to which conclusions from a study apply to a broader population. Depends on how the sample was selected and whether the study design supports it.


Core Content

Model Utility Test (F-Test, Objective 30)

This is the four-step hypothesis test for whether X and Y are linearly associated.

  1. Hypotheses: H0: beta_1 = 0 (no linear association). Ha: beta_1 is not equal to 0 (there is a linear association).

  1. Test statistic: F = MSR / MSE, with df1 = 1 and df2 = n - 2.

  1. P-value: From the F distribution. In R: pf(fts, df1, df2, lower.tail = FALSE).

  1. Conclusion: Compare p-value to alpha. State the conclusion in context.

The model utility test can only be used when you have the full ANOVA table (or enough information to build it). If you only have the slope, its standard error, and the sample size, you use the t-test instead.

Confidence Interval for Beta_1 (Objective 31)

The interval is: b1 plus or minus t_(alpha/2, df) times SE_b1.

SE_b1 = sqrt(MSE / S_XX), and df = n - 2.

Interpretation: "We are C% confident that the true slope beta_1 is between [lower bound] and [upper bound]." In context, this means for every one-unit increase in X, the mean of Y changes by an amount between the lower and upper bounds.

Hypothesis Test for the Slope (t-test, Objective 32)

  1. Hypotheses: H0: beta_1 = beta_10 (often beta_10 = 0). Ha: beta_1 is not equal to (or greater than, or less than) beta_10.

  1. Test statistic: t = (b1 - beta_10) / SE_b1, where SE_b1 = sqrt(MSE / S_XX).

  1. P-value: From the t distribution with df = n - 2.

  1. Conclusion: Compare p-value to alpha. State the conclusion in context.

Similarities and Differences Between Objectives 30, 31, and 32

  • The F-test (obj 30) and the t-test with H0: beta_1 = 0 (obj 32) test the same null hypothesis. For simple linear regression, F = t squared, so they always give the same p-value.

  • The t-test (obj 32) is more flexible: it can test beta_1 = any value (not just 0) and allows one-sided alternatives.

  • The confidence interval (obj 31) provides a range of plausible values for beta_1, which the hypothesis tests do not.

  • The F-test requires the full ANOVA table. The t-test only needs b1, SE_b1, and df.

When to Use the F-Test vs the t-Test

  • Use the F-test when you have the ANOVA table and want to test whether the model is useful (beta_1 = 0 vs beta_1 not equal to 0).

  • Use the t-test when you need a one-sided test, when you want to test beta_1 = some non-zero value, or when you only have the coefficient table (not the full ANOVA table).

Confidence Interval for the Mean Response at x = x* (Objective 38)

This estimates mu_(Y|x*), the average Y for all observations at that X value.

  • Centre: y-hat at x* (plug x* into the regression equation).

  • Standard error: SE = sqrt(MSE * [1/n + (x* - x-bar) squared / S_XX]).

  • Interval: y-hat plus or minus t_(alpha/2, n-2) times SE.

The interval is narrowest when x* = x-bar (the centre of the data) and widens as x* moves away from the mean.

Prediction Interval at x = x* (Objective 39)

This predicts a single new observation of Y at that X value.

  • Centre: y-hat at x* (same as the confidence interval).

  • Standard error: SE = sqrt(MSE * [1 + 1/n + (x* - x-bar) squared / S_XX]).

  • Interval: y-hat plus or minus t_(alpha/2, n-2) times SE.

The extra "1 +" inside the square root accounts for the variability of an individual observation around the mean. This is why the prediction interval is always wider than the confidence interval at the same x*.

Confidence Interval vs Prediction Interval (Objective 40)

  • Confidence interval: For the mean of Y at x = x*. Use when estimating the average outcome for a population of individuals with that X value.

  • Prediction interval: For a single new Y at x = x*. Use when predicting the outcome for one specific individual.

  • The prediction interval is always wider because it includes both the uncertainty about the line and the natural spread of individual observations.

Extrapolation (Objective 36)

Do not use the regression line to predict Y at an X value outside the range of the observed data. The linear pattern may not continue beyond the data. If an exam question asks for a prediction at an X outside the range, state that this is extrapolation and explain why the prediction is unreliable.

Causality in Regression (Objective 37)

To determine whether X causes Y, consider the study design:

  • If the data come from a well-designed experiment with random assignment to X values, you can conclude causation.

  • If the data are observational, you cannot conclude causation, because confounding variables may explain the association.

  • Simply stating "association does not mean causation" does not answer the question. You must explain why causation can or cannot be established in the specific scenario.

General Inference Questions (Objectives 41 to 44)

Choosing the right method (Obj 41): Given a scenario, identify whether you need a one-sample test, two-sample test, ANOVA, or regression. Consider the number of variables, their types (categorical vs quantitative), and the research question.

Summarising in English (Obj 42): Be able to state the conclusion of any inference procedure in a complete sentence that references the context of the problem.

Generalisability (Obj 43): Determine how far the results extend. Random sampling allows generalisation to the population sampled. Random assignment allows causal conclusions. Without either, conclusions are limited to the sample.

Practical consequences (Obj 44): Consider what would happen if the conclusion is wrong (Type I or Type II error). What real-world decision hinges on the result?


Formulas

F_{ts} = \frac{MSR}{MSE}, \quad df_1 = 1, \quad df_2 = n - 2
t_{ts} = \frac{b_1 - \beta_{10}}{SE_{b_1}}, \quad SE_{b_1} = \sqrt{\frac{MSE}{S_{XX}}}
\text{CI for } \beta_1: \quad b_1 \pm t_{\alpha/2,\, n-2} \cdot SE_{b_1}
SE_{\hat{\mu}^*} = \sqrt{MSE \left[\frac{1}{n} + \frac{(x^* - \bar{x})^2}{S_{XX}}\right]}
SE_{\hat{y}^*} = \sqrt{MSE \left[1 + \frac{1}{n} + \frac{(x^* - \bar{x})^2}{S_{XX}}\right]}

Both intervals use df = n - 2 and the form: estimate plus or minus t times SE.


Real-World Applications

Confidence intervals for beta_1 appear in medical research (e.g. estimating how much blood pressure drops per unit increase in drug dosage) and economics (e.g. the effect of an extra year of education on earnings). Prediction intervals are used in quality control to predict the measurement for the next item off a production line, or in weather forecasting to give a range for tomorrow's temperature at a given location.


Common Misconceptions

  • Students often confuse the confidence interval for the mean response with the prediction interval for a single observation. The prediction interval is always wider. If the question asks about "a particular individual," you want the prediction interval. If it asks about "the average" or "the mean," you want the confidence interval.

  • Saying "association does not mean causation" does not fully answer a causality question on the exam. You must explain why causation can or cannot be established in the specific scenario (e.g. observational study vs experiment, presence of confounders).

  • Students sometimes assume the F-test and t-test always test different things. In simple linear regression with H0: beta_1 = 0, they are equivalent (F = t squared, same p-value). The t-test becomes distinct only when testing beta_1 = some non-zero value or using a one-sided alternative.

  • A common error is using the prediction interval formula but calling it a confidence interval, or vice versa. The only difference in the SE formula is the "1 +" term.


Why It Matters / Exam Flags

  • Know the SE formulas for both the confidence interval and prediction interval, even though you will not calculate them from scratch. The exam may give you the SE and ask you to build the interval.

  • Be ready to state, for any given scenario, whether you need a confidence interval for the mean response or a prediction interval for an individual.

  • The four-step hypothesis test format is used for both the F-test and the t-test. Practise writing out all four steps in context.

  • General inference questions (objectives 41 to 44) can appear as standalone problems or as follow-ups to a regression or ANOVA problem. Be prepared to identify the correct inference method, write conclusions in English, assess generalisability, and discuss practical consequences.


Quick Self-Test

  1. True or false: The prediction interval at x = x* is always wider than the confidence interval at the same x*. (True.)

  1. Fill in the blank: The degrees of freedom for both the F-test and the t-test in simple linear regression are df1 = 1 and df2 = ______. (n - 2)

  1. True or false: If data are from an observational study and r = 0.95, you can conclude that X causes Y. (False. Observational data cannot establish causation regardless of how strong the correlation is.)

  1. True or false: The F-test for regression and the two-sided t-test for beta_1 = 0 always produce the same p-value. (True.)

  1. Fill in the blank: The confidence interval for beta_1 is b1 plus or minus ______ times SE_b1. (t_(alpha/2, n-2))


Practice Q&A

Q: From R output, you read b1 = 3.2, SE_b1 = 0.8, and n = 22. Construct a 95% confidence interval for beta_1.

A: df = 22 - 2 = 20. The critical value t_(0.025, 20) is approximately 2.086. The interval is 3.2 plus or minus 2.086 * 0.8 = 3.2 plus or minus 1.669, giving (1.531, 4.869).

Q: A regression model predicts test score from hours of sleep. A student asks: "What score will I get if I sleep 7 hours tonight?" Should you use a confidence interval or a prediction interval?

A: A prediction interval, because the student is asking about the score for a single individual, not the average score for everyone who sleeps 7 hours.

Q: A study finds a strong positive correlation between ice cream sales and drowning deaths. Can you conclude that ice cream sales cause drownings?

A: No. This is an observational association. A confounding variable (temperature or season) likely explains both. When it is hot, people buy more ice cream and more people swim, leading to more drownings. You cannot establish causation from observational data.

Q: The regression of weight (Y) on height (X) is fit using data from adults aged 20 to 60 with heights ranging from 150 cm to 195 cm. A colleague asks you to predict the weight of a child who is 120 cm tall. Is this appropriate?

A: No. X = 120 cm is outside the observed range (150 to 195 cm), so this is extrapolation. The linear relationship established for adults may not hold for children.

Q: You have a one-sample proportion problem, a two-sample mean comparison, and a regression problem. How do you tell them apart?

A: Count the variables and their types. One categorical variable with a proportion of interest: one-sample proportion test. One quantitative response with two groups: two-sample t-test. Two quantitative variables with a linear relationship: regression.


Connections to Other Topics

The regression F-test is structurally identical to the one-way ANOVA F-test from Chapter 11: both compare explained variation to unexplained variation. The t-test for the slope connects to the one-sample and two-sample t-tests from earlier in the course, using the same four-step procedure. Confidence and prediction intervals extend the confidence interval logic you learned for means and proportions. The general inference objectives (41 to 44) tie the entire course together by asking you to recognise which tool fits which scenario.


Related Terms / Search Tags

model utility test, F-test for regression, t-test for slope, beta_1, SE_b1, standard error of slope, confidence interval for slope, confidence interval for mean response, prediction interval, mean response, individual prediction, extrapolation, causality, causation, confounding variable, observational study, experiment, random assignment, generalisation, generalizability, Type I error, Type II error, practical consequences, inference method selection, one-sample test, two-sample test, ANOVA, regression, STAT 301, Purdue, intro stats