02 Jul 2020
On This Page

T-Test

02 Jul 2020
On This Page

Hypothesis testing can be done only when following 2 conditions are met:

  • Standard deviation of population is known
  • Sample size is greater than 30

But how will you test the hypothesis if these conditions are not fulfilled? Using t-test.

The t-distribution is :

  • kind of normal distribution
  • symmetric and single peaked, but less concentrated around its peak.
  • In layman’s terms, a t-distribution is shorter and flatter around the centre than a normal distribution.
  • is used to study the mean of a population, when the population has a distribution fairly close to a normal distribution (but not an exact normal distribution).

Two simple conditions to determine when to use the t-statistic are:

  • Population standard deviation is unknown, or
  • Sample size is less than 30

Even if one of them is applicable in a situation, you can comfortably go for a t-test. The formula to determine the t-statistic is:

Here, s is the sample standard deviation.

Let’s look at a problem to get a better understanding of the t-test.

The National Highways Authority of India (NHAI) stated that the average number of accidents per month on national highways is 12,000. A researcher wanted to test this claim. To that end, he collected 25 samples for 25 months and found out that the sample mean was 13,105 and the sample standard deviation was 1638.4.

Let’s now try to solve this problem according to the steps we discussed earlier. The hypothesis for this case will be:

In this case, you do not have the population standard deviation given. So, you will calculate the t-statistic.

Now, as done in the case of a normal test, you need to compare the value you calculated with the tabular value.
The sample size is 25, so, the degree of freedom .
This is a two-tailed t-test with a confidence level of 90%; so, the critical t-value is 1.71 [using the t-table, column (two-tails-0.10) and row (24) gives value 1.71] For a 90% confidence interval and a sample size of 25, the critical t-value is 1.71.

Link to the tutorial of critical t-value calculation

Thus, our acceptance region lies between +1.71 and -1.71.

As our calculated t-value lies outside the acceptance region, you reject the null hypothesis and can say that there is no sufficient evidence that the number of accidents is equal to 12,000 per month on the highways.

This was an example for one-sample t-test. Let’s now focus on the two sample t-test. As the name suggests, this test is conducted on two sets of sample data, in order to compare the means of two samples.

It should be noted that a two-sample test can be performed for multiple statistical parameters, but you are going to focus only on the two-sample test for means, where the standard deviations of both the samples are unknown.

The formula for the two-sample t-test is:

Suppose that you want to come up with a hypothesis test regarding the mean age difference between men and women. You can use the two-sample t-test in such a case.