PracticeVideosBlogFlashcards

9.2 One-Sample and Two-Sample t-Tests for Means

Key Takeaways

  • Student's t-tests are parametric inferential tests for continuous data when the population standard deviation σ is unknown and estimated by the sample standard deviation s, introducing heavier tails and degrees of freedom.

  • The One-Sample t-test compares a single sample mean (x̄) against a known target or historical specification (μ0) with degrees of freedom df = n - 1.

  • The Two-Sample Independent t-test compares the means of two mutually exclusive groups; an F-test or Levene's test must be conducted first to determine whether to use pooled variance (df = n1 + n2 - 2) or Welch's unpooled variance.

  • Pooled variance combines the sample variances weighted by their degrees of freedom when population variances are equal, whereas Welch's test adjusts degrees of freedom downward to protect against unequal variances.

  • If the 95% Confidence Interval for the difference between two means encompasses zero, fail to reject H0 (p > 0.05); if the entire interval excludes zero, reject H0 (p ≤ 0.05).

Last updated: September 2026

9.2 One-Sample and Two-Sample t-Tests for Means

Quick Summary: In the Analyze and Improve phases of DMAIC, continuous metrics—such as component dimensions, cycle times, pressure, fluid temperature, and chemical concentrations—must be statistically evaluated to validate root causes or verify that solutions shifted process averages. When the true population standard deviation σ\sigma is unknown, practitioners utilize Student's tt-tests. The One-Sample tt-test compares a single sample mean (xˉ\bar{x}) to a hypothesized target or customer specification (μ0\mu_0). The Two-Sample Independent tt-test compares means from two mutually exclusive groups (μ1\mu_1 vs. μ2\mu_2), requiring an preliminary FF-test to determine whether to pool variances or deploy Welch's unpooled formulation.


Foundations of Parametric Means Testing

A parametric test makes specific mathematical assumptions regarding the parameters of the underlying probability distribution from which sample data is drawn. The three core parametric assumptions for tt-tests are:

  1. Continuous Metric Data: The dependent response variable (YY) is measured on a continuous interval or ratio scale (e.g., millimeters, seconds, degrees Celsius, foot-pounds).
  2. Random and Independent Sampling: Data observations are collected randomly, and the measurement of one unit does not influence or depend upon another.
  3. Normality: The data within each group is approximately normally distributed. By virtue of the Central Limit Theorem, tt-tests are robust against moderate violations of normality when subgroup sample sizes satisfy n≥30n \ge 30.

When these assumptions hold, the tt-test family provides the most statistically powerful framework available for evaluating continuous means.


Why Student's t Instead of Z?

When evaluating a sample mean, if the true population standard deviation σ\sigma were known from exhaustive historical records, the test statistic would follow the Standard Normal ZZ-distribution:

Z=xˉ−μ0σ/nZ = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}

However, in real-world industrial environments, the population standard deviation σ\sigma is virtually never known. Practitioners must estimate σ\sigma using the sample standard deviation (ss):

s=∑i=1n(xi−xˉ)2n−1s = \sqrt{\frac{\sum_{i=1}^n (x_i - \bar{x})^2}{n - 1}}

Because ss varies from sample to sample, substituting ss for σ\sigma introduces an additional source of random sampling error. In 1908, William Sealy Gosset (publishing under the pen name "Student" while working at the Guinness Brewery in Dublin) derived the Student's tt-distribution to account for this extra variability.

               Comparison of Z vs. Student's t-Distribution

                        ┌───┐ ◀── Z Distribution (Taller peak, thin tails)
                     ┌──┘   └──┐
                   ┌─┘  ┌───┐  └─┐
                 ┌─┘ ┌──┘   └──┐ └─┐ ◀── t Distribution (Lower peak, fat tails)
              ───┴───┴─────────┴───┴───
                 -3  -2  -1  0   1   2   3
  • The tt-distribution is symmetric and bell-shaped with a mean of 0, but features heavier (fatter) tails and a lower center peak than the standard normal curve.
  • The heavier tails mean that extreme values occur more frequently, requiring larger critical values to achieve statistical significance at a given α\alpha.
  • Governed by degrees of freedom (dfdf); as sample size increases (df→∞df \to \infty), the tt-distribution converges toward the standard normal ZZ-distribution.

The One-Sample t-Test

