T-Test.pptx
T-Test.pptx
Source: Available at
https://www.investopedia.com/terms/t/t-test.asp#:~:text=A%20t%2Dtest%20is%20an,flipping%20a%20coin%20100%20times. (Accessed
17/02/24)
What is a T Score?
T-Score
A large t-score, or t-value, indicates that the groups are different while a small
t-score indicates that the groups are similar.
Types of T-test
T= mean1−mean2/s(diff)/(n)
T-value=mean1−mean2/n1+n2−2(n1−1)×var12+(n2−1)×var2×n1+n2-2*√1/n1+1/n2
where:
mean1 and mean2=Average values of each
of the sample sets
var1 and var2=Variance of each of the sample sets
n1 and n2=Number of records in each sample set
Degrees of Freedom=n1+n2−2
where:
n1 and n2=Number of records in each sample set
Unequal Variance T-Test (number of samples in each group is different, and the variance of the two data sets is also different)
T-value=mean1−mean2/√(var1/n1+var2/n2)
where:
mean1 and mean2=Average values of each
of the sample sets
var1 and var2=Variance of each of the sample sets
n1 and n2=Number of records in each sample set
Unequal Variance T-Test (number of samples in each group is different, and the variance of the two data sets is also different)
T-value=mean1−mean2/√(var1/n1+var2/n2)
where:
mean1 and mean2=Average values of each
of the sample sets
var1 and var2=Variance of each of the sample sets
n1 and n2=Number of records in each sample set
Unequal Variance T-Test (number of samples in each group is different, and the variance of the two data sets is also different)
T-value=mean1−mean2/√(var1/n1+var2/n2)
where:
mean1 and mean2=Average values of each
of the sample sets
var1 and var2=Variance of each of the sample sets
n1 and n2=Number of records in each sample set
Which T-Test to Use?
Independent Samples t Test
Data Requirements
• Dependent variable that is continuous (i.e., interval or ratio level)
• Independent variable that is categorical and has exactly two categories
• Cases that have values on both the dependent and independent variables
• Independent samples/groups (i.e., independence of observations)
❖ There is no relationship between the subjects in each sample. This means that:
❖ Subjects in the first group cannot also be in the second group
❖ No subject in either group can influence subjects in the other group
❖ No group can influence the other group
❖ Violation of this assumption will yield an inaccurate p value
● Random sample of data from the population
● Normal distribution
●
For example:
● Your independent variable is social media use, and you assign groups to low, medium, and high
levels of social media use to find out if there is a difference in hours of sleep per night.
● Your independent variable is brand of soda, and you collect data on Coke, Pepsi, Sprite, and
● You independent variable is type of fertilizer, and you treat crop fields with mixtures 1, 2 and 3 to