BIOSTATISTICS
Year : 2015  Volume
: 1  Issue : 1  Page : 2728
Student's ttest for independent samples
Jill C Stoltzfus The Research Institute, Temple University/St. Luke's University Health Network School of Medicine, 801 Ostrum Street, Bethlehem, Pennsylvania 18015, USA
Correspondence Address:
Jill C Stoltzfus Temple University/St. Luke's University Health Network School of Medicine, 801 Ostrum Street, Bethlehem, Pennsylvania 18015 USA
Abstract
When analyzing data for two independent groups (e.g., males vs. females), the Student's ttest is commonly used for normally distributed data measured on a continuous/interval scale (e.g., body mass index). The mathematical formula for the Student's ttest includes the mean betweengroup difference in the numerator and betweengroup variability in the denominator.
The following core competencies are addressed in this article: Medical knowledge.
How to cite this article:
Stoltzfus JC. Student's ttest for independent samples.Int J Acad Med 2015;1:2728

How to cite this URL:
Stoltzfus JC. Student's ttest for independent samples. Int J Acad Med [serial online] 2015 [cited 2022 Oct 6 ];1:2728
Available from: https://www.ijamweb.org/text.asp?2015/1/1/27/172708 
Full Text
When analyzing data, it is common practice to compare two independent groups, such as males versus females or smokers versus nonsmokers. In this case, “independent groups” means that the observations from one sample are completely unrelated to the observations from another sample. If the outcome is measured on a continuous/interval scale (i.e., it exists on a continuum that can be added, subtracted, multiplied, or divided) and is normally distributed (i.e., it looks like a “bellshaped curve”), the Student's ttest is the appropriate statistical method.[1],[2]
The Student's ttest (also known as an unpaired ttest) was developed in 1908 by a chemist named William Sealy Gosset (who went by the pseudonym “Student” when publishing his work) to test the quality of stout at the Guinness Brewery in Dublin, Ireland. Below is the mathematical formula for the Student's ttest:[1],[2]
[Inline:1]
In this equation, the numerator (Xbar and Ybar) represents the difference in means between the two independent groups. The denominator represents the betweengroup variability, with n1 and n2 being the sample sizes of the two groups, and Sp being the pooled standard deviation or the weighted average of the standard deviation of the two groups. The formula for Sp[1],[2] is:
[Inline:2]
In this equation, n1 and n2 are the sample sizes of the two groups, and S12 and S22 are the standard deviations of the two groups.
Besides requiring continuous/intervallevel outcomes that are normally distributed, the Student's ttest was originally designed for data with equal variances between the two groups being compared.[1],[2] This means that the distribution of data in one group should be similar to the other group for example, when comparing body mass indexes (BMIs) in males versus females, the distribution of BMI values should be similar at the low, middle, and high ranges for both males and females. If two groups have unequal variances, which sometimes happen when the two groups' sample sizes are noticeably different or highly imbalanced, a slightly different type of Student's ttest may be used.
Although statistical software packages can quickly compute a Student's ttest, it is easy enough to calculate by hand. Consider the following example: In a group of 50 male athletes, mean BMI is 28.5, and the standard deviation is 10.5. In a group of 50 female athletes, mean BMI is 23.5, and the standard deviation is 12.5. If we apply the Student's ttest formula:
Step 1: Calculate
Xbar (males) – Ybar (females) = 28.5–23.5 = 5.0
Step 2: Calculate
[Inline:3]
Step 3: Complete the formula:
[Inline:4]
The ttest value for our BMI data is 2.16. We then compare this value to the critical ttest threshold that matches our data's parameters, including the level of error we select for finding a significant difference that does not truly exist (usually 0.05, or 5%). (Note that critical ttest threshold tables can be found online).[3] If our value of 2.16 is greater than the critical threshold, we conclude that male athletes' BMIs are significantly greater than female athletes' BMIs. If our ttest value is less than the critical ttest threshold value, we must conclude that BMI does not differ significantly by gender.
Financial support and sponsorship
Nil.
Conflicts of interest
There are no conflicts of interest.
References
1  Socialresearchmethods.net. The tTest. Available from: http://www.socialresearchmethods.net/kb/stat_t.php. [Last cited on 2015 Sep 15]. 
2  Seltman HJ. The tTest and Basic Inference Principles. Experimental Design and Analysis; 2015. p. 14170. Available from: http://www.stat.cmu.edu/~hseltman/309/Book/chapter6.pdf [Last cited on 2015 Sep 15]. 
3  Itl.nist.gov. Critical Values of the Student's t Distribution. Available from: http://www.itl.nist.gov/div898/handbook/eda/section3/eda3672.htm.[Last cited on 2015 Sep 15]. 