Purpose & Operational Context

The One-Sample tt-test evaluates whether the arithmetic mean of a single continuous sample (xˉ\bar{x}) is statistically significantly different from a known benchmark, engineering specification, historical standard, or contractual target (μ0\mu_0), when σ\sigma is unknown.

Test Statistic & Formula

tcalc=xˉ−μ0s/nt_{\text{calc}} = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}

Where:

  • xˉ=\bar{x} = Sample mean
  • μ0=\mu_0 = Hypothesized population target
  • s=s = Sample standard deviation
  • n=n = Sample size
  • Standard Error: SE=sn\text{Standard Error: } SE = \frac{s}{\sqrt{n}}
  • Degrees of Freedom: df=n−1\mathbf{Degrees\ of\ Freedom:}\ df = n - 1

Step-by-Step Worked Example: One-Sample tt-Test

Scenario: A precision CNC milling center produces stainless steel shafts with an engineering target diameter of μ0=50.00 mm\mu_0 = 50.00\text{ mm}. A quality engineer samples n=16n = 16 consecutive shafts to verify machine calibration. The sample yields:

  • Sample mean: xˉ=50.08 mm\bar{x} = 50.08\text{ mm}
  • Sample standard deviation: s=0.12 mms = 0.12\text{ mm}
  • Significance level: α=0.05\alpha = 0.05 (two-tailed)

Step 1: State the Hypotheses

  • H0:μ=50.00 mmH_0: \mu = 50.00\text{ mm} (Machine is on target)
  • Ha:μ≠50.00 mmH_a: \mu \ne 50.00\text{ mm} (Machine has drifted off target)

Step 2: Determine Degrees of Freedom and Critical tt-Value

  • df=n−1=16−1=15df = n - 1 = 16 - 1 = 15
  • Looking up a two-tailed tt-distribution table at α=0.05\alpha = 0.05 (0.0250.025 per tail) with df=15df = 15: tcrit=±2.131t_{\text{crit}} = \pm 2.131

Step 3: Calculate the Test Statistic (tcalct_{\text{calc}})

  • Standard Error: SE=sn=0.1216=0.124=0.030 mmSE = \frac{s}{\sqrt{n}} = \frac{0.12}{\sqrt{16}} = \frac{0.12}{4} = 0.030\text{ mm}
  • tcalc=50.08−50.000.030=+0.080.030=+2.667t_{\text{calc}} = \frac{50.08 - 50.00}{0.030} = \frac{+0.08}{0.030} = +2.667

Step 4: Formulate the Decision and Confidence Interval

  • Decision Rule: Reject H0H_0 if ∣tcalc∣≥2.131|t_{\text{calc}}| \ge 2.131.
  • Since ∣+2.667∣>2.131|+2.667| > 2.131 (corresponding to software p=0.0177<0.05p = 0.0177 < 0.05), we Reject H0H_0.
  • 95% Confidence Interval for μ\mu: CI=xˉ±tα/2,df×SE=50.08±(2.131×0.030)=50.08±0.0639=[50.016 mm,50.144 mm]CI = \bar{x} \pm t_{\alpha/2, df} \times SE = 50.08 \pm (2.131 \times 0.030) = 50.08 \pm 0.0639 = [50.016\text{ mm}, 50.144\text{ mm}]
  • Notice that the 95% CI [50.016,50.144][50.016, 50.144] excludes the target value of 50.00 mm50.00\text{ mm}, confirming rejection of H0H_0.
  • Conclusion: There is statistically significant evidence at α=0.05\alpha = 0.05 that the CNC machine has drifted off target; the mean shaft diameter (50.08 mm50.08\text{ mm}) is significantly greater than 50.00 mm50.00\text{ mm}.

The Two-Sample Independent t-Test

Purpose & Architecture

The Two-Sample Independent tt-test compares the means of two mutually exclusive, unrelated groups to determine whether they originate from populations with identical means:

  • Comparing yield strength between Supplier A and Supplier B.
  • Comparing cycle time between Day Shift and Night Shift.
  • Comparing wear rates between Machine 1 and Machine 2.
                  Two-Sample Independent t-Test Architecture

      GROUP 1 (e.g., Supplier A)                   GROUP 2 (e.g., Supplier B)
    Independent Random Sample                    Independent Random Sample
    n1, x̄1, s1                                   n2, x̄2, s2
         │                                            │
         └─────────────────────┬──────────────────────┘
                               ▼
                    Compare Means: μ1 vs. μ2
                     H0: μ1 - μ2 = 0 (Equal)
                     Ha: μ1 - μ2 ≠ 0 (Different)

