Solved Exercises on Hypothesis Test for Regression Slope

Master hypothesis tests for regression slope: t-tests, significance testing, and interpretation through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Basic Two-Tailed Test
Exercise 1
A researcher studied the relationship between study hours and exam scores for 20 students. The regression equation is ŷ = 55.2 + 3.4x, with standard error of slope SE_b = 0.8. Test at α = 0.05 whether there is a significant linear relationship between hours studied and exam scores.
Definition:

Regression slope test: A t-test to determine if the population slope is significantly different from zero, indicating a linear relationship.

Hypothesis Testing Methodology:
  1. State null and alternative hypotheses
  2. Calculate test statistic: t = (b - β₀) / SE_b
  3. Determine degrees of freedom: df = n - 2
  4. Find critical value or p-value
  5. Make decision to reject or fail to reject H₀
  6. Draw conclusion in context
Step 1: State hypotheses

H₀: β = 0 (no linear relationship)

H₁: β ≠ 0 (linear relationship exists)

Step 2: Calculate test statistic

t = (b - β₀) / SE_b = (3.4 - 0) / 0.8 = 4.25

Step 3: Determine degrees of freedom

df = n - 2 = 20 - 2 = 18

Step 4: Find critical value

For α = 0.05, two-tailed test, df = 18

t_critical = ±2.101

Step 5: Make decision

|t| = 4.25 > 2.101, so we reject H₀

Step 6: Draw conclusion

There is sufficient evidence to conclude that there is a significant linear relationship between hours studied and exam scores.

t = 4.25, df = 18, reject H₀ at α = 0.05
Final answer:

We reject the null hypothesis. There is sufficient evidence to conclude that there is a significant linear relationship between hours studied and exam scores at α = 0.05.

Applied rules:

• Test statistic: t = (sample slope - hypothesized slope) / standard error

• Degrees of freedom: df = n - 2 for simple linear regression

• Decision rule: Reject H₀ if |t| > critical value

Test interpretation:

• The observed slope of 3.4 is significantly different from 0

• The relationship is statistically significant

• Each additional hour of study increases exam score by approximately 3.4 points

2 Right-Tailed Test
Exercise 2
A nutritionist claims that daily calorie intake has a positive effect on weight gain. With n = 18, the regression showed: ŷ = 65.2 + 0.08x, SE_b = 0.03. Test at α = 0.01 whether calorie intake positively affects weight gain.
Definition:

Right-tailed test: A hypothesis test where the alternative hypothesis specifies that the parameter is greater than the null value.

Step 1: State hypotheses

H₀: β ≤ 0 (calorie intake has no positive effect or negative effect)

H₁: β > 0 (calorie intake has positive effect)

Step 2: Calculate test statistic

t = (b - β₀) / SE_b = (0.08 - 0) / 0.03 = 2.67

Step 3: Determine degrees of freedom

df = n - 2 = 18 - 2 = 16

Step 4: Find critical value

For α = 0.01, right-tailed test, df = 16

t_critical = 2.583

Step 5: Make decision

t = 2.67 > 2.583, so we reject H₀

Step 6: Draw conclusion

There is sufficient evidence to support the claim that calorie intake positively affects weight gain.

t = 2.67 > 2.583, reject H₀
Final answer:

We reject the null hypothesis. There is sufficient evidence at α = 0.01 to conclude that daily calorie intake has a positive effect on weight gain.

Applied rules:

• Right-tailed test: Critical value is only on the positive side

• Directional hypothesis: Specifies positive relationship

• Decision rule: Reject H₀ if t > critical value

Test interpretation:

• The slope of 0.08 is significantly greater than 0

• Each additional calorie increases weight by approximately 0.08 units

• The relationship is positive and statistically significant

3 Left-Tailed Test
Exercise 3
A researcher hypothesizes that increased screen time negatively affects sleep quality. With n = 25, the regression showed: ŷ = 85.3 - 0.42x, SE_b = 0.15. Test at α = 0.05 whether screen time negatively affects sleep quality.
Definition:

Left-tailed test: A hypothesis test where the alternative hypothesis specifies that the parameter is less than the null value.

Step 1: State hypotheses

H₀: β ≥ 0 (screen time has no negative effect or positive effect)

H₁: β < 0 (screen time has negative effect)

Step 2: Calculate test statistic

t = (b - β₀) / SE_b = (-0.42 - 0) / 0.15 = -2.80

Step 3: Determine degrees of freedom

df = n - 2 = 25 - 2 = 23

Step 4: Find critical value

For α = 0.05, left-tailed test, df = 23

t_critical = -1.714

Step 5: Make decision

t = -2.80 < -1.714, so we reject H₀

Step 6: Draw conclusion

There is sufficient evidence to support the claim that screen time negatively affects sleep quality.

t = -2.80 < -1.714, reject H₀
Final answer:

We reject the null hypothesis. There is sufficient evidence at α = 0.05 to conclude that increased screen time negatively affects sleep quality.

Applied rules:

• Left-tailed test: Critical value is only on the negative side

• Negative slope: Indicates inverse relationship

• Decision rule: Reject H₀ if t < critical value

Test interpretation:

• The slope of -0.42 is significantly less than 0

• Each additional hour of screen time decreases sleep quality by approximately 0.42 units

• The relationship is negative and statistically significant

Key Formulas and Concepts
\( t = \frac{b - \beta_0}{SE_b} \)
T-Test for Regression Slope
Standard Error
\( SE_b = \frac{s}{s_x\sqrt{n-1}} \)
Standard error of slope
Degrees of Freedom
\( df = n - 2 \)
For simple linear regression
Test Statistic
\( t = \frac{b - \beta_0}{SE_b} \)
Follows t-distribution
Key definitions:

Population slope (β): The true slope parameter in the population regression line.

Sample slope (b): The estimated slope from the sample data.

Standard error of slope (SE_b): Measures the variability of the slope estimate.

Simple linear regression: A model that relates one independent variable to one dependent variable using a straight line.

Type I error: Rejecting the null hypothesis when it is actually true (false positive).

Type II error: Failing to reject the null hypothesis when it is actually false (false negative).

Complete Hypothesis Testing Methodology:
  1. Verify conditions: Check linearity, independence, normality, and equal variance
  2. State hypotheses: Define H₀ and H₁ about the population slope
  3. Choose significance level: Select α (typically 0.05 or 0.01)
  4. Calculate test statistic: Use t = (b - β₀) / SE_b
  5. Determine degrees of freedom: df = n - 2
  6. Find critical value or p-value
  7. Make decision: Compare test statistic with critical value
  8. Draw conclusion: Interpret in context of the research question
Tip 1: Always check regression assumptions before conducting hypothesis tests.
Tip 2: The t-distribution is used because the population standard deviation is unknown.
Tip 3: A significant slope means there's a linear relationship, not necessarily causation.
Tip 4: The sign of the slope indicates the direction of the relationship.
Tip 5: Consider both statistical and practical significance when interpreting results.
Common errors: Forgetting to check assumptions, misinterpreting p-values, confusing correlation with causation, using wrong degrees of freedom.
Exam preparation: Know the formula for t-statistic, understand df = n-2, practice interpretation of different test types.
Decision rules:

• Two-tailed: Reject H₀ if |t| > t_critical

• Right-tailed: Reject H₀ if t > t_critical

• Left-tailed: Reject H₀ if t < t_critical

• P-value approach: Reject H₀ if p-value ≤ α

Important considerations:

• Hypothesis tests only indicate statistical significance, not practical importance

• Large samples can make trivial differences significant

• Outliers can greatly influence the regression line and test results

• Always plot the data to visually assess the linear relationship

Solution: Exercises 4 to 5
4 P-Value Approach
Exercise 4
A study of 30 students found: ŷ = 42.1 + 1.8x, SE_b = 0.65. Test at α = 0.05 whether the slope differs from 1.0 using the p-value approach.
Definition:

