How to Run a T-Test in Google Sheets
Running a T-Test in Google Sheets can be an effective way to determine whether there is a statistical significance to the difference between two data sets.
Your T-Test will require 4 inputs. Two of these are your data sets, next is deciding whether your test requires one or two tails, and a final input to declare whether you want a single sample test, a two-sample test, or a two-sample paired test to be run. To run a T-Test in Google Sheets, follow these steps:
To set up a T-Test, you must have two data sets you want to compare. To compare them, we will be using the T-Test function in Google Sheets.
To do this, type the following into your cell:
- Your first two arguments will be selecting the data ranges you wish to compare, separated by a comma. It should look something like the example below.
![Run a T-Test](https://cdn.prod.website-files.com/61f27b4a37d6d71a9d8002bc/654883e14df8ba43ad278844_8wvPyt30t_DxqVNnu4-uwufBpQB2UrMSp_6jEpUbMATjPEXJNPEl8EvR41zwV0CnZzNYbe7ZlrKHzqK6mb3K8zN7TbiBXuqViBgOad89XNYJbXgCtNW_54ajLHgS__S5D1fXpWCHUWENlBMttMFtviw.png)
- Once you have both data sets entered into your formula, you must type either “1” or “2” to select a one or two tailed test. Read further into this guide for help figuring out which is best for you to use.
- Lastly, you will need to type a number 1-3, each corresponding to a different type of T-Test. A “1” will result in a one sample test being run, a “2” will run a two-sample test, and a “3” will provide a two-sample paired test.
- Once you have selected the appropriate test, you can close your parenthesis or press enter to run your T-Test. The resulting number is your P-value.
![P-Value from T-Test](https://cdn.prod.website-files.com/61f27b4a37d6d71a9d8002bc/654883e02754efeabd412059_nMNCXAtcE05P2CkD4k7wCPR5M9Sy0QaQ0oFN7SEZShbtZ3yKnTU0z9jMJALRbqEIcJuxMI2YLi_nV2WYokG9hRnB8ttz1lPB3WAS4iDtJEaLqvXwHRbSNe8UHc419_unf9QQ2RGvF0Xv8Oti7rOrbKY.png)
Should I Run a One or Two-Tailed T-Test?
It is important to know whether you want a one or two-tailed T-Test to be run by your Google Sheets formula. A one-tailed test will show the possibility of an effect in one direction, while a two-tailed test shows the possibility of effect in two directions.
This means that a one-tailed test will be useful when looking at whether or not one data set is either above or below the other. A common use for this would be cost savings.
You can run a one-tailed T-Test after implementing new cost saving measures to determine whether the mean cost is significantly different from previous methods.
A two-tailed test will allow you to determine whether there is a significant difference between the means of two different groups while allowing for differences in either direction (greater or smaller). Two-tailed tests are most useful when taking a conservative approach to your hypothesis.
Because the two-tailed test shows differences in both directions, it is less specific and therefore provides a more general answer as to the difference in means.
What Does my T-Test Result Mean?
The resulting number from your T-Test formula being run is known as the P-value. Your P-value should be a decimal, and if it is lower than .05, it is a statistically significant P-value.