Critical Pre-requisite: The F-Test for Equal Variances

Before running an independent two-sample tt-test, the Green Belt must verify whether the two population variances are equal (σ12=σ22\sigma_1^2 = \sigma_2^2). This is tested using an FF-test of Variances (or Levene's test):

Fcalc=s12s22(Placing the larger sample variance in the numerator)F_{\text{calc}} = \frac{s_1^2}{s_2^2} \quad (\text{Placing the larger sample variance in the numerator})
  • If Variances are Equal (p≥0.05p \ge 0.05): Use the Pooled Two-Sample tt-test.
  • If Variances are Unequal (p<0.05p < 0.05): Use Welch's Unpooled tt-test.

Case A: Pooled Two-Sample tt-Test (Equal Variances Assumed)

When variances are homogeneous, the two sample variances are weighted and combined into a single pooled variance estimate (sp2s_p^2):

sp2=(n1−1)s12+(n2−1)s22n1+n2−2s_p^2 = \frac{(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2}{n_1 + n_2 - 2} SEpooled=sp1n1+1n2SE_{\text{pooled}} = s_p \sqrt{\frac{1}{n_1} + \frac{1}{n_2}} tcalc=(xˉ1−xˉ2)−(μ1−μ2)0sp1n1+1n2t_{\text{calc}} = \frac{(\bar{x}_1 - \bar{x}_2) - (\mu_1 - \mu_2)_0}{s_p \sqrt{\frac{1}{n_1} + \frac{1}{n_2}}} Degrees of Freedom: df=n1+n2−2\mathbf{Degrees\ of\ Freedom:}\ df = n_1 + n_2 - 2

Exam Trap: Notice why df=n1+n2−2df = n_1 + n_2 - 2. Two degrees of freedom are lost because two independent sample statistics (xˉ1\bar{x}_1 and xˉ2\bar{x}_2) are estimated from the data.

Case B: Welch's Unpooled tt-Test (Unequal Variances)

When variances are unequal, pooling is mathematically invalid. Welch's test uses individual sample standard deviations:

SEunpooled=s12n1+s22n2SE_{\text{unpooled}} = \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}} tcalc=xˉ1−xˉ2s12n1+s22n2t_{\text{calc}} = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}

Degrees of freedom are calculated using the Welch-Satterthwaite approximation:

df=(s12n1+s22n2)2(s12/n1)2n1−1+(s22/n2)2n2−1df = \frac{\left( \frac{s_1^2}{n_1} + \frac{s_2^2}{n_2} \right)^2}{\frac{(s_1^2 / n_1)^2}{n_1 - 1} + \frac{(s_2^2 / n_2)^2}{n_2 - 1}}

This formula adjusts dfdf downward into a non-integer value to compensate for variance disparity, protecting against inflated Type I error.


Step-by-Step Worked Example: Pooled Two-Sample tt-Test

Scenario: A Green Belt investigates whether a new quenching oil formulation improves the hardness of carbon steel gears. Two independent production batches are quenched using Oil A (standard) and Oil B (new formulation). Hardness is measured in Rockwell C (HRC):

GroupSample Size (nn)Sample Mean (xˉ\bar{x})Sample Std Dev (ss)
Oil A (Standard)n1=12n_1 = 12xˉ1=58.2 HRC\bar{x}_1 = 58.2\text{ HRC}s1=1.4 HRCs_1 = 1.4\text{ HRC}
Oil B (New)n2=14n_2 = 14xˉ2=60.1 HRC\bar{x}_2 = 60.1\text{ HRC}s2=1.6 HRCs_2 = 1.6\text{ HRC}

Test whether the new quenching oil significantly increases gear hardness at α=0.05\alpha = 0.05.

Step 1: Formulate Hypotheses

  • H0:μ2−μ1≤0H_0: \mu_2 - \mu_1 \le 0 (Oil B does not increase hardness)
  • Ha:μ2−μ1>0H_a: \mu_2 - \mu_1 > 0 (Oil B significantly increases hardness; one-tailed upper test)

