Hypothesis Testing
Null, Alternative, p-Value & Decision
Related Labs
Hypothesis testing is a statistical method for using sample data to evaluate a claim about a population. It helps scientists, doctors, engineers, and social researchers decide whether an observed effect is likely real or could have happened by random chance alone. The process gives a structured way to compare evidence against a default assumption. This makes conclusions more consistent and transparent.
In a hypothesis test, you begin with a null hypothesis that represents no effect or no difference, and an alternative hypothesis that represents the claim you want to investigate. After choosing a significance level alpha, you calculate a test statistic from the sample and use it to find a p-value. The p-value measures how unusual the sample result would be if the null hypothesis were true. If the p-value is small enough, you reject the null hypothesis; otherwise, you fail to reject it.
Key Facts
- Null hypothesis H0 usually states no difference, no effect, or a specific population value.
- Alternative hypothesis Ha states the competing claim, such as mu != mu0, mu > mu0, or mu < mu0.
- Decision rule: reject H0 if p-value <= alpha; otherwise fail to reject H0.
- A common significance level is alpha = 0.05, which is the probability of a Type I error.
- For a z test of a mean, z = (xbar - mu0) / (sigma / sqrt(n)).
- For a one-sample t test, t = (xbar - mu0) / (s / sqrt(n)).
Vocabulary
- Null hypothesis
- The starting claim that there is no effect, no difference, or no change in the population.
- Alternative hypothesis
- The competing claim that says there is an effect, a difference, or a change.
- p-value
- The probability of getting a result at least as extreme as the sample result if the null hypothesis is true.
- Significance level
- The cutoff probability alpha used to decide when evidence is strong enough to reject the null hypothesis.
- Test statistic
- A standardized number computed from sample data that measures how far the sample result is from what the null hypothesis predicts.
Common Mistakes to Avoid
- Saying the p-value is the probability that H0 is true, which is wrong because the p-value assumes H0 is true and measures the probability of the observed data or more extreme data.
- Writing reject H0 when p-value > alpha, which is wrong because results larger than alpha do not provide enough evidence against the null hypothesis.
- Confusing fail to reject H0 with proving H0 true, which is wrong because the test may simply lack enough evidence or sample size to detect a real effect.
- Choosing a one-tailed test after looking at the data, which is wrong because the direction of the test must be set before analysis to avoid biased conclusions.
Practice Questions
- 1 A factory claims the mean battery life is 20 hours. A sample of 36 batteries has mean 18.8 hours. Assume sigma = 3 hours and test H0: mu = 20 versus Ha: mu < 20 at alpha = 0.05. Compute the z statistic and state the decision using the critical value method or p-value method.
- 2 A school tests whether a new tutoring program changes average test scores. For 25 students, the sample mean is 78, the hypothesized mean is 74, and the sample standard deviation is 10. Test H0: mu = 74 versus Ha: mu != 74 at alpha = 0.05 using a one-sample t test. Compute the t statistic and state whether to reject H0.
- 3 A study reports p-value = 0.08 for a test conducted at alpha = 0.05. Explain what decision should be made and why this does not mean the null hypothesis has been proven true.