Two statistical tests that students often get mixed up are the **F-Test **and the **T-Test**. This tutorial explains the difference between the two tests.

**F-Test: The Basics**

An **F-test **is used to test whether two population variances are equal. The null and alternative hypotheses for the test are as follows:

**H _{0}:** σ

_{1}

^{2}= σ

_{2}

^{2}(the population variances are equal)

**H _{1}:** σ

_{1}

^{2}≠ σ

_{2}

^{2}(the population variances are

*not*equal)

The F test statistic is calculated as s_{1}^{2} / s_{2}^{2}.

If the p-value of the test statistic is less than some significance level (common choices are 0.10, 0.05, and 0.01), then the null hypothesis is rejected.

**Example: F-Test for Equal Variances**

A researcher wants to know if the variance in height between two species of plants is the same. To test this, she collects a random sample of 20 plants from each population and calculates the sample variance for each sample.

The F test statistic turns out to be 4.38712 and the corresponding p-value is 0.0191. Since this p-value is less than .05, she rejects the null hypothesis of the F-Test. This means she has sufficient evidence to say that the variance in height between the two plant species is *not *equal.

**T-Test: The Basics**

A **two sample t-test** is used to test whether or not the means of two populations are equal.

A two-sample t-test always uses the following null hypothesis:

**H**μ_{0}:_{1}= μ_{2}(the two population means are equal)

The alternative hypothesis can be either two-tailed, left-tailed, or right-tailed:

**H**μ_{1}(two-tailed):≠ μ_{1}_{2}(the two population means are not equal)**H**μ_{1}(left-tailed):_{1}< μ_{2}(population 1 mean is less than population 2 mean)**H**μ_{1}(right-tailed):> μ_{1}_{2}(population 1 mean is greater than population 2 mean)

The test statistic is calculated as:

**Test statistic:** (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.

If the p-value that corresponds to the test statistic t with (n_{1}+n_{2}-1) degrees of freedom is less than your chosen significance level (common choices are 0.10, 0.05, and 0.01) then you can reject the null hypothesis.

**Example: Two Sample t-test**

A researcher wants to know if the mean height between two species of plants is equal. To test this, she collects a random sample of 20 plants from each population and calculates the sample mean for each sample.

The t test statistic turns out to be 1.251 and the corresponding p-value is 0.2148. Since this p-value is not less than .05, she fails to reject the null hypothesis of the T-Test. This means she does not have sufficient evidence to say that the mean heights between these two plant species is different.

**F-Test vs. T-Test: When to Use Each**

We typically use an** F-test** to answer the following questions:

- Do two samples come from populations with equal variances?
- Does a new treatment or process reduce the variability of some current treatment or process?

And we typically use a **T-test** to answer the following questions:

- Are two population means equal? (We use a two sample t-test to answer this)
- Is one population mean equal to a certain value? (We use a one sample t-test to answer this)

**Additional Resources**

Introduction to Hypothesis Testing

One Sample t-test Calculator

Two Sample t-test Calculator