Step 2: Verify Equality of Variances

  • Fcalc=s22s12=(1.6)2(1.4)2=2.561.96=1.306F_{\text{calc}} = \frac{s_2^2}{s_1^2} = \frac{(1.6)^2}{(1.4)^2} = \frac{2.56}{1.96} = 1.306
  • Degrees of freedom: df1=14−1=13df_1 = 14 - 1 = 13, df2=12−1=11df_2 = 12 - 1 = 11.
  • Critical F0.05,13,11=2.79F_{0.05, 13, 11} = 2.79. Since 1.306<2.791.306 < 2.79 (p>0.10p > 0.10), variances are homogeneous. Proceed with pooled tt-test.

Step 3: Compute Pooled Variance (sp2s_p^2) and Standard Error

sp2=(12−1)(1.4)2+(14−1)(1.6)212+14−2=(11)(1.96)+(13)(2.56)24=21.56+33.2824=54.8424=2.285s_p^2 = \frac{(12 - 1)(1.4)^2 + (14 - 1)(1.6)^2}{12 + 14 - 2} = \frac{(11)(1.96) + (13)(2.56)}{24} = \frac{21.56 + 33.28}{24} = \frac{54.84}{24} = 2.285 sp=2.285=1.5116 HRCs_p = \sqrt{2.285} = 1.5116\text{ HRC} SEdiff=sp1n1+1n2=1.5116112+114=1.51160.0833+0.0714=1.51160.1548=1.5116×0.3934=0.5947 HRCSE_{\text{diff}} = s_p \sqrt{\frac{1}{n_1} + \frac{1}{n_2}} = 1.5116 \sqrt{\frac{1}{12} + \frac{1}{14}} = 1.5116 \sqrt{0.0833 + 0.0714} = 1.5116 \sqrt{0.1548} = 1.5116 \times 0.3934 = 0.5947\text{ HRC}

Step 4: Calculate Test Statistic (tcalct_{\text{calc}})

tcalc=(xˉ2−xˉ1)−0SEdiff=60.1−58.20.5947=1.900.5947=+3.195t_{\text{calc}} = \frac{(\bar{x}_2 - \bar{x}_1) - 0}{SE_{\text{diff}}} = \frac{60.1 - 58.2}{0.5947} = \frac{1.90}{0.5947} = +3.195

Step 5: Make Statistical Decision

  • Degrees of freedom: df=n1+n2−2=12+14−2=24df = n_1 + n_2 - 2 = 12 + 14 - 2 = 24
  • Critical value for one-tailed test at α=0.05\alpha = 0.05 with df=24df = 24: tcrit=+1.711t_{\text{crit}} = +1.711
  • Since tcalc=+3.195>+1.711t_{\text{calc}} = +3.195 > +1.711 (p=0.0019<0.05p = 0.0019 < 0.05), Reject H0H_0.
  • Conclusion: Quenching Oil B delivers a statistically significant increase in gear hardness of approximately 1.90 HRC1.90\text{ HRC} (p=0.0019p = 0.0019).

Interpreting Statistical Output & Confidence Intervals for Differences

Statistical packages output both test statistics (tt, pp) and an associated Confidence Interval for the Difference:

                  Interpreting the Confidence Interval for (μ1 - μ2)

   INTERVAL CONTAINS ZERO: [-2.5, +1.8]          INTERVAL EXCLUDES ZERO: [+1.4, +5.2]
        -2.5        0       +1.8                        0   +1.4          +5.2
         ├───┼──────┼────────┼──┤                       ├───┼──────┼───────┼──┤
             ▲      ▲        ▲                              ▲      ▲       ▲
             LCL    Zero    UCL                             Zero  LCL     UCL
   ─────────────────────────────────────         ─────────────────────────────────────
   FAIL TO REJECT H0 (p > 0.05)                  REJECT H0 (p ≤ 0.05)
   Difference may be zero (No effect)            Statistically significant difference!
  • If the 95% CI contains 0 (e.g., [−1.40,+2.80][-1.40, +2.80]): Zero is a plausible value for the true difference. Therefore, p>0.05p > 0.05; Fail to Reject H0H_0.
  • If the 95% CI excludes 0 (e.g., [+1.20,+4.50][+1.20, +4.50] or [−6.10,−1.80][-6.10, -1.80]): Zero is ruled out as a plausible value. Therefore, p≤0.05p \le 0.05; Reject H0H_0.

