What is a Two Sample T Hypothesis Test?
Two sample t hypothesis tests, also called independent t-tests, check whether two population means differ. Use one when you compare samples from two independent groups and you don’t know the population standard deviations. The test statistic follows the t distribution.
Assumptions of Two Sample T Hypothesis Tests
- Each sample is randomly selected from its population
- The samples are independent of each other
- Population standard deviations are unknown (there is no rule that each sample must be smaller than 30)
- Each population is roughly normal. With larger samples, the test still holds up well when it is not.
When Would You Use a Two Sample T Hypothesis Tests?
Use the two sample t test to compare two process means, when the data have one nominal variable (the group) and one measurement variable. It is a hypothesis test of means. Use the two sample Z test only when both population standard deviations are known.
The two sample hypothesis t test is used to compare two population means, while analysis of variance (ANOVA) is the usual choice for more than two group means.
Run a two sample t test when the two groups are independent. If the same units are measured twice, or the groups are matched, use the paired t-test instead.
Two Types of Two Sample T Hypothesis Tests
- Two Sample T Hypothesis Test (Equal Variance)
- The two population variances are equal (pooled test)
- Two Sample T Hypothesis Test (Unequal Variance)
- The two population variances are not equal (Welch’s test)
How to Tell if the Population Variances Are Equal
Use an F-test when both samples are normal. Use Levene’s test when they are not. If unsure, use the unequal variance (Welch) test.
Hypothesis Testing
A hypothesis is a claim about a population parameter. The claim may or may not be true. In a tailed hypothesis test, the tail is where the rejection region sits. One-tailed hypothesis is a test of hypothesis where the area of rejection is only in one direction. Whereas two-tailed, the area of rejection is in two directions. The selection of one or two-tailed tests depends upon the problem.
- Null hypothesis H0: the population means are the same, or their difference equals a hypothesized difference d. So Β΅1 = Β΅2, or Β΅1 β Β΅2 = d
- Alternative hypothesis H1: Β΅1 β Β΅2, or Β΅1 β Β΅2 β d (two-tailed test)
- Β΅1 < Β΅2, or Β΅1 β Β΅2 < d (left-tailed)
- Β΅1 > Β΅2, or Β΅1 β Β΅2 > d (right-tailed)
Two Sample T Hypothesis Test (Equal Variance) Formula

- Where n1 and n2 are sample sizes
- xΜ 1 and xΜ 2 are the sample means
- Sp is the pooled standard deviation: Sp = β[((n1 β 1)S12 + (n2 β 1)S22) / (n1 + n2 β 2)]
Steps to Calculate Two Sample T Hypothesis Test (Equal Variance)
- State the claim of the test and determine the null hypothesis and alternative hypothesis
- Determine the level of significance
- Calculate degrees of freedom
- Find the critical value
- Calculate the test statistics
- Make a decision, the null hypothesis will be rejected if the test statistic falls in the rejection region: greater than the critical value for a right-tailed test, less than the negative critical value for a left-tailed test, or beyond either one for a two-tailed test
- Finally, Interpret the decision in the context of the original claim.
Example of a Two Sample T Hypothesis Test (Equal Variance) in a DMAIC Project
Teams most often run a two sample t test in the Analyze phase of DMAIC. It shows whether the difference between two process means is real or just random chance. That makes it a common way to verify a root cause or critical X. The examples below show how.
Two-tailed (Equal variance)
Example: An apple grower wants to know if apple weights differ between two farms. A random sample of 15 apples from farm A averages 86 g, with a standard deviation of 7 g. A sample of 10 apples from farm B averages 80 g, with a standard deviation of 8 g. At a 95% confidence level, do the farms differ?
- Null Hypothesis (H0) : Mean apple weight of farm A is equal to farm B
- Alternative Hypothesis (H1) : Mean apple weight of farm A is not equal to farm B
- n1=15
- n2=10
- S12=49
- S22 =64
- XΜ 1 =86
- XΜ 2 = 80
Significance level: Ξ±=0.05
Degrees of freedom: df = 15 + 10 β 2 = 23
Calculate critical value
Refer two tailed t table for 23 degrees of freedom


If the calculated t value is less than β2.069 or greater than 2.069, reject the null hypothesis.
Test Statistic


