Check Sheet Logo
Check Sheet

T.TEST

The T.TEST function calculates the probability associated with a Student's t-test. This function is commonly used in statistics to determine whether two samples are likely to have come from the same two underlying populations that have the same mean. It returns the probability that the two samples are different. The function assumes that the two samples are independent of each other and have equal variances.

Usage

Use the T.TEST formula with the syntax shown below, it has 3 required parameters and 1 optional parameter:

=T.TEST(range1, range2, tails, type)
Parameters:
  1. range1 (required):
    The first range of data to compare.
  2. range2 (required):
    The second range of data to compare.
  3. tails (required):
    The number of tails to use in the calculation. Either 1 (one-tailed) or 2 (two-tailed).
  4. type (optional):
    The type of t-test to use. Either 1 (paired) or 2 (unpaired). If omitted, defaults to 2.

Examples

Here are a few example use cases that explain how to use the T.TEST formula in Google Sheets.

Comparing the means of two samples

Suppose you have two sets of data and you want to determine whether their means are significantly different. You can use the T.TEST function to calculate the probability that the two samples are different. If the resulting probability is less than your chosen significance level (usually 0.05), you can reject the null hypothesis that the two samples have the same mean.

Determining the significance of a correlation

You can use the T.TEST function to determine whether a correlation coefficient is significantly different from zero. To do this, you first calculate the correlation coefficient using the CORREL function and then use the T.TEST function with the appropriate degrees of freedom to calculate the probability that the correlation coefficient is different from zero.

Testing for statistical outliers

You can use the T.TEST function to test for statistical outliers in a dataset. To do this, you first calculate the mean and standard deviation of the dataset using the AVERAGE and STDEV functions, respectively. You can then use the T.TEST function to determine whether any individual data points are significantly different from the mean.

Common Mistakes

T.TEST not working? Here are some common mistakes people make when using the T.TEST Google Sheets Formula:

Missing data

If any cells in the data ranges are empty or contain non-numeric data, the T.TEST function will return an error. Make sure all cells in the data ranges contain valid numeric data.

Incorrect tails parameter

Make sure the tails parameter is set correctly for your test. If you are doing a one-tailed test, set tails to 1. If you are doing a two-tailed test, set tails to 2.

The following functions are similar to T.TEST or are often used with it in a formula:

  • T.DIST

    The T.DIST function returns the probability of a Student's t-distribution with a specified degrees of freedom. This function is usually used in hypothesis testing to determine the probability that a sample mean is within a specified range of values.

  • T.INV

    The T.INV function returns the inverse of the Student's t-distribution for the provided probability and degrees of freedom. This function is commonly used to calculate a critical value from the t-distribution when working with small sample sizes.

  • TREND

    The TREND formula is used to calculate future values based on historical data. It fits a straight line (using the method of least squares) to the arrays specified in the known_data_y and known_data_x parameters and then uses that line to calculate new y-values for the array specified in the new_data_x parameter. If b is set to TRUE, then the calculation will include the y-intercept of the line. This formula is commonly used in forecasting and trend analysis.

  • CORREL

    The CORREL formula returns the correlation coefficient between two sets of data. This coefficient represents the strength of the linear relationship between the two sets of data, with values ranging from -1 (perfect negative correlation) to 1 (perfect positive correlation).

  • AVERAGE

    The AVERAGE function calculates the average (arithmetic mean) of the values passed to it. It is commonly used to find the average of a range of cells containing numerical data.

Learn More

You can learn more about the T.TEST Google Sheets function on Google Support.