Summary Selection Matrix for Continuous Means

Test NameSubgroupsData RelationshipPopulation σ\sigma StatusDegrees of Freedom (dfdf)Common Six Sigma Use Case
One-Sample ZZ-test1 sampleSingle sample vs specificationKnown (Rare)∞\infty (ZZ-table)Baseline standard deviation known from long history.
One-Sample tt-test1 sampleSingle sample vs specificationUnknown (Estimated by ss)df=n−1df = n - 1Verifying if current production meets specification target.
Two-Sample Pooled tt-test2 samplesIndependent / UnrelatedUnknown (Equal variances, p≥0.05p \ge 0.05)df=n1+n2−2df = n_1 + n_2 - 2Comparing mean cycle times of Line 1 vs Line 2.
Welch's Two-Sample tt-test2 samplesIndependent / UnrelatedUnknown (Unequal variances, p<0.05p < 0.05)Welch-Satterthwaite approxComparing suppliers with vastly different process variability.

Critical CSSC Exam Traps

  • Trap 1: Skipping the Equal Variance Check — Running a pooled two-sample tt-test without verifying variance equality via an FF-test risks invalid conclusions if variances differ significantly.
  • Trap 2: Degrees of Freedom Confusion — For a pooled two-sample tt-test, degrees of freedom is df=n1+n2−2df = n_1 + n_2 - 2, NOT n1+n2−1n_1 + n_2 - 1.
  • Trap 3: One-Sided vs. Two-Sided Output — Most statistical software packages report two-tailed pp-values by default. If your hypothesis is directional (one-tailed) and the sample shifted in the hypothesized direction, the one-tailed pp-value is ptwo-tailed/2p_{\text{two-tailed}} / 2.
  • Trap 4: Misinterpreting Difference CIs — If a 95% CI for (μ1−μ2)(\mu_1 - \mu_2) is [−0.4,+3.2][-0.4, +3.2], the test cannot reject H0H_0 at α=0.05\alpha = 0.05 because zero is contained in the interval.
Loading diagram...
Continuous Means Test Selection Flowchart
Test Your Knowledge

A Six Sigma project team compares customer call handle times between a domestic service center (n1 = 24, s1 = 1.8 min) and an offshore service center (n2 = 30, s2 = 1.9 min). An F-test confirms that the population variances are equal (p = 0.74). The team executes a pooled Two-Sample t-test. How many degrees of freedom (df) are associated with this test?

A

53 degrees of freedom

B

52 degrees of freedom

C

23 degrees of freedom

D

29 degrees of freedom

Test Your Knowledge

A continuous improvement team evaluates a new drying oven configuration intended to reduce cycle time. The statistical software output for a Two-Sample t-test comparing the new oven to the baseline oven reports: Difference = μ_New - μ_Old; Estimate for difference: -3.40 minutes; 95% Confidence Interval for difference: [-5.10, -1.70] minutes; t-value = -3.95; p-value = 0.0004. At α = 0.05, what is the correct statistical conclusion?

A

Reject H0; the new oven provides a statistically significant reduction in mean cycle time because the p-value is well below 0.05 and the entire 95% confidence interval is strictly negative and excludes zero.

B

Fail to reject H0; the difference is not statistically significant because the t-statistic is negative.

C

Fail to reject H0; the confidence interval does not encompass zero, indicating that the true mean difference is zero.

D

Reject H0; but conclude that the new oven increased cycle time by an average of 3.40 minutes.

Test Your Knowledge

A quality engineer evaluates two automated chemical filling nozzles. Nozzle 1 has a sample variance of s1² = 4.8 mL² with n1 = 15, while Nozzle 2 has a sample variance of s2² = 18.2 mL² with n2 = 15. A preliminary F-test for equal variances yields p = 0.008. If the engineer wishes to test whether the two nozzles deliver different mean fill volumes, which testing protocol must be used?

A

Pooled Two-Sample t-test with df = 28

B

One-Sample t-test comparing the pooled variance against nominal

C

Welch's Unpooled Two-Sample t-test with adjusted degrees of freedom

D

Standard Normal Z-test assuming known population variances

Sections you finish are checked off in the contents.