Xirius-HYPOTHESIS9-STA209229.pdf
Xirius AI
This document, titled "Xirius-HYPOTHESIS9-STA209229.pdf," serves as a comprehensive guide to hypothesis testing, a fundamental statistical method used in courses like STA209/229. It meticulously outlines the principles, steps, and various types of hypothesis tests, ranging from parametric tests for means, proportions, and variances to non-parametric alternatives and chi-square tests for categorical data. The primary objective of the document is to equip students with a thorough understanding of how to make data-driven inferences about population parameters based on sample statistics.
The document begins by establishing the core concepts of hypothesis testing, including the formulation of null and alternative hypotheses, the role of significance levels, and the potential for Type I and Type II errors. It then systematically delves into specific test procedures, providing the appropriate test statistics, decision rules, and illustrative examples for each scenario. This structured approach ensures that learners can apply the correct statistical test based on the nature of their data (e.g., large vs. small samples, known vs. unknown variances, paired vs. independent samples) and the research question at hand.
Furthermore, the PDF extends its coverage beyond traditional parametric tests to include a robust section on non-parametric methods, which are crucial when assumptions about population distributions (like normality) cannot be met. It also details tests for correlation and association, such as Spearman's rank correlation and chi-square tests for goodness-of-fit and independence. Each test is accompanied by a practical example that walks through the calculation and interpretation steps, making complex statistical concepts accessible and actionable for students.
MAIN TOPICS AND CONCEPTS
Hypothesis testing is a statistical method used to make inferences about population parameters based on sample data. It involves a systematic procedure to evaluate claims or theories about a population.
* Key Steps in Hypothesis Testing:
1. State the Null Hypothesis ($H_0$) and Alternative Hypothesis ($H_1$): $H_0$ is a statement of no effect or no difference, while $H_1$ is what the researcher wants to prove.
2. Choose a Significance Level ($\alpha$): This is the probability of rejecting $H_0$ when it is actually true (Type I error). Common values are 0.01, 0.05, or 0.10.
3. Determine the Test Statistic: A value calculated from sample data used to test the hypothesis. Its distribution is known under $H_0$.
4. Formulate a Decision Rule: This involves comparing the test statistic to critical values (critical value approach) or comparing the p-value to $\alpha$ (p-value approach).
5. Calculate the Test Statistic: Compute the value of the chosen test statistic using the sample data.
6. Make a Decision: Reject $H_0$ if the test statistic falls in the rejection region (or p-value < $\alpha$), otherwise fail to reject $H_0$.
7. State the Conclusion: Interpret the decision in the context of the problem.
* Types of Errors:
* Type I Error ($\alpha$): Rejecting a true null hypothesis.
* Type II Error ($\beta$): Failing to reject a false null hypothesis.
* Power of a Test ($1-\beta$): The probability of correctly rejecting a false null hypothesis.
2. Parametric Tests for MeansThese tests assume the data comes from a population with a specific distribution (e.g., normal distribution) and involve parameters like mean and standard deviation.
* Hypothesis Testing for a Single Population Mean (Large Sample, known $\sigma$):
* Used when the sample size $n \ge 30$ and the population standard deviation $\sigma$ is known.
* Test Statistic: $Z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}$
* Decision Rule: Compare calculated Z to critical Z-values from the standard normal distribution.
* Hypothesis Testing for a Single Population Mean (Small Sample, unknown $\sigma$):
* Used when the sample size $n < 30$ and the population standard deviation $\sigma$ is unknown. Assumes the population is normally distributed.
* Test Statistic: $t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}$
* Degrees of Freedom: $df = n-1$
* Decision Rule: Compare calculated t to critical t-values from the t-distribution.
* Hypothesis Testing for the Difference Between Two Population Means (Large Samples, known $\sigma_1, \sigma_2$):
* Used for comparing means of two independent large samples when population standard deviations are known.
* Test Statistic: $Z = \frac{(\bar{x}_1 - \bar{x}_2) - (\mu_1 - \mu_2)_0}{\sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}}$
* Often, $(\mu_1 - \mu_2)_0 = 0$ (testing for no difference).
* Hypothesis Testing for the Difference Between Two Population Means (Small Samples, unknown but equal variances):
* Used for comparing means of two independent small samples when population variances are unknown but assumed equal.
* Pooled Standard Deviation: $s_p = \sqrt{\frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1+n_2-2}}$
* Test Statistic: $t = \frac{(\bar{x}_1 - \bar{x}_2) - (\mu_1 - \mu_2)_0}{s_p \sqrt{\frac{1}{n_1} + \frac{1}{n_2}}}$
* Degrees of Freedom: $df = n_1+n_2-2$
3. Parametric Tests for ProportionsThese tests are used when dealing with categorical data and proportions.
* Hypothesis Testing for a Single Population Proportion:
* Used to test a claim about a single population proportion $p$.
* Conditions: $np_0 \ge 5$ and $n(1-p_0) \ge 5$.
* Test Statistic: $Z = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}$
* Hypothesis Testing for the Difference Between Two Population Proportions:
* Used to compare two population proportions $p_1$ and $p_2$.
* Pooled Proportion: $\bar{p} = \frac{x_1 + x_2}{n_1 + n_2} = \frac{n_1\hat{p}_1 + n_2\hat{p}_2}{n_1 + n_2}$
* Test Statistic: $Z = \frac{(\hat{p}_1 - \hat{p}_2) - (p_1 - p_2)_0}{\sqrt{\bar{p}(1-\bar{p})(\frac{1}{n_1} + \frac{1}{n_2})}}$
* Often, $(p_1 - p_2)_0 = 0$.
4. Parametric Tests for VariancesThese tests are used to make inferences about population variances.
* Hypothesis Testing for a Single Population Variance (Chi-Square Test):
* Used to test a claim about a single population variance $\sigma^2$. Assumes the population is normally distributed.
* Test Statistic: $\chi^2 = \frac{(n-1)s^2}{\sigma_0^2}$
* Degrees of Freedom: $df = n-1$
* Decision Rule: Compare calculated $\chi^2$ to critical $\chi^2$-values from the chi-square distribution.
* Hypothesis Testing for the Ratio of Two Population Variances (F-Test):
* Used to compare two population variances $\sigma_1^2$ and $\sigma_2^2$. Assumes both populations are normally distributed and independent.
* Test Statistic: $F = \frac{s_1^2}{s_2^2}$ (where $s_1^2$ is typically the larger sample variance for a two-tailed test)
* Degrees of Freedom: $df_1 = n_1-1$ and $df_2 = n_2-1$
* Decision Rule: Compare calculated F to critical F-values from the F-distribution.
5. Non-Parametric TestsThese tests do not require assumptions about the population distribution and are often used with ordinal or non-normally distributed data.
* Sign Test:
* Used for paired data to compare medians. Focuses on the direction of differences (positive or negative).
* For large samples ($n > 20$): $Z = \frac{(K \pm 0.5) - 0.5n}{0.5\sqrt{n}}$ where $K$ is the number of less frequent signs.
* Wilcoxon Signed-Rank Test:
* Used for paired data, considering both the direction and magnitude of differences.
* Test Statistic: $W$ (sum of ranks of the less frequent sign).
* For large samples ($n > 20$): $Z = \frac{W - \frac{n(n+1)}{4}}{\sqrt{\frac{n(n+1)(2n+1)}{24}}}$
* Mann-Whitney U Test (Wilcoxon Rank-Sum Test):
* Used for two independent samples to compare medians.
* Test Statistics: $U_1 = n_1n_2 + \frac{n_1(n_1+1)}{2} - R_1$ and $U_2 = n_1n_2 + \frac{n_2(n_2+1)}{2} - R_2$. The test statistic $U$ is the smaller of $U_1$ and $U_2$.
* For large samples ($n_1, n_2 > 20$): $Z = \frac{U - \frac{n_1n_2}{2}}{\sqrt{\frac{n_1n_2(n_1+n_2+1)}{12}}}$
* Kruskal-Wallis H Test:
* Non-parametric alternative to one-way ANOVA, used for three or more independent samples to compare medians.
* Test Statistic: $H = \frac{12}{N(N+1)} \sum_{i=1}^k \frac{R_i^2}{n_i} - 3(N+1)$
* Degrees of Freedom: $df = k-1$ (where $k$ is the number of groups).
* Decision Rule: Compare calculated H to critical $\chi^2$-values.
6. Tests for Association and Distribution* Spearman's Rank Correlation Coefficient ($\rho$):
* Measures the strength and direction of a monotonic relationship between two ranked variables.
* Formula: $\rho = 1 - \frac{6 \sum d_i^2}{n(n^2-1)}$ where $d_i$ is the difference in ranks.
* Hypothesis Testing for $\rho$: $H_0: \rho = 0$ (no monotonic relationship).
* Test Statistic (for large samples, $n > 10$): $t = \rho \sqrt{\frac{n-2}{1-\rho^2}}$
* Degrees of Freedom: $df = n-2$.
* Chi-Square Goodness-of-Fit Test:
* Tests whether observed frequencies of categorical data fit an expected distribution.
* Test Statistic: $\chi^2 = \sum \frac{(O_i - E_i)^2}{E_i}$
* Degrees of Freedom: $df = k-1$ (where $k$ is the number of categories).
* Chi-Square Test for Independence:
* Tests whether two categorical variables are independent in a contingency table.
* Expected Frequency: $E_{ij} = \frac{(\text{row total}) \times (\text{column total})}{\text{grand total}}$
* Test Statistic: $\chi^2 = \sum \frac{(O_{ij} - E_{ij})^2}{E_{ij}}$
* Degrees of Freedom: $df = (r-1)(c-1)$ (where $r$ is number of rows, $c$ is number of columns).
KEY DEFINITIONS AND TERMS
* Null Hypothesis ($H_0$): A statement of no effect, no difference, or no relationship. It is the hypothesis that is assumed to be true until there is sufficient evidence to reject it.
* Alternative Hypothesis ($H_1$): A statement that contradicts the null hypothesis. It represents what the researcher is trying to prove or the effect/difference that is believed to exist.
* Significance Level ($\alpha$): The maximum probability of committing a Type I error (rejecting a true null hypothesis). It is typically set at 0.01, 0.05, or 0.10.
* P-value: The probability of obtaining a test statistic as extreme as, or more extreme than, the one calculated from the sample data, assuming the null hypothesis is true. A small p-value (typically < $\alpha$) suggests strong evidence against $H_0$.
* Test Statistic: A value calculated from sample data during a hypothesis test. Its distribution is known under the null hypothesis, allowing for comparison with critical values or calculation of a p-value.
* Critical Value: A threshold value from the distribution of the test statistic that defines the rejection region. If the calculated test statistic falls beyond the critical value(s), the null hypothesis is rejected.
* Type I Error: The error of rejecting the null hypothesis when it is actually true. Its probability is denoted by $\alpha$.
* Type II Error: The error of failing to reject the null hypothesis when it is actually false. Its probability is denoted by $\beta$.
* Power of a Test: The probability of correctly rejecting a false null hypothesis ($1-\beta$). It represents the test's ability to detect a true effect or difference.
* Parametric Test: A statistical test that makes assumptions about the parameters of the population distribution from which the sample is drawn (e.g., normality, equal variances). Examples include Z-tests, t-tests, and F-tests.
* Non-Parametric Test: A statistical test that does not rely on assumptions about the shape or parameters of the population distribution. These tests are often used with ordinal data or when parametric assumptions are violated. Examples include Sign test, Wilcoxon, Mann-Whitney U, and Kruskal-Wallis tests.
IMPORTANT EXAMPLES AND APPLICATIONS
* Example 1 (Hypothesis Testing for a Single Population Mean - Large Sample): A company claims the average weekly earnings of its employees are $500. A sample of 100 employees shows an average of $520 with a known population standard deviation of $80. At $\alpha=0.05$, test if the average weekly earnings are different from $500.
* Application: Used to verify claims about population averages when sample size is large and population standard deviation is known.
* Formula: $Z = \frac{520 - 500}{80 / \sqrt{100}} = 2.5$. Since $2.5 > Z_{0.025} = 1.96$, we reject $H_0$.
* Example 2 (Hypothesis Testing for a Single Population Mean - Small Sample): A manufacturer claims the average weight of bags is 50 kg. A sample of 15 bags has an average weight of 48 kg with a sample standard deviation of 3 kg. At $\alpha=0.01$, test if the average weight is less than 50 kg.
* Application: Used for quality control or testing claims about means when sample sizes are small and population standard deviation is unknown.
* Formula: $t = \frac{48 - 50}{3 / \sqrt{15}} = -2.58$. With $df=14$, critical $t_{0.01} = -2.624$. Since $-2.58 > -2.624$, we fail to reject $H_0$.
* Example 7 (Hypothesis Testing for a Single Population Variance - Chi-Square Test): A machine is supposed to produce items with a variance of 0.005. A sample of 20 items has a variance of 0.008. At $\alpha=0.05$, test if the machine's variance is different from 0.005.
* Application: Crucial for quality control to ensure consistency in manufacturing processes.
* Formula: $\chi^2 = \frac{(20-1) \times 0.008}{0.005} = 30.4$. With $df=19$, critical $\chi^2$ values are $8.907$ and $32.852$. Since $8.907 < 30.4 < 32.852$, we fail to reject $H_0$.
* Example 11 (Mann-Whitney U Test): Two teaching methods are compared. Method A (n=10) has scores: 75, 80, 85, 70, 90, 65, 78, 82, 88, 72. Method B (n=1