Hypothesis testing is a statistical method used to make inferences about a population based on sample data. It evaluates whether there is enough evidence to support or reject a specific claim about a population parameter.
-
Null Hypothesis (
$H_0$ )
The default assumption that there is no effect or difference.- Example:
$H_0: \mu = 50$ (The population mean is 50).
- Example:
-
Alternative Hypothesis (
$H_a$ )
The statement being tested, representing a potential effect or difference.- Example:
$H_a: \mu \neq 50$ (The population mean is not 50).
- Example:
-
Significance Level (
$\alpha$ )
The threshold for rejecting the null hypothesis, typically set at 0.05 (5%). -
Test Statistic
A value calculated from the sample data used to compare with the critical value or p-value. -
P-Value
The probability of observing a test statistic as extreme as, or more extreme than, the one observed, assuming$H_0$ is true. -
Decision Rule
- Reject
$H_0$ if$p$ -value$\leq \alpha$ . - Fail to reject
$H_0$ if$p$ -value$> \alpha$ .
- Reject
-
State the Hypotheses:
- Null hypothesis (
$H_0$ ) - Alternative hypothesis (
$H_a$ )
- Null hypothesis (
-
Set the Significance Level (
$\alpha$ ):
Common values are 0.01, 0.05, or 0.10. -
Choose the Test and Calculate the Test Statistic:
Select the appropriate test (e.g.,$t$ -test,$z$ -test) based on data type and sample size. -
Find the P-Value or Critical Value:
Compare the test statistic to the critical value or use the$p$ -value approach. -
Make a Decision:
- Reject
$H_0$ if there is sufficient evidence. - Fail to reject
$H_0$ if there is insufficient evidence.
- Reject
-
Draw a Conclusion:
State the results in the context of the problem.
- Tests if a parameter is greater than or less than a specific value.
- Example:
$H_0: \mu \leq 50, , H_a: \mu > 50$
- Tests if a parameter is not equal to a specific value.
- Example:
$H_0: \mu = 50, , H_a: \mu \neq 50$
-
Z-Test
- Used for large sample sizes (
$n > 30$ ) or when population variance is known. - Example: Testing if the mean height of students differs from 170 cm.
- Used for large sample sizes (
-
T-Test
- Used for small sample sizes (
$n \leq 30$ ) or when population variance is unknown. - Types: One-sample
$t$ -test, two-sample$t$ -test, paired$t$ -test.
- Used for small sample sizes (
-
Chi-Square Test
- Used for categorical data to test relationships or goodness of fit.
- Example: Testing if the observed frequencies of colors in candy bags match the expected proportions.
-
ANOVA (Analysis of Variance)
- Used to compare means across three or more groups.
- Example: Testing if the average test scores differ across schools.
A company claims the average lifetime of its batteries is 300 hours. A random sample of 25 batteries has a mean lifetime of 290 hours with a standard deviation of 20 hours. Is there evidence at the 0.05 significance level to reject the company’s claim?
-
State the Hypotheses:
$H_0: \mu = 300$ ,$H_a: \mu \neq 300$ -
Set the Significance Level:
$\alpha = 0.05$ -
Calculate the Test Statistic:
$$t = \frac{\bar{x} - \mu}{\frac{s}{\sqrt{n}}} = \frac{290 - 300}{\frac{20}{\sqrt{25}}} = \frac{-10}{4} = -2.5$$ -
Find the Critical Value or P-Value:
From$t$ -distribution tables, critical$t$ -value at$\alpha = 0.05$ (two-tailed,$df = 24$ ) is approximately$\pm 2.064$ . -
Decision:
Since$-2.5 < -2.064$ , reject$H_0$ . -
Conclusion:
There is sufficient evidence to reject the claim that the average battery lifetime is 300 hours.
- Healthcare: Testing the effectiveness of new treatments.
- Business: Comparing customer satisfaction between two products.
- Education: Evaluating the impact of new teaching methods.
Hypothesis testing is a powerful tool for making data-driven decisions. By systematically evaluating claims and interpreting results, it enables researchers and decision-makers to draw reliable conclusions.
Next Steps: Simple Linear Regression