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:
Before you perform a Two Sample T-Test, be sure you have two samples of data in Google Sheets that you want to compare
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.
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
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.
More basic math formulas in Google Sheets:
- AVERAGE Function
- MAX Function
- MIN Function
- FLATTEN Function
- GROWTH Function
- Transpose Data
- SORT Function
- How To Round
- How To Multiply
- How To Divide
- How To Subtract
- Round Down
- Add Cells
- Multiply Cells
- Subtract Cells
- Find Median
- Find Quartiles
- Automatically Add Numbers
- Find Mean
- Standard Deviation
- Find Average
- Find Range
- Find Variance
- Use Pi In Google Sheets
- How To Square
- Square Root
- Sum Columns or Rows
- SUMPRODUCT Formula
- How To Create A Function
- How To Create Formula