Hypothesis Testing:T Test


T-Test: A T test is a statistical hypothesis test which indicates the difference between the means of two samples, or difference between population and sample. T-Test tells us how ‘Statistically Significance’ is the difference between the two groups, and if the difference is significant it indicated that the 2 means belong to different groups.

A T-Test ratio tells us:

  • A large t-score tells you that the groups are different.
  • A small t-score tells you that the groups are similar


T-test can be used primarily in two cases:

  1. 1 Sample T-Test
  2. 2 Sample T-Test
  3. Paired t-test


1-Sample T-Test:  tests how different is the mean of a single group compared to a known mean.

Where Ho= the mean is same v/s Ha= the means are different.


The numerator measures the effect size of the difference between the 2 means.

The denominator measures the standard error of the mean. This statistic indicates how accurately your sample estimates the mean of the population. A larger number indicates that your sample estimate is less precise because it has more random error.

2-Sample T-Test:  simply compares the means of two groups i.e. tests the difference between the samples when the variances of two normal distributions are not known. It’s important to note that in case of 2-sample T-Test-

  • Samples are independent
  • Variance in known
  • Variance is assumed to be equal

Where = the two groups are same v/s =the two groups are not same.


Paired T-Test:  Is used to compare the means from the same group at different time period. (ex- before and after automation of a process)

Now suppose you have a process that needs to be run manually by each employee daily. Members of your team run the manual process daily and take different time to do it.

The table below shows the different time taken by the employees before and after automation.

Employee Before Automation (time in minutes)-X After Automation (time in minutes)-Y
A 53 9
B 57 10
C 58 12
D 62 15
E 65 12
F 50 10
G 59 9
H 51 10
I 53 12
J 57 12

You can use the following formula to calculate the Paired T- Score.


Now evaluate p-value from the T-table with (N-1) degrees of freedom. If the calculated value is greater than the evaluated p-value then we reject the null hypothesis that there is no difference between the means.



Please enter your comment!
Please enter your name here