TTEST
Returns the probability associated with ttest. Determines whether two samples are likely to have come from the same two underlying populations that have the same mean.
Sample Usage
TTEST(A1:A4, B1:B4, 2, 1)
Syntax
TTEST(range1, range2, tails, type)

range1
 The first sample of data or group of cells to consider for the ttest. 
range2
 The second sample of data or group of cells to consider for the ttest. 
tails
 Specifies the number of distribution tails.
If
1
: uses a onetailed distribution. 
If
2
: uses a twotailed distribution.


type
 Specifies the type of tTest.
If
1
: a paired test is performed. 
If
2
: a twosample equal variance (homoscedastic) test is performed. 
If
3
: a twosample unequal variance (heteroscedastic) test is performed.

Notes

tails
andtype
must be numeric. 
range1
andrange2
must have the same number of data points. 
TTEST
uses the data inrange1
andrange2
to compute a nonnegative test. Iftails
is set to1
,TTEST
returns the probability of a higher value of the tstatistic under the assumption thatrange1
andrange2
are samples from populations with the same mean. The value returned byTTEST
whentails
is set to2
is double that returned whentails
is set to1
and corresponds to the probability of a higher absolute value of the tstatistic under the "same population means" assumption. 
You can use
TTEST
orT.TEST
to perform this function.
Examples
In this example, a paired, twotailed tTest is computed on a student's first and second quarter grades.