P-value approach: Compare the p-value with the significance level α to make a decision, rather than using critical values.

Step 1: State hypotheses

H₀: β = 1.0

H₁: β ≠ 1.0

Step 2: Calculate test statistic

t = (b - β₀) / SE_b = (1.8 - 1.0) / 0.65 = 1.23

Step 3: Determine degrees of freedom

df = n - 2 = 30 - 2 = 28

Step 4: Find p-value

This is a two-tailed test

p-value = 2 × P(T > |1.23|) = 2 × P(T > 1.23)

Using t-table with df = 28: p-value ≈ 0.229

Step 5: Make decision

p-value = 0.229 > α = 0.05

We fail to reject H₀

Step 6: Draw conclusion

There is insufficient evidence to conclude that the slope differs from 1.0.

p-value = 0.229 > 0.05, fail to reject H₀
Final answer:

We fail to reject the null hypothesis. There is insufficient evidence at α = 0.05 to conclude that the slope differs from 1.0.

Applied rules:

• P-value method: Compare p-value with α

• Decision rule: Reject H₀ if p-value ≤ α

• Two-tailed test: Multiply probability by 2

5 Testing Against Specific Value
Exercise 5
A researcher believes that the relationship between exercise and health scores should be at least 0.5 units. A sample of 22 individuals showed: ŷ = 68.2 + 0.68x, SE_b = 0.12. Test at α = 0.05 whether the slope is significantly greater than 0.5.
Definition:

Testing against specific value: Testing whether the slope equals or differs from a specific theoretical or historical value.

Step 1: State hypotheses

H₀: β ≤ 0.5

H₁: β > 0.5

Step 2: Calculate test statistic

t = (b - β₀) / SE_b = (0.68 - 0.5) / 0.12 = 0.18 / 0.12 = 1.50

Step 3: Determine degrees of freedom

df = n - 2 = 22 - 2 = 20

Step 4: Find critical value

For α = 0.05, right-tailed test, df = 20

t_critical = 1.725

Step 5: Make decision

t = 1.50 < 1.725

We fail to reject H₀

Step 6: Draw conclusion

There is insufficient evidence to conclude that the slope is significantly greater than 0.5.

t = 1.50 < 1.725, fail to reject H₀
Final answer:

We fail to reject the null hypothesis. There is insufficient evidence at α = 0.05 to conclude that the slope is significantly greater than 0.5.

Applied rules:

• Specific value test: Compare slope to theoretical value

• Directional test: Right-tailed for "greater than"

• Decision rule: Reject H₀ if t > critical value

Detailed Concepts and Applications
\( SE_b = \frac{s}{s_x\sqrt{n-1}} = \frac{\sqrt{\frac{\sum(y-\hat{y})^2}{n-2}}}{\sqrt{\sum(x-\bar{x})^2}} \)
Standard Error of Slope Formula
Key definitions:

Linear regression: A statistical method that models the relationship between a dependent variable and one or more independent variables using a linear equation.

Population regression line: The true linear relationship in the population: μ_y = α + βx.

Sample regression line: The estimated relationship from sample data: ŷ = a + bx.

Residuals: The differences between observed and predicted values: e_i = y_i - ŷ_i.

Sampling distribution: The distribution of all possible values of the sample slope across different samples.

Statistical significance: When the p-value is less than or equal to the significance level, indicating evidence against the null hypothesis.

Practical significance: Whether the observed effect is meaningful in the real world, regardless of statistical significance.

Advanced Testing Methodology:
  1. Model verification: Confirm that linear regression assumptions are met
  2. Parameter extraction: Obtain slope estimate and its standard error from regression output
  3. Hypothesis formulation: Define appropriate null and alternative hypotheses
  4. Significance level selection: Choose α based on consequences of Type I error
  5. Degree of freedom calculation: df = n - 2 for simple regression
  6. Test statistic calculation: Apply t-statistic formula correctly
  7. Critical value or p-value: Determine based on test type and α
  8. Decision making: Apply correct decision rule
  9. Contextual interpretation: State results in terms of the original research question
  10. Practical assessment: Evaluate whether results have real-world significance
