T-TEST in Excel

T-TEST in Excel

TTEST function is categorized as a Statistical function in Excel. In mathematical terms, the TTEST function in excel will calculate the probability that is associated with a Student’s T-Test. This function is usually used to test the probability of two samples that have underlying populations with the same mean.

T-TEST Formula in Excel

Below is the T-Test Formula in Excel

TTEST Formula in Excel

Details of Parameters:

T-TEST in excel has the following required parameters, i.e., array1, array2, tails, and type.

How to Use the TTEST Function in Excel?

The T-Test in excel is very simple and easy to use. Let us understand the working of the TTEST function in excel by some examples. TTEST function can be used as a worksheet function and as a VBA function.

You can download this TTEST Function Excel Template here – TTEST Function Excel Template

TTEST function as a worksheet function.

The T-Test in Excel Example #1

Suppose have given the following expenses data spent in India and in the US. The probability associated with the Student’s paired t-test with a 1-tailed distribution for the two arrays of data below can be calculated using the Excel function.

TTEST Example 1

The T-Test formula in excel used is as follows: =TTEST(A4:A24,B4:B24,1,1)

TTEST Example 1-1

The output will be 0.177639611.

TTEST Example 1-2

T-TEST in Excel Example #2

A marketing research firm tests the effectiveness of a new flavoring for a leading beverage using a sample of 21 people, half of whom taste the beverage with the old flavoring and the other half who taste the beverage with the new flavoring.

TTEST Example 2

Two-sample equal variance (homoscedastic) is calculated by the following T-Test formula in Excel =TTEST(A31:A51,B31:B51,1,2)

TTEST Example 2-1

The output will be 0.454691996.

TTEST Example 2-2

T-TEST in Excel Example #3

To investigate the effect of a new fever drug on driving skills, a researcher studies 21 individuals with fever. All participants then entered a simulator and were given a driving test, which assigned a score to each driver, as summarized in the below table.

TTEST Example 3

Two-sample unequal variance (heteroscedastic) can be calculated by Excel TTest function by replacing the type to 3 =TTEST(A57:A77,B57:B77,1,3)

TTEST Example 3-1

The output will be 0.364848284.

TTEST Example 3-2

T-TEST in Excel can be used as a VBA function.

Suppose we have the data sets located in the excel sheet range from A4 to A24 and B4 to B24, then we can calculate the TTEST of the given datasets by using the below VBA functions.

Sub TTESTcal()  // start the TTEST function scope

Dim TTEST as interger

TTEST = Application.WorksheetFunction.TTest(Range(“A4:A24”),Range(“B4:B24”),1,1)

MsgBox TTEST // print the TTEST value in the message box.

End sub // End the TTEST function

Things to Remember about the TTEST Function in Excel

  • TTest function through the #N/A Error if the two supplied arrays have different lengths.
TTEST - things to remember
ttest - NUM Error
  • The supplied type parameter is not equal to 1, 2, or 3.

T-TEST in Excel Video

 

Recommended Articles

This has been a guide to TTEST Function in Excel. Here we discuss the T-TEST Formula in excel and how to use TTEST function along with excel example and downloadable excel templates. You may also look at these useful functions in excel –

  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion
LEARN MORE >>