Excel - TTEST Function
TTEST Function
The Excel TTEST function retrieves the probability associated with a Student's t-test. It is used to identify whether there is a significant difference between the mean of two samples. Comparing the probability and significance levels can help you reach a scientific conclusion.
If the probability is less than the significance level(0.05), accept the alternative hypothesis and discard the null hypothesis, meaning a significant difference is found between the two samples mean. Otherwise, reject the alternative hypothesis and accept the null hypothesis if the probability is greater than the significance level(0.05), which shows no significant difference between the two samples mean.
The TTEST function interchanges with the T.TEST function in Excel 2010.
Syntax
The syntax of TTEST function is as follows −
TTEST (array1,array2,tails,type)
Arguments
You can use the following arguments with the TTEST function −
| Argument | Description | Required / Optional |
|---|---|---|
| Array1 | It specifies the data values of the first array. | Required |
| Array2 | It specifies the data values of the second array. | Required |
| Tails |
It indicates the number of distributions whose value can be 1 or 2. If tails = 1, TTEST utilizes the one-tailed distribution. If tails = 2, TTEST utilizes the two-tailed distribution. |
Required |
| Type | It indicates the specific type of t-test. The respective t-test Table is depicted below. | Required |
t-Test Table
| Type | t-Test to Perform |
|---|---|
| 1 | Paired |
| 2 | Two-sample equal variance (homoscedastic) |
| 3 | Two-sample unequal variance (heteroscedastic) |
Points to Remember
- TTEST function assesses data points of two arrays to evaluate a positive t-statistic.
- If the tails and type arguments are in decimal form, these arguments are truncated to integers.
- If the number of elements is distinct in both arrays and type = 1 (paired), the TTEST function will retrieve the #N/A.
- If tails or type contain a non-numeric value, the TTEST function will return the #VALUE! error.
- If the tails argument contains a numeric value other than 1 or 2, then the TTEST function will return the #NUM! error.
Examples of TTEST Function
Practice the following examples to learn the use of the TTEST function in Excel.
Example 1
Step 1: First, consider the sample dataset, where the data values of array1 and array2 are specified in the range B3:B12. In the C14 cell, enter the formula =TTEST(B4:B10,C4:C10,C11,C12) and press the Enter key.
Therefore, the probability of the paired one tail t-test is 0.29.
Step 2: Enter the formula "=TTEST(B5:B11,C5:C11,C13,C12)" in the C15 cell and press the Enter key.
Hence, the probability of the two-tailed t-test is 0.8573.
Example 2
If the tails and type arguments are in decimal form, these arguments are truncated to integers. Write an example for this case.
Solution
You can enter the formula =TTEST(B4:B10,C4:C10,C11,C12) in the C14 cell. Here, the C11 and C12 cell references point to the decimal number. In this scenario, when you compute the TTEST function, these decimal values 1.1 and 2.3 are truncated to the integers values 1 and 2.
After that, press the Enter key to get the resultant value of 0.371258.
Example 3
If the number of elements is distinct in both arrays and type = 1 (paired), the TTEST function will retrieve the #N/A. Give an example for this case.
Solution
In this example, the data range in Array1 is B3:B10, and the data range in Array2 is B3:B8, which means the dimensions of both arrays are different. The type is 1, which is specified in the C12 cell. You can write the formula "=TTEST(B3:B10,C3:C8,C11,C12)" in the C13 cell and press Enter.
Therefore, the TTEST function will return the #N/A error for this case.
Note − The number of data points for the paired(type =1) t-test function should be the same.
Example 4
If tails or type contain a non-numeric value, the TTEST function will return the #VALUE! error. Write an example for this case.
Solution
Lets say you enter the text value in the C11 cell that specifies a Tails argument, which is non-numeric. Now you can write the formula "=TTEST(B3:B10,C3:C8,C11,C12)" in the C13 cell.
Once you press the Enter key, the TTEST function will return the #VALUE! error.
Example 5
If the tails argument contains a value other than 1 or 2, then the TTEST function will return the #NUM! error. Give an example for this case.
Solution
In the TTEST function, the value of the Tails argument can be either 1 or 2. If you employ other values instead of 1 or 2, then the #NUM will come. You can type the formula "=TTEST(B3:B8,C3:C8,C11,C12)" in the C13 cell.
Here, the value of Tails is 3, as specified in the C11 cell. Press the Enter key to get the resultant value, which is #NUM! error.