Tip 1: The standard error of the slope decreases as sample size increases, making tests more powerful.
Tip 2: A larger absolute value of the t-statistic provides stronger evidence against the null hypothesis.
Tip 3: Outliers can significantly affect both the slope estimate and the test results.
Tip 4: Always verify regression assumptions before conducting hypothesis tests.
Tip 5: Consider both statistical significance and practical importance when interpreting results.
Common applications: Economics, psychology, medicine, engineering, social sciences, business analytics, and policy evaluation.
Limitations: Assumes linear relationship, sensitive to outliers, cannot prove causation, requires valid assumptions, may not generalize beyond data range.
Key formulas and rules:

• Test statistic: t = (b - β₀) / SE_b

• Degrees of freedom: df = n - 2

• Standard error: SE_b = s/[s_x√(n-1)]

• Decision rule: Reject H₀ if |t| > t_critical (two-tailed)

• P-value approach: Reject H₀ if p-value ≤ α

Additional considerations:

• The t-distribution approaches normal distribution as sample size increases

• Multiple regression extends these concepts to multiple predictors

• Power analysis can help determine required sample size

• Effect size measures complement significance testing

Questions & Answers

Question: Why do we use the t-distribution instead of the z-distribution when testing the regression slope?

Answer: We use the t-distribution for regression slope tests for several key reasons:

  • Unknown population standard deviation: In regression, we estimate the standard deviation of the residuals (σ) using the sample standard deviation (s), introducing additional uncertainty
  • Estimation of standard error: The standard error of the slope (SE_b) is estimated from the data, not known exactly
  • Small sample sizes: The t-distribution accounts for the extra variability when the sample size is small

The t-distribution has heavier tails than the z-distribution, which provides more conservative estimates when dealing with estimated standard errors. As the sample size increases, the t-distribution approaches the z-distribution.

In regression inference, we're estimating both the mean response and the variability around that mean, which requires using the t-distribution with df = n - 2 degrees of freedom.

This is similar to why we use t-tests for means when the population standard deviation is unknown, rather than z-tests.

Question: What's the difference between testing if the slope equals zero versus testing if it equals some other value?

Answer: Testing whether the slope equals zero versus another value serves different purposes:

  • Testing β = 0: Tests whether there is any linear relationship between x and y (most common test)
  • Testing β = β₀ (where β₀ ≠ 0): Tests whether the slope equals a specific theoretical or historical value

The test statistic formula remains the same: t = (b - β₀) / SE_b

For example, if theory predicts that each unit increase in x should increase y by 2 units, you might test H₀: β = 2 vs H₁: β ≠ 2.

Testing β = 0 is equivalent to testing whether the correlation coefficient ρ = 0, which determines if there's a significant linear relationship.

Testing against a non-zero value is useful when you want to compare your observed slope to a benchmark or theoretical expectation.

The interpretation changes: rejecting β = 0 means there's a relationship; rejecting β = β₀ means the slope differs from the specific value β₀.

Question: How do I interpret the results of a hypothesis test for regression slope in practical terms?

Answer: Interpreting regression slope hypothesis tests involves several practical considerations:

  • Statistical significance: If you reject H₀: β = 0, there's evidence of a linear relationship between x and y
  • Direction of relationship: The sign of the slope indicates whether x and y move together (+) or in opposite directions (-)
  • Magnitude of effect: The absolute value of the slope shows how much y changes per unit change in x

For example, if you find a significant positive slope of 2.5, you can say that for every one-unit increase in x, y increases by approximately 2.5 units, and this relationship is statistically significant.

However, statistical significance doesn't imply practical importance. A slope of 0.001 might be statistically significant with a large sample, but practically negligible.

Also, remember that correlation doesn't imply causation. A significant slope indicates association, not necessarily causation.

Consider the context: Does the magnitude of the relationship make sense? Is it economically, medically, or practically meaningful?

Always report both the statistical finding and its practical interpretation in the context of your specific application.