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**μ**hypothesized population mean_{0}:**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 = (x _{1} – x_{2}) / s_{p}(√1/n_{1} + 1/n_{2})**

where x_{1} and x_{2} are the sample means, n_{1 }and n_{2 }are the sample sizes, and where s_{p} is calculated as:

**s _{p}** = √ (n

_{1}-1)s

_{1}

^{2}+ (n

_{2}-1)s

_{2}

^{2}/ (n

_{1}+n

_{2}-2)

where s_{1}^{2} and s_{2}^{2} 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-p _{0}) / √p_{0}(1-p_{0})/n**

where:

**p:**observed sample proportion**p**hypothesized population proportion_{0}:**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 **= (p_{1}-p_{2}) / √p(1-p)(1/n_{1}+1/n_{2})

where p_{1} and p_{2} are the sample proportions, n_{1 }and n_{2 }are the sample sizes, and where p is the total pooled proportion calculated as:

p = (p_{1}n_{1} + p_{2}n_{2})/(n_{1}+n_{2})

Refer to this tutorial for an example of how to calculate this standardized test statistic.