6.6 Specific Statistical Tests
Key Takeaways
- One-sample and two-sample Z-tests and t-tests evaluate population means depending on whether the population standard deviation (σ) is known or unknown.
- The paired t-test eliminates subject-to-subject variability by evaluating paired differences (d_i = x1_i - x2_i) with n - 1 degrees of freedom.
- Two-sample t-tests utilize a pooled variance estimator (s_p²) under equal population variances, or Welch's approximation under unequal variances.
- Chi-square (χ²) tests assess goodness-of-fit for categorical distributions (df = k - 1 - p) and independence in contingency tables (df = (r - 1)(c - 1)).
- One-Way ANOVA evaluates the equality of three or more group means by comparing variance between groups (MSB) against variance within groups (MSW) using an F-test statistic (F = MSB / MSW).
6.6 Specific Statistical Tests
Selecting and properly executing the correct statistical test is a fundamental competency for Certified Quality Engineers. The choice of test depends on the nature of the data (continuous vs. discrete), the number of samples being compared, whether samples are independent or paired, and whether population parameters (such as $\sigma$) are known.
1. Summary of Standard Statistical Tests
| Test Name | Data Type | Purpose / Comparison | Standard Statistic & Degrees of Freedom ($df$) |
|---|---|---|---|
| One-Sample $Z$-Test | Continuous | Compare sample mean to standard $\mu_0$ (known $\sigma$) | $Z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}$ |
| One-Sample $t$-Test | Continuous | Compare sample mean to standard $\mu_0$ (unknown $\sigma$) | $t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}$, $df = n - 1$ |
| Two-Sample $t$-Test (Pooled) | Continuous | Compare two independent means (assume $\sigma_1^2 = \sigma_2^2$) | $t = \frac{\bar{x}_1 - \bar{x}_2}{s_p \sqrt{\frac{1}{n_1} + \frac{1}{n_2}}}$, $df = n_1 + n_2 - 2$ |
| Paired $t$-Test | Continuous | Compare paired/matched samples (before vs. after) | $t = \frac{\bar{d} - \mu_d}{s_d / \sqrt{n}}$, $df = n - 1$ |
| $\chi^2$ Goodness-of-Fit | Categorical | Compare observed counts to expected model | $\chi^2 = \sum \frac{(O - E)^2}{E}$, $df = k - 1 - p$ |
| $\chi^2$ Independence | Categorical | Test independence of 2 variables in $r \times c$ table | $\chi^2 = \sum \frac{(O - E)^2}{E}$, $df = (r-1)(c-1)$ |
| One-Way ANOVA | Continuous | Compare $\ge 3$ independent group means | $F = \frac{MSB}{MSW}$, $df_1 = k - 1, df_2 = N - k$ |
2. One-Sample and Two-Sample $Z$-Tests and $t$-Tests for Means
One-Sample $t$-Test
When population standard deviation $\sigma$ is unknown, it is estimated using sample standard deviation $s$, introducing extra sampling variability. The test statistic follows Student's $t$-distribution with $df = n - 1$.
Two-Sample Independent $t$-Test (Equal Variances)
When comparing means from two independent groups assuming equal variances (verified via an $F$-test for variances), sample variances are combined into a pooled variance ($s_p^2$):
3. Paired $t$-Test for Dependent Samples
When data consists of paired measurements on the same experimental units (e.g., measuring roughness before and after polishing on $n$ identical parts), subject-to-subject variation is eliminated by analyzing individual differences $d_i = x_{1i} - x_{2i}$.
- Mean difference: $\bar{d} = \frac{\sum d_i}{n}$
- Sample standard deviation of differences: $s_d = \sqrt{\frac{\sum (d_i - \bar{d})^2}{n - 1}}$
- Test statistic:
CQE Tip: The paired $t$-test has $n - 1$ degrees of freedom (where $n$ is the number of pairs), which is half the degrees of freedom of an independent two-sample test ($2n - 2$). However, by removing background variance between units, pairing dramatically reduces error variance and increases test sensitivity.
4. Chi-Square ($\chi^2$) Tests: Goodness-of-Fit and Independence
Chi-square tests evaluate non-parametric categorical count data.
where $O_i$ is the Observed frequency and $E_i$ is the Expected frequency.
Goodness-of-Fit Test
Evaluates whether observed sample counts fit a theoretical distribution (e.g., Poisson, Normal, Binomial). Expected count $E_i = n \cdot p_i$. Degrees of freedom $df = k - 1 - p$, where $k$ is the number of categories and $p$ is the number of parameters estimated from sample data.
Test of Independence (Contingency Tables)
Evaluates whether two categorical variables (e.g., defect type vs. manufacturing shift) are independent in an $r \times c$ table. Expected frequencies are computed as:
5. One-Way Analysis of Variance (ANOVA) $F$-Test
When comparing $k \ge 3$ group means, running multiple pairwise $t$-tests causes alpha inflation: overall Type I error risk rises to $\alpha_{overall} = 1 - (1 - \alpha)^C$, where $C = \frac{k(k-1)}{2}$. One-Way ANOVA avoids this by testing $H_0: \mu_1 = \mu_2 = \dots = \mu_k$ simultaneously.
ANOVA partitions total sum of squares ($SST$) into between-group variation ($SSB$) and within-group error variation ($SSW$):
- Between-Group Mean Square ($MSB$): $MSB = \frac{SSB}{k - 1}$
- Within-Group Mean Square ($MSW$): $MSW = \frac{SSW}{N - k}$ (where $N = \sum n_i$)
- $F$-Statistic: $F_{calc} = \frac{MSB}{MSW}$ with $df_1 = k - 1$ and $df_2 = N - k$
6. Worked Example: One-Way ANOVA for Machining Line Performance
Scenario: A quality engineer compares hole diameter measurements across $k = 3$ CNC machining lines. Sample size is $n_i = 5$ parts per line (Total $N = 15$).
- Line A mean $= 10.2\text{ mm}$
- Line B mean $= 12.4\text{ mm}$
- Line C mean $= 13.4\text{ mm}$
- Overall Grand Mean $\bar{x}_{..} = 12.0\text{ mm}$
- Calculated $SSB = 26.8$, and calculated $SSW = 18.0$.
Test at $\alpha = 0.05$ ($F_{crit, 0.05, 2, 12} = 3.89$) whether machine line means differ significantly.
Step-by-Step ANOVA Solution:
- Degrees of Freedom:
- $df_{between} = k - 1 = 3 - 1 = 2$
- $df_{within} = N - k = 15 - 3 = 12$
- $df_{total} = N - 1 = 14$
- Mean Squares:
- $MSB = \frac{SSB}{df_{between}} = \frac{26.8}{2} = 13.4$
- $MSW = \frac{SSW}{df_{within}} = \frac{18.0}{12} = 1.5$
- Calculate $F$-Statistic:
- Decision: Since $F_{calc} = 8.933 > F_{crit} = 3.89$, reject $H_0$. There is statistically significant evidence at $\alpha = 0.05$ that at least one CNC machining line mean differs from the others.
A quality engineer evaluates two independent production lines for average part length. Sample 1 (n1 = 16, s1² = 12) and Sample 2 (n2 = 16, s2² = 20) are drawn. Assuming equal population variances, what is the pooled variance s_p²?
A contingency table categorizing defective units across 4 manufacturing shifts (rows) and 3 defect categories (columns) is analyzed for independence. How many degrees of freedom (df) must be used to find the Chi-square (χ²) critical value?
An ANOVA test comparing 4 heat-treatment processes (k = 4) with 6 specimens per process (total N = 24) yields a Between-Group Sum of Squares (SSB) of 120 and Within-Group Sum of Squares (SSW) of 100. What is the calculated F-statistic?