How To Do A T Test In Google Sheets

Last Updated on November 1, 2023 by Jake Sheridan

In this tutorial, you will learn how to do a T test in Google Sheets.

How To Do A T-Test In Google Sheets

When working with samples in Google Sheets, sometimes you’ll want to compare the means of samples to analyze the differences and similarities between these samples.

A T-Test is a good way to do this, and fortunately Google Sheets has a built-in T-Test function that makes it easy to perform T-Tests on samples stored in your spreadsheet.

Two Sample T-Tests

There are several types of T-Test that can be performed in Google Sheets using the T.TEST() function. However, for the purposes of this tutorial we’ll go through the process of doing a Two Sample T-Test in Google Sheets.

Two Sample T-Tests are used to test if two samples have the same mean.

This type of test has a lot of applications, but one example is that it could be used by biologists to compare the sizes of individuals in two samples of a species collected at different times or locations.

Follow these steps to perform a Two Sample T-Test in Google Sheets:

Step 1

Before you perform a Two Sample T-Test, be sure you have two samples of data in Google Sheets that you want to compare

Step 2

Click on the cell you want to perform the T-Test in and type the following formula “=T.TEST(A2:A, B2:B, 2, 2)”.

 

In this formula, the first two parameters are references to the ranges in which the two samples are stored.

The third parameter is the tail type: In this case we are using a 2-tailed distribution because we do not know how the samples might differ and want our test to measure all possible outcomes.

The last parameter is the type of T-Test performed.

In this case we are using option #2, a Two-Sample Equal Variance (Homoscedastic) T-Test. Typing a 1 or a 3 in this place would result in a Paired T-Test or Two-Sample Unequal Variance (Heteroscedastic) T-Test, respectively.

Step 3

After typing the formula, hit enter and the T-Test result will calculate in the formula cell. Any updates to the data in the referenced ranges will automatically be reflected in this calculation

Summary

Example Spreadsheet: Make a copy of the example spreadsheet

In this tutorial, I covered how to do a T test in Google Sheets. Want more? Check out all the Google Sheets Tutorials.