MS-251›Single Sample & One- and Two-Sample Tests of Hypotheses
Probability and StatisticsTopic 30 of 36
Single Sample & One- and Two-Sample Tests of Hypotheses
12 minread
2,109words
Intermediatelevel
Single-Sample & One- and Two-Sample Tests of Hypotheses
In statistics, hypothesis testing is a formal method of making inferences or drawing conclusions about a population based on sample data. A hypothesis test starts with a claim or assumption about a population parameter (such as a mean or proportion), and then tests this assumption by analyzing sample data.
There are two major types of hypothesis tests:
Single-sample hypothesis tests – Involve testing a hypothesis about a single sample from a population.
Two-sample hypothesis tests – Involve comparing two independent samples to test hypotheses about the differences between population parameters.
1. Single-Sample Tests of Hypotheses
A single-sample hypothesis test involves testing a hypothesis about a population parameter (such as the population mean or population proportion) based on sample data. The most common single-sample tests are the one-sample z-test and one-sample t-test.
a. One-Sample Z-Test for the Population Mean (When Population Variance is Known)
This test is used when we know the population's standard deviation σ and want to test hypotheses about the population mean μ.
Null Hypothesis (H0): The population mean equals a specific value.
H0:μ=μ0
Alternative Hypothesis (HA): The population mean is different from the hypothesized value.
For a two-tailed test, reject H0 if ∣z∣>zα/2, where zα/2 is the critical value from the standard normal distribution corresponding to the significance level α.
For a one-tailed test, reject H0 if z>zα for a right-tailed test or z<−zα for a left-tailed test.
b. One-Sample t-Test for the Population Mean (When Population Variance is Unknown)
When the population variance is unknown, we use the t-distribution to perform hypothesis testing for the population mean. This test is commonly used when sample sizes are small or when the population's variance is unknown.
Null Hypothesis (H0): The population mean equals a specific value.
H0:μ=μ0
Alternative Hypothesis (HA): The population mean is different from the hypothesized value.
s = sample standard deviation (since the population standard deviation is unknown),
n = sample size.
Decision Rule:
For a two-tailed test, reject H0 if ∣t∣>tα/2,n−1, where tα/2,n−1 is the critical value from the t-distribution with n−1 degrees of freedom and significance level α.
For a one-tailed test, reject H0 if t>tα,n−1 for a right-tailed test or t<−tα,n−1 for a left-tailed test.
2. Two-Sample Tests of Hypotheses
A two-sample hypothesis test is used when comparing two independent samples. These tests are commonly used when we want to compare two population means or two population proportions.
a. Two-Sample Z-Test for the Difference Between Means (When Population Variances are Known)
This test is used when the population variances are known, and we want to compare the means of two independent samples.
Null Hypothesis (H0): The population means are equal.
H0:μ1=μ2
Alternative Hypothesis (HA): The population means are different.
xˉ1 and xˉ2 are the sample means of the two groups,
σ12 and σ22 are the known population variances,
n1 and n2 are the sample sizes.
Decision Rule:
For a two-tailed test, reject H0 if ∣z∣>zα/2, where zα/2 is the critical value from the standard normal distribution corresponding to the significance level α.
For a one-tailed test, reject H0 if z>zα for a right-tailed test or z<−zα for a left-tailed test.
b. Two-Sample t-Test for the Difference Between Means (When Population Variances are Unknown)
When the population variances are unknown and the sample sizes are small, we use the t-distribution to test the difference between the means of two independent samples.
Null Hypothesis (H0): The population means are equal.
H0:μ1=μ2
Alternative Hypothesis (HA): The population means are different.
For a two-tailed test, reject H0 if ∣t∣>tα/2,df, where tα/2,df is the critical value from the t-distribution with df degrees of freedom.
For a one-tailed test, reject H0 if t>tα,df for a right-tailed test or t<−tα,df for a left-tailed test.
Summary
Single-Sample Tests of Hypotheses:
One-sample z-test: Used when the population standard deviation is known, to test the population mean.
One-sample t-test: Used when the population standard deviation is unknown, to test the population mean.
Two-Sample Tests of Hypotheses:
Two-sample z-test: Used when population variances are known, to compare the means of two independent samples.
Two-sample t-test: Used when population variances are unknown, to compare the means of two independent samples.
In both types of tests, the decision rule involves comparing the test statistic to a critical value from the appropriate distribution (z or t), and based on this comparison, the null hypothesis is either rejected or not rejected.