Mathematics > Statistics > Hypothesis Testing
Hypothesis testing is a fundamental method in statistics used to make decisions or inferences about a population parameter based on sample data. It involves formulating two competing hypotheses: the null hypothesis (\(H_0\)) and the alternative hypothesis (\(H_a\)).
Null Hypothesis (\(H_0\)): This is a statement that there is no effect or no difference, and it serves as the statement to be tested. For example, if we are testing whether a new drug is effective, the null hypothesis could be that the drug has no effect on patients.
Alternative Hypothesis (\(H_a\)): This is a statement that indicates the presence of an effect or difference. Continuing with the drug example, the alternative hypothesis would be that the drug does have an effect on patients.
Steps in Hypothesis Testing
Formulate Hypotheses: Clearly state the null and alternative hypotheses. For instance:
\[
H_0: \mu = \mu_0
\]
\[
H_a: \mu \neq \mu_0
\]
where \(\mu\) represents the population mean and \(\mu_0\) represents the hypothesized population mean.Select a Significance Level (\(\alpha\)): This is the probability of rejecting the null hypothesis when it is actually true. Common choices for \(\alpha\) include 0.05, 0.01, and 0.10.
Choose the Test Statistic: Depending on the nature of the data and the hypotheses, different test statistics like the z-test, t-test, chi-square test, or F-test can be chosen. For instance, for large sample sizes where the population standard deviation is known, a z-test might be appropriate:
\[
z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}
\]
where \(\bar{x}\) is the sample mean, \(\sigma\) is the population standard deviation, and \(n\) is the sample size.Determine the Critical Region: Identify the region in the distribution of the test statistic that would lead to rejection of \(H_0\). This region is based on the chosen \(\alpha\).
Compute the Test Statistic: Calculate the value of the test statistic using the sample data.
Make a Decision: Compare the calculated test statistic to the critical value(s). If the test statistic falls within the critical region, reject \(H_0\). Otherwise, do not reject \(H_0\).
Conclusion: Interpret the results within the context of the research question. Rejecting \(H_0\) implies there is sufficient evidence to support \(H_a\), while failing to reject \(H_0\) suggests there is not enough evidence to support \(H_a\).
Types of Errors
- Type I Error: Occurs when the null hypothesis is rejected when it is actually true. The probability of a Type I error is denoted by \(\alpha\).
- Type II Error: Occurs when the null hypothesis is not rejected when it is actually false. The probability of a Type II error is denoted by \(\beta\).
Sample Application
Consider a factory that produces light bulbs, and the company claims the average lifespan of these bulbs is 2,000 hours. To test this claim, a sample of 30 bulbs is taken, and if \(\bar{x}\) is found to be 1,950 hours with a standard deviation \(\sigma\) of 120 hours, a hypothesis test can be constructed as follows:
- Null Hypothesis: \(H_0: \mu = 2000\)
- Alternative Hypothesis: \(H_a: \mu \neq 2000\)
- Significance Level: \(\alpha = 0.05\)
Using the z-test:
\[
z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}} = \frac{1950 - 2000}{120 / \sqrt{30}} \approx -2.29
\]
For \(\alpha = 0.05\), the critical z-values are approximately \(\pm 1.96\). Since \(-2.29\) lies outside the range \([-1.96, 1.96]\), the null hypothesis is rejected, providing evidence that the average lifespan of the bulbs differs significantly from 2,000 hours.
In summary, hypothesis testing provides a structured approach to testing assumptions and making decisions based on statistical data. It is widely used in various fields, including science, medicine, economics, and social sciences, to test theories and validate empirical findings.