Interpret the Results
Compare tcalc to tcritical. A critical value is the point on the test distribution that marks the edge of the rejection region. Here t = 1.98, which sits between β2.069 and 2.069, so you fail to reject the null hypothesis (H0). The p-value is 0.059, just above 0.05. So the data do not show a significant difference in mean apple weight between farm A and farm B. With p this close to 0.05, a larger sample is worth collecting before you rule the farms the same.
Two Sample T 2 Tailed Equal Variance template file
Right-Tailed (Equal Variance)
Example: A researcher claims vendor A’s ceramic tiles are slightly thicker than vendor B’s. The researcher takes a random sample of 12 tiles from each vendor (vendor 1 and vendor 2 in the table). Assuming the population variances are equal, at 95% confidence level, is there enough evidence to support the claim?

- Null Hypothesis (H0) : Mean tile thickness of vendor A is equal to vendor B
- Alternative Hypothesis (H1) : Mean tile thickness of vendor A is greater than vendor B
- Significance level: Ξ±=0.05
- n1=12
- n2=12
Degrees of freedom: df = n1 + n2 β 2 = 12 + 12 β 2 = 22
Calculate mean (XΜ ) of each sample
- XΜ 1 = (x1 + x2 + β¦ + xn) / n = 18.67
- XΜ 2 = (x1 + x2 + β¦ + xn) / n = 18.50
Calculate variance (S2) of each sample
- S12 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1) = 8.61
- S22 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1) = 16.09
Calculate critical value
Refer one tailed t table for 22 degrees of freedom

If the calculated t value is greater than 1.717, then reject the null hypothesis.
Test Statistic


Interpret the results:

Compare tcalc to tcritical. Here t = 0.116 is less than 1.717, so it is not in the rejection region, and you fail to reject the null hypothesis (H0). The p-value is 0.454. So there is not enough evidence that vendor A’s tiles are thicker than vendor B’s.
Two Sample T Right Tailed Equal Variance template file
Left-Tailed (Equal Variance)
Example: A company samples sales of a new product in 12 similar shops in each of two US states. Is there evidence that sales in state A are lower than in state B? Assuming the population variances are equal, at 95% confidence level, is there enough evidence to support the claim?

- Null Hypothesis (H0) : Mean sales in state A is equal to the state B
- Alternative Hypothesis (H1) : Mean sales in state A is lesser than state B
- Significance level: Ξ±=0.05
- n1=12
- n2=12
Degrees of freedom: df = n1 + n2 β 2 = 12 + 12 β 2 = 22
Calculate mean (XΜ ) of each sample
- XΜ 1 = (x1 + x2 + β¦ + xn) / n = 44.67
- XΜ 2 = (x1 + x2 + β¦ + xn) / n = 42.75
Calculate variance (S2) of each sample
- S12 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1) = 53.3
- S22 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1) = 28.2
Calculate critical value
Refer one tailed t table for 22 degrees of freedom

If the calculated t value is less than β1.717, reject the null hypothesis.
Test Statistic


Interpret the results:

Compare tcalc to tcritical. Here t = 0.735 is greater than the critical value of β1.717, so it is not in the rejection region, and we fail to reject the null hypothesis (H0). The p-value is 0.765. In fact, state A’s mean is higher than state B’s, the opposite of the claim. So there is not enough evidence that mean sales in state A are lower than in state B.
Two Sample T Left Tailed Equal Variance template file
Two Sample T Hypothesis Test (Equal Variance) Videos
Two Sample T-Test for Means (Unequal Variance)
Use this version when you can’t assume the two population variances are equal. It is often called Welch’s t-test. It tests whether two means differ without pooling the variances.
Two Sample T Hypothesis Test (Unequal Variance) Formula

- Where n1 and n2 are sample sizes
- S12 & S22 are variances of sample 1 and sample 2
- xΜ 1 and xΜ 2 are the sample means
Assumptions of the Unequal Variance Test
- Observations (data):
- Are Normally distributed.
- Note: The method is fairly robust to non-normality, but the distributions should at least be roughly symmetric.
- Within and between samples (groups) are independent of each other.
- Are randomly βdrawnβ.
- Are continuous.
- Depending on some conditions (e.g. wide data range and field of applications), data that is not continuous (e.g. count) may still be used.
- Don’t use it for proportions or percentages. Use a two sample proportion test instead.
- Are Normally distributed.
- Variances are unknown and estimated by sample variances (S2).
- Population variances are not assumed equal. Ο12 may differ from Ο22.
Steps to Calculate Two Sample T Hypothesis Test (Unequal Variance)
Step 1 – Calculate mean (XΜ ) of each sample
- XΜ = (x1 + x2 + β¦ + xn) / n
- Where, x1, x2, β¦xn are observations in each sample (βn1β = sample size in sample 1 and βn2β = sample size in sample 2)
Step 2 – Calculate variance (S2) of each sample
- S2 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1)
Step 3 – Calculate t value

Step 4 – Calculate degrees of freedom (DF)

- Round to nearest integer
Step 5: Compare t-calc with critical value in the t-distribution table.
- Look up the critical t value in a t table, using the calculated degrees of freedom and the Ξ± (significance level) column:
- For 1 tailed test the t-critical is based on the given Ξ±
- The commonly used T-critical value for a 1 tailed test is in the 0.05 Ξ± column
- For 2 tailed test the t-critical is based on the given Ξ± divided by 2
- The commonly used T-critical value for a 2 tailed test is in the 0.025 Ξ± column
- For 1 tailed test the t-critical is based on the given Ξ±
Interpretation
- Finally, interpret the decision in the context of the original claim.
Example of a Two Sample T Hypothesis Test (Unequal Variance) in a DMAIC Project
Two-tailed (Unequal Variance)
Example: Dogs are fed with two different diets. Test if the two diets differ significantly as regards their effect on their weight. Assuming the population variance is unequal, at 95% confidence level, is there enough evidence to support the claim?

- Null Hypothesis (H0) : The mean dog weights are the same with Diet 1 and Diet 2
- Alternative Hypothesis (H1) : The mean dog weights are not the same with Diet 1 and Diet 2
- Significance level: Ξ±=0.05
- n1=10
- n2=10
Calculate mean (XΜ ) of each sample
- XΜ 1 = (x1 + x2 + β¦.+ xn) / n =24.4
- XΜ 2 = (x1 + x2 + β¦.+ xn) / n =20.00
Calculate variance (S2) of each sample
- S12 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1) = 25.6
- S22 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1) = 56.22
- S12/n1=2.56
- S22/n2=5.62
Calculate critical value
Calculate the degrees of freedom


Refer two tailed t table for 16 degrees of freedom

If the calculated t value is less than β2.120 or greater than 2.120, reject the null hypothesis.
Test Statistic


Interpret the results:

Compare tcalc to tcritical. Here t = 1.538 falls between β2.120 and 2.120, so it is not in the rejection region, and we fail to reject the null hypothesis (H0). The p-value is 0.144. So there is not enough evidence that mean dog weights differ between Diet 1 and Diet 2.
Two Sample T 2 Tailed Unequal Variance Template File
Right-tailed (Unequal Variance)
Example: A researcher believes that students in school A have better computer knowledge than school B. Randomly computer marks were collected from the two schools for the same curriculum. Assuming the population variance is unequal, at 95% confidence level, is there enough evidence to support the claim?

- Null Hypothesis (H0) : Mean students marks in school A is equal to the school B
- Alternative Hypothesis (H1) : Mean students marks in school A is greater than the school B
- Significance level: Ξ±=0.05
- n1=19
- n2=17
Calculate mean (XΜ ) of each sample
- XΜ 1 = (x1 + x2 + β¦.+ xn) / n =26.19
- XΜ 2 = (x1 + x2 + β¦.+ xn) / n =20.65
Calculate variance (S2) of each sample
- S12 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1) = 29.23
- S22 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1) = 84.95
- S12/n1=1.54
- S22/n2=5.00
Calculate critical value
Calculate the degrees of freedom


Refer one tailed t table for 25 degrees of freedom

If the calculated t value is greater than 1.708, then reject the null hypothesis.
Test Statistic


Interpret the results:

Compare tcalc to tcritical. Here t = 2.167 is greater than 1.708, so it falls in the rejection region, and we reject the null hypothesis (H0). The p-value is 0.020. So the data support the claim that school A’s mean mark is higher than school B’s.
Two Sample T Right Tailed Unequal Variance template file
Left-tailed (Unequal Variance)
Example: A manufacturer believes that breaking strength of plastic parts of supplier A is less than the supplier B. Operator randomly checked the breaking strength of plastic parts of two suppliers. Assuming the population variance is unequal, at 95% confidence level, is there enough evidence to support the claim?

- Null Hypothesis (H0) : Mean breaking strength of plastic parts of supplier A is equal to the supplier B
- Alternative Hypothesis (H1) : Mean breaking strength of plastic parts of supplier A is less than supplier B
- Significance level: Ξ±=0.05
- n1=12
- n2=12
Calculate mean (XΜ ) of each sample
- XΜ 1 = (x1 + x2 + β¦.+ xn) / n =161.67
- XΜ 2 = (x1 + x2 + β¦.+ xn) / n =158.08
Calculate variance (S2) of each sample
- S12 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1) = 10.97
- S22 = {(XΜ β x1)2 + (XΜ β x2)2 + β¦ + (XΜ β xn)2} / (n β 1) = 25.72
- S12/n1=0.91
- S22/n2=2.14
Calculate critical value
Calculate the degrees of freedom


Refer one tailed t table for 19 degrees of freedom

If the calculated t value is less than β1.729, reject the null hypothesis.
Test Statistic


Interpret the results:

Compare tcalc to tcritical. Here t = 2.049 is greater than the critical value of β1.729, so it is not in the rejection region, and we fail to reject the null hypothesis (H0). The p-value is 0.973. In fact, supplier A’s parts average stronger, not weaker. So there is not enough evidence that supplier A’s mean breaking strength is less than supplier B’s.
Two Sample T Left Tailed Unequal Variance Template File
Two Sample T Hypothesis Test (Unequal Variance) Videos
Additional Two Sample T Hypothesis Tests Resources
- http://www.cliffsnotes.com/math/statistics/univariate-inferential-tests/two-sample-t-test-for-comparing-two-meansΒ (two sample t test for comparing two means. With separate variances, a conservative df is the smaller of n1 β 1 and n2 β 1. With the pooled variance, df = n1 + n2 β 2.)
When you’re ready, there are a few ways I can help:
First, join 12,000+ other Six Sigma professionals by subscribing to my email newsletter. A short read every Monday to start your work week off correctly. Always free.
* * *
If you’re looking to pass your Six Sigma Yellow Belt, Green Belt or Black Belt exam, I’d recommend starting with my affordable study guide:
1)β π‘Pass Your Six Sigma Yellow Belt: built for ASQ, IASSC and ILSSI, 1,700+ practice questions with explanations, and six full-length mock exams for your exam
2)β π’Pass Your Six Sigma Green Belt: a study guide organized by the exam Body of Knowledge, 1,300+ practice questions with detailed answer explanations, and 20 full-length mock exams
3)β β«Pass Your Six Sigma Black Belt: the full Black Belt Body of Knowledge, 2,200+ practice questions with detailed answer explanations, and 20 full-length mock exams
You’ve spent so much effort learning Lean Six Sigma. Why leave passing your certification exam up to chance? This comprehensive study guide offers 1,700+ exam-like questions for Yellow Belts, 1,300+ for Green Belts and 2,200+ for Black Belts with full answer walkthroughs, access to instructors, detailed study material, and more.
β Thousands have used this system to prepare. Join them here.

Comments (7)
In the blood pressure question, can you please explain how you got 7.3 for s? No matter what I do, I am always getting to 7.08
Thanks for the head’s up, Jeremy. I see an opportunity for improvement on both of the examples listed. I’ll update asap.
Jeremy,
I added additional detail in the calculation steps.
For these equations with so many variables I find it helpful to go slowly and write out the smaller operations of each part of the calculation.
Does this make sense?
Hi,
the above states formula for Sample Variation as
S2 = {( X Barβ x1)2 + (X Bar β x2)2 + β¦ +(X Bar β xn)2} / n
however the IASSC Reference document is stating
S2 = {( X Barβ x1)2 + (X Bar β x2)2 + β¦ +(X Bar β xn)2} / n-1
Could you please clarify
Thanks
Maria
Thank you Maria,
When we divide by n in the sample variance S2, it is not an unbiased estimate of the population variance. Hence it is always recommended to use n-1 instead of n.
I have updated the formula
Thanks
The formula for Two Sample T Hypothesis Test (Unequal Variance) formula that you have doesn’t match the formula shown on the IASSC formula sheet. Specifically A = sqrt(s1^2/n1), B = sqrt(s2^2/n2) and the way you’ve shown it you have A = s1^2/n1, B = s2^2/n2. Please update.
Hello Gariel Smith,
The formula and calculations are correct, we cross-checked with the Quality Council of Indiana Book as well as the below websites.
https://www.real-statistics.com/students-t-distribution/two-sample-t-test-uequal-variances/
https://www.theopeneducator.com/doe/hypothesis-Testing-Inferential-Statistics-Analysis-of-Variance-ANOVA/Two-Sample-T-Test-Unequal-Variance
Thanks
Ramana