Source: MATH 399N Statistics Discussions, Weeks 7–8 | Arizona State University
Tags: hypothesis testing, null hypothesis, alternative hypothesis, t-test, two-sample t-test, significance level, p-value, correlation, regression, r-squared, scatter plot, independent variable, dependent variable, MATH 399N
Difficulty: Intermediate | Prerequisites: Weeks 1–6 notes (mean, standard deviation, z-scores, confidence intervals)
Week 7 is where the course moves from describing data to drawing conclusions about populations. Hypothesis testing provides a structured framework for deciding whether observed differences (between groups, between a sample and a claimed value) are statistically significant or could have happened by chance. Week 8 introduces correlation and linear regression, which measure and model the relationship between two variables. Together, these weeks complete the core toolkit of introductory statistics: you can now describe data, estimate population parameters, test claims, and predict outcomes.
Hypothesis testing follows a fixed procedure: state null and alternative hypotheses, choose a significance level, compute a test statistic, compare it to a critical value, and draw a conclusion. Correlation measures the strength and direction of a linear relationship between two variables (r), while regression gives you an equation (y = mx + b) to predict one variable from another.
Null hypothesis (H₀)
The default claim that there is no effect, no difference, or no relationship. Think of it as the "nothing special is happening" position.
Alternative hypothesis (Hₐ or H₁)
The claim you are testing for: that there is a difference, an effect, or a relationship. This is what you suspect is true.
Significance level (α)
The threshold for rejecting the null hypothesis, typically set at 0.05 (5%). If the probability of observing your data under H₀ is below α, you reject H₀.
Test statistic
A standardised value (such as a t-score or z-score) calculated from sample data, used to decide whether to reject H₀.
Critical value
The boundary value of the test statistic beyond which you reject H₀. It depends on α and whether the test is one-tailed or two-tailed.
Two-tailed test
A hypothesis test that checks for a difference in either direction (greater or less than). Used when H₁ states the means are "not equal."
One-tailed test (left or right)
A test that checks for a difference in only one direction. A left-tailed test checks if the value is less than the hypothesised value; a right-tailed test checks if it is greater.
Pooled standard deviation
A weighted average of the standard deviations from two samples, used in two-sample t-tests when equal variances are assumed.
Correlation coefficient (r)
A value between −1 and +1 that measures the strength and direction of a linear relationship between two variables. +1 is a perfect positive relationship; −1 is a perfect negative one; 0 is no linear relationship.
Coefficient of determination (r² or R²)
The proportion of variation in the dependent variable that is explained by the independent variable. An R² of 0.836 means 83.6% of the variation in Y is explained by X.
Regression line (least-squares line)
The line of best fit through a scatter plot, expressed as y = mx + b, used to predict the dependent variable from the independent variable.
Independent variable (X)
The predictor or explanatory variable in a regression. It is the variable you believe influences the outcome.
Dependent variable (Y)
The outcome or response variable. It is the variable you are trying to predict or explain.
State the null hypothesis (H₀) and the alternative hypothesis (Hₐ). H₀ is always the "no difference" or "no effect" claim.
Choose a significance level (α), typically 0.05.
Determine whether the test is left-tailed, right-tailed, or two-tailed based on the wording of Hₐ.
Calculate the test statistic from the sample data.
Find the critical value from the appropriate table (t-table or z-table) using α and the degrees of freedom.
Compare the test statistic to the critical value. If the test statistic falls in the critical region, reject H₀. Otherwise, fail to reject H₀.
State your conclusion in plain language, in context.
Dataset: miles per gallon (MPG) for U.S. cars (n = 249, mean = 20.14, SD = 6.41) and Japanese cars (n = 79, mean = 30.48, SD = 6.11).
H₀: μ₁ = μ₂ (the population means are equal). Hₐ: μ₁ ≠ μ₂ (they are different). This is a two-tailed test.
Pooled standard deviation: sp = 6.34.
Test statistic: T = −12.62.
Critical value at α = 0.05 (two-tailed): t = 1.9673.
Decision: |T| = 12.62 > 1.9673, so reject H₀.
Conclusion: there is sufficient evidence at the 0.05 level to conclude that U.S. and Japanese cars have different average fuel efficiency.
Correlation measures the strength and direction of a linear relationship between two numerical variables.
Positive correlation: as X increases, Y increases. Negative correlation: as X increases, Y decreases.
The correlation coefficient r ranges from −1 to +1. Values close to ±1 indicate a strong linear relationship; values near 0 indicate a weak one.
Example: mortality rates for heart disease among men (X) and women (Y) across ethnic groups showed a strong positive correlation with R² = 0.836, meaning 83.6% of the variation in women's rates is explained by the corresponding men's rates.
The regression line is the equation y = mx + b that best fits the scatter plot.
Example: y = 0.95x − 0.78, where x is the male mortality rate and y is the predicted female mortality rate.
The slope (0.95) means that for each 1-percentage-point increase in the male rate, the female rate increases by about 0.95 percentage points.
Use the regression equation to make predictions, but only within the range of the original data (interpolation). Predictions far outside that range (extrapolation) are unreliable.
R² tells you how well the line fits: 0.836 means a good fit. An R² of 1.0 would be a perfect fit.
t = \frac{\bar{x}_1 - \bar{x}_2}{s_p \sqrt{\frac{1}{n_1} + \frac{1}{n_2}}}Two-sample t-test statistic, where sp is the pooled standard deviation.
s_p = \sqrt{\frac{(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2}{n_1 + n_2 - 2}}Pooled standard deviation for two samples (assuming equal variances).
r = \frac{n \sum xy - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2][n \sum y^2 - (\sum y)^2]}}Pearson correlation coefficient.
\hat{y} = mx + bLinear regression (least-squares) line, where m is the slope and b is the y-intercept.
R^2 = r^2Coefficient of determination: the square of the correlation coefficient.
Hypothesis testing is used in clinical trials to determine whether a new drug performs differently from a placebo. Manufacturers use two-sample t-tests to compare product quality across factories. Regression analysis is used in epidemiology to predict disease outcomes based on risk factors, and in business to forecast sales based on advertising spend.
Students often say "accept H₀" when they fail to reject it. The correct phrasing is "fail to reject H₀." You never prove the null is true; you only conclude there is insufficient evidence against it.
Correlation does not imply causation. A strong correlation between X and Y does not prove that X causes Y. There may be a confounding variable or the relationship may be coincidental.
Students sometimes interpret the slope of a regression line as a percentage or a probability. The slope is the predicted change in Y for a one-unit change in X, nothing more.
Using a regression equation to predict values far outside the range of the original data (extrapolation) is unreliable and a common error.
⚠️ You will be asked to set up and interpret a hypothesis test. Know all seven steps and be able to state the conclusion in context.
⚠️ Be clear on the difference between one-tailed and two-tailed tests. The phrasing of the alternative hypothesis determines which you use.
⚠️ Know how to interpret r and R². An R² of 0.836 means 83.6% of the variation in Y is explained by X. The remaining 16.4% is unexplained.
⚠️ "Fail to reject H₀" is not the same as "accept H₀." Exams frequently penalise incorrect wording.
⚠️ Be prepared to write a regression equation from given data and use it to make a prediction within the data range.
True or False: "Accepting H₀" is correct statistical language. Answer: False. The proper phrase is "fail to reject H₀."
Fill in the blank: A two-tailed test is used when the alternative hypothesis states the means are ______. Answer: not equal.
True or False: An R² value of 0.10 indicates a strong correlation. Answer: False. It means only 10% of the variation in Y is explained by X.
Fill in the blank: The slope of the regression line y = 0.95x − 0.78 means that for each 1-unit increase in X, Y increases by ______. Answer: 0.95 units.
True or False: Correlation proves causation. Answer: False.
Q: Two groups of patients are tested. Group A (n = 50, mean = 82, SD = 10) and Group B (n = 50, mean = 78, SD = 12). State the null and alternative hypotheses for a two-tailed test.
A: H₀: μA = μB (the population means are equal). Hₐ: μA ≠ μB (they are different).
Q: If the test statistic is T = 3.45 and the critical value is 1.984, what is your decision?
A: |T| = 3.45 > 1.984, so the test statistic falls in the critical region. Reject H₀. There is sufficient evidence at the chosen significance level to conclude the means are different.
Q: A scatter plot shows that as study hours increase, exam scores increase. What type of correlation is this?
A: Positive correlation. Both variables move in the same direction.
Q: A regression equation is y = 2.3x + 15. If x = 10, what is the predicted value of y?
A: y = 2.3(10) + 15 = 23 + 15 = 38.
Q: What does an R² of 0.64 tell you?
A: 64% of the variation in the dependent variable is explained by the independent variable. The remaining 36% is due to other factors or random variation.
Hypothesis testing brings together everything from earlier weeks: the mean and standard deviation (Weeks 1–2), probability (Weeks 3–4), z-scores and the normal distribution (Week 5), and confidence intervals (Week 6). Correlation and regression extend the course from comparing groups to modelling relationships, a skill that is foundational in more advanced statistics, data science, and research methods courses.
hypothesis test, null hypothesis, alternative hypothesis, H₀, Hₐ, significance level, alpha, t-test, two-sample t-test, pooled standard deviation, critical value, critical region, reject, fail to reject, one-tailed, two-tailed, correlation, Pearson r, R-squared, coefficient of determination, regression, least-squares line, slope, intercept, scatter plot, independent variable, dependent variable, predictor, response, extrapolation, interpolation, MATH 399N, inferential statistics