Face to Face Surveyscvr

Two sample t-test calculator


Table of Contents

What is the two sample t-test?

The two sample t-test or independent samples test is a method of testing the unknown population means of two groups and seeing whether they are equal or not. 

The two sample t-test is generally used when the dataset values are independent and are randomly sampled from two populations without any biases and two independent groups have equal variances. If the variances don’t differ, you use a different estimate of the standard deviation.

Two sample t-test calculator Two sample t-test

Although, in cases where the sample size is small, one might not be able to test for normality. What you can rather do is assume the normality of your data or make use of a nonparametric test that doesn’t assume normality.

Transform your insight generation process

Create an actionable feedback collection process.

online survey

Using the two sample t-test

For using the two sample t-test, we need to have two variables, one which defines the two groups and the other is the measurement of interest. Another thing we have is a hypothesis that implies that the means of the two populations are different. An example of this is given by jmp:

  • We measure the grams of protein in two different brands of energy bars. Our two groups are the two brands. Our measurement is the grams of protein for each energy bar. Our idea is that the mean grams of protein for the underlying populations for the two brands may be different. We want to know if we have evidence that the mean grams of protein for the two brands of energy bars are different or not.

Requirements to conduct a valid two sample t-test:

  • Data values must be independent. The measurements for one observation should not affect measurements for any other observation.
  • Data in each group must be obtained by a random sampling of the respective population.
  • Data in each group must be normally distributed.
  • Data values must be continuous.
  • The variances for the two independent groups should be equal.

How to perform two sample t-test?

Two sample t-test calculator Two sample t-test

For each group we will need the average, sample size and the standard deviation like below:

Step 1: Averages 

As it is clear that the averages of the two groups are not the same, we find the difference between the averages which will depict the difference in the population means for the two groups. 


Step 2: Calculate the pool standard deviation

To calculate the standard deviation, we will first calculate the variance. This will form a combined estimate for the standard deviation which will adjust according to the group size.

Now for the variance, we will just take a square root of 38.88


Download Market Research Toolkit

Get market research trends guide, Online Surveys guide, Agile Market Research Guide & 5 Market research Template

Making the most of your B2B market research in 2021 PDF 3 s 1.png

Step 3: Calculate the test statistics

Using the averages, standard deviations and samples sizes, we will calculate the test statistics:

Step 4: Evaluate the difference between the means

For this, we will compare the test statistics to the theoretical value from the t-distribution. It goes like this:

  • Take the significance level (α) as 0.05 to suit your willingness to take the risks. It is good to make this decision before collecting the data and calculating test statistics.
  • Calculate the test statistics (2.80)
  • Look for the t-distribution tables online and find the theoretical value based on your null hypothesis. You can find this value using the significance level and degrees of freedom (df) like below:

Hence, the t-value with α = 0.05 and 21 degrees of freedom is 2.080.

  • We compare the value of statistics to the tvalue. If the value of statistic > tvalue, we reject the null hypothesis, else reject the alternative hypothesis. In our case, we reject the null hypothesis that the mean body fat for men and women are equal.

See Voxco survey software in action with a Free demo.

Explore all the survey question types
possible on Voxco

Read more