That 1 Question on t-test!

Lokesh Rathi
Analytics Vidhya
Published in
3 min readAug 4, 2020

Ever been stuck with the t-test/t-value problem statement during your Interview?

After going through a lot of good articles on t-test, I have prepared a summary of all the questions asked and the information you need to possess on t-test!

Q: What is a t-test?

A t-test is a statistical test that is used to compare the means of two different groups. It is often used in Hypothesis testing, to check if two groups have any similarity in other words, if the difference in the mean of two groups is Zero.

Null hypothesis: It is a prediction of no relationship between the variables you are interested in.
Alternate Hypothesis: It is just the opposite of Null hypothesis, meaning that there is a relationship between the variables we are interested in.

Photo by Coffee Geek on Unsplash

Q: What does a t-test measure?

A t-test measures the difference in the means of the two group we are interested in divided by the pooled standard error of the two group means.

Source: Google

In this formula, t is the t-value, x and x2 are the means of the two groups being compared, is the pooled standard error of the two groups, and n1 and n2 are the number of observations in each of the groups.

In this way, it calculates a number (the t-value) illustrating the magnitude of the difference between the two group means being compared

Q: What are the different t-test and when to choose them?

There are 3 types of t-test:

  1. Paired t-test
  2. One- Sample t-test
  3. two-sample t-test

If you are studying one group, use a paired t-test to compare the group mean over time or after an intervention, or use a one-sample t-test to compare the group mean to a standard value. If you are studying two groups, use a two-sample t-test.

If you want to know only whether a difference exists, use a two-tailed test. If you want to know if one group mean is greater or less than the other, use a left-tailed or right-tailed one-tailed test.

Q : Can we use t-test for testing more than 2 groups?

No, t-test cannot be performed for more than 2 groups, it takes in only maximum 2 groups and for testing more than 2 groups, we use something known as ANOVA test. (A soon to be published article).

I hope this comes at handy during your preparations! Let’s connect and share more knowledge.

LinkedIn

You may want to follow me for more of such Intuitive and Informative content!

--

--

Lokesh Rathi
Analytics Vidhya

I write articles on Data Science, Machine learning Algorithm and Big Data.