What is a Two Sample T Hypothesis Test?

A two sample t hypothesis tests also known as independent t-test is used to analyze the difference between two unknown population means. The Two-sample T-test is used when the two small samples (n< 30) are taken from two different populations and compared. The underlying chart makes use of the T distribution.

Assumptions of Two Sample T Hypothesis Tests

  • The sample should be randomly selected from the two population
  • Samples are independent to each other
  • Two sample sizes must me less than 30
  • Samples collected from the population are normally distributed

When Would You Use a Two Sample T Hypothesis Tests?

The two sample t test most likely used to compare two process means, when the data is having one nominal variable and one measurement variable. It is a hypothesis test of means. Use two sample Z test if the sample size is more than 30.

The two sample hypothesis t tests is used to compare two population means, while analysis of variance (ANOVA) is the best option if more than two group means to be compared.

Two sample T hypotheis tests are performed when the two group samples are statistically independent to each other, while the paired t-test is used to compare the means of two dependent or paired groups. 

Note: There are (2) types of Two Sample T Hypothesis tests!

  • Two Sample T Hypothesis Test (Equal Variance)
    • Variance of two populations are equal
  • Two Sample T Hypothesis Test (Unequal Variance)
    • Variance of two populations are NOT equal

Methods to determine population varince equal or unequal?

The best method to determine population variance is equal or unequal by using an appropriate F-test.

Hypothesis Testing

tailed hypothesis is an assumption about a population parameter. The assumption may or may not be true. 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 same alternatively the difference between two population means are equal to hypothesized difference (d). So, µ1 = µ2  orµ1– µ2 = d
  • Alternative hypothesis: µ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

Two Sample T Hypothesis Tests
  • Where n1 and n2 are sample sizes
  • x̅1 and x̅2 are means of sample sizes
  • Sp is the pooled standard deviation

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 is less than or equal to the critical value
  • 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

Two Sample T test mostly performed in Analyze phase of DMAIC to evaluate the difference between two process means are really significant or due to random chance, this is basically used to validate the root cause(s) or Critical Xs (see the below example for more detail)

Two-tailed (Equal variance)

Example: Apple orchard farm owner wants to compare the two farms to see if there are any weight difference in the apples. From farm A, randomly collected 15 apples with an average weight of 86 gms, and the standard deviation is 7. From farm B, collected 10 apples with an average weight of 80 gms and standard deviation of 8. With a 95% confidence level, is there any difference in the farms?

  • 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

One and Two Sample T Tests
Two Tailed T Test

If the calculated t value is less than -2.069 or greater than 2.069, then reject the null hypothesis.

Test Statistic

Two Sample T Hypothesis Tests

Interpret the results:

Compare t calc to t critical . In hypothesis testing, a critical value is a point on the test distribution compares to the test statistic to determine whether to reject the null hypothesis. Calculated t statistic value less than the critical value, hence failed to reject null hypothesis ( H0). So, there is no significant difference between mean weights of apples in farm A and farm B.

Two Sample T 2 Tailed Equal Variance template file

Unlock Additional Members-only Content!

To unlock additional content, please upgrade now to a full membership.
Upgrade to a Full Membership
If you are a member, you can log in here.

Thank You for being a Member!

Here’s some of the bonus content that is only available to you as a paying member.

Two Sample T Hypothesis Test (Unequal Variance) Videos

Additional Two Sample T Hypothesis Tests Resources

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

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.