A statistical hypothesis is an assumption about a population parameter. For example, we may assume that the mean height of a male in the U.S. is 70 inches. The assumption about the height is the statistical hypothesis and the true mean height of a male in the U.S. is the population parameter.
AÂ hypothesis test is a formal statistical test we use to reject or fail to reject some statistical hypothesis.
The basic process for performing a hypothesis test is as follows:
1. Collect sample data.
2. Calculate the standardized test statistic for the sample data.
3. Compare the standardized test statistic to some critical value. If it’s more extreme than the critical value, reject the null hypothesis. Otherwise, fail to reject the null hypothesis test.
The formula that we use to calculate the standardized test statistic varies depending on the type of hypothesis test we perform.
The following table shows the formula to use to calculate the standardized test statistic for each of the four major types of hypothesis tests:
Hypothesis Test for One Mean
A one sample t-test is used to test whether or not the mean of a population is equal to some value.
The standardized test statistic for this type of test is calculated as follows:
t = (x – μ) / (s/√n)
where:
- x:Â sample mean
- μ0: hypothesized population mean
- s:Â sample standard deviation
- n:Â sample size
Refer to this tutorial for an example of how to calculate this standardized test statistic.
Hypothesis Test for a Difference in Means
A two sample t-test is used to test whether or not the means of two populations are equal.
The standardized test statistic for this type of test is calculated as follows:
t = (x1 – x2) / sp(√1/n1 + 1/n2)
where x1 and x2 are the sample means, n1 and n2 are the sample sizes, and where sp is calculated as:
sp = √ (n1-1)s12 +  (n2-1)s22 / (n1+n2-2)
where s12Â and s22Â are the sample variances.
Refer to this tutorial for an example of how to calculate this standardized test statistic.
Hypothesis Test for One Proportion
A one proportion z-test is used to compare an observed proportion to a theoretical one.
The standardized test statistic for this type of test is calculated as follows:
z = (p-p0) / √p0(1-p0)/n
where:
- p: observed sample proportion
- p0:Â hypothesized population proportion
- n:Â sample size
Refer to this tutorial for an example of how to calculate this standardized test statistic.
Hypothesis Test for a Difference in Proportions
A two proportion z-test is used to test for a difference between two population proportions.
The standardized test statistic for this type of test is calculated as follows:
z = (p1-p2) / √p(1-p)(1/n1+1/n2)
where p1 and p2 are the sample proportions, n1 and n2 are the sample sizes, and where p is the total pooled proportion calculated as:
p = (p1n1 + p2n2)/(n1+n2)
Refer to this tutorial for an example of how to calculate this standardized test statistic.