The Kruskal-Wallis test plays a critical role in Six Sigma analysis. It helps you compare multiple groups when your data does not meet normality assumptions. Many real-world processes produce skewed, ordinal, or non-normal data. Therefore, this test becomes a powerful alternative to ANOVA.
In this guide, you will learn how the Kruskal-Wallis test works, when to use it, and how to apply it in Six Sigma projects. You will also see step-by-step examples, practical tables, and real manufacturing scenarios.
- What Is the Kruskal-Wallis Test?
- Why the Kruskal-Wallis Test Matters in Six Sigma
- When Should You Use the Kruskal-Wallis Test?
- Kruskal-Wallis vs ANOVA
- How the Kruskal-Wallis Test Works
- The Kruskal-Wallis Formula
- Hypotheses in the Kruskal-Wallis Test
- Step-by-Step Example (Manufacturing Case)
- Interpreting Results in Six Sigma
- Post-Hoc Analysis After Kruskal-Wallis
- Example: Post-Hoc Insight
- Real Six Sigma Applications
- Example: Customer Satisfaction Analysis
- Advantages of the Kruskal-Wallis Test
- Limitations You Should Know
- Kruskal-Wallis in the DMAIC Framework
- Example: DMAIC Application
- Software Tools for Kruskal-Wallis Test
- Best Practices for Six Sigma Professionals
- Common Mistakes to Avoid
- Visualizing Kruskal-Wallis Results
- Advanced Insight: Effect Size
- Kruskal-Wallis vs Mann-Whitney Test
- Real-World Case Study
- How to Explain Results to Stakeholders
- Key Takeaways
- Conclusion
What Is the Kruskal-Wallis Test?
The Kruskal-Wallis test is a non-parametric statistical test. It compares three or more independent groups. Unlike ANOVA, it does not assume normal distribution.
Instead of using raw data, it uses ranks. This approach makes it robust against outliers and skewed distributions.
Key idea
- It tests whether the medians of multiple groups differ
- It uses ranked data instead of raw values
- It works well with ordinal or non-normal data
Why the Kruskal-Wallis Test Matters in Six Sigma
Six Sigma focuses on reducing variation and improving processes. However, real-world data rarely behaves perfectly.
You often encounter:
- Skewed cycle times
- Non-normal defect counts
- Ordinal customer satisfaction scores
- Small sample sizes
Because of this, traditional ANOVA may fail. That is where the Kruskal-Wallis test adds value.
Practical benefits
| Benefit | Why It Matters in Six Sigma |
|---|---|
| No normality assumption | Works with real process data |
| Handles outliers | Reduces distortion in analysis |
| Works with ordinal data | Useful for surveys and ratings |
| Simple interpretation | Easy to explain to stakeholders |
When Should You Use the Kruskal-Wallis Test?
You should use this test under specific conditions. Otherwise, you risk incorrect conclusions.
Use it when:
- You compare 3 or more groups
- Your data is non-normal
- Your data is ordinal or ranked
- Samples are independent
Avoid it when:
- Data is normal and meets ANOVA assumptions
- Groups are dependent (use Friedman test instead)
- Sample sizes are extremely small
Kruskal-Wallis vs ANOVA
Many practitioners struggle to choose between these two tests. The decision depends on your data.
Comparison table
| Feature | Kruskal-Wallis Test | One-Way ANOVA |
|---|---|---|
| Data type | Ordinal or continuous | Continuous |
| Distribution | Not required | Must be normal |
| Outlier sensitivity | Low | High |
| Uses ranks | Yes | No |
| Compares | Medians | Means |
Quick rule
- Use ANOVA for clean, normal data
- Use Kruskal-Wallis for real-world messy data
How the Kruskal-Wallis Test Works
The test follows a structured process. It converts raw data into ranks and then compares rank sums.
Step-by-step logic
- Combine all data from all groups
- Rank all values from smallest to largest
- Calculate rank sums for each group
- Compute the test statistic (H)
- Compare H to a chi-square distribution
The Kruskal-Wallis Formula
Where:
- N = total number of observations
- k = number of groups
- Rᵢ = sum of ranks for group i
- nᵢ = sample size of group i
Hypotheses in the Kruskal-Wallis Test
Every Six Sigma analysis starts with hypotheses.
Null hypothesis (H₀)
All group medians are equal.
Alternative hypothesis (H₁)
At least one group median differs.
Step-by-Step Example (Manufacturing Case)
Let’s walk through a practical Six Sigma example.
Scenario
A process engineer wants to compare cycle times across three machines.
Data (minutes)
| Machine A | Machine B | Machine C |
|---|---|---|
| 10 | 14 | 18 |
| 12 | 16 | 20 |
| 11 | 15 | 19 |
Step 1: Combine and Rank Data
| Value | Rank |
|---|---|
| 10 | 1 |
| 11 | 2 |
| 12 | 3 |
| 14 | 4 |
| 15 | 5 |
| 16 | 6 |
| 18 | 7 |
| 19 | 8 |
| 20 | 9 |
Step 2: Sum Ranks by Group
| Group | Rank Sum |
|---|---|
| Machine A | 1 + 2 + 3 = 6 |
| Machine B | 4 + 5 + 6 = 15 |
| Machine C | 7 + 8 + 9 = 24 |
Step 3: Apply Formula
You plug values into the formula and compute H.
Step 4: Compare to Critical Value
If H exceeds the critical chi-square value, you reject H₀.
Conclusion
Machine cycle times differ significantly. Therefore, the process engineer should investigate root causes.
Interpreting Results in Six Sigma
Interpretation matters as much as calculation.
Key points
- A low p-value (< 0.05) indicates significant differences
- The test does not show which group differs
- You need post-hoc testing for deeper insights
Post-Hoc Analysis After Kruskal-Wallis
The Kruskal-Wallis test tells you that a difference exists. However, it does not tell you where.
Common post-hoc methods
| Method | Purpose |
|---|---|
| Dunn’s Test | Pairwise comparisons |
| Bonferroni Correction | Controls error rate |
| Mann-Whitney Tests | Compare pairs |
Example: Post-Hoc Insight
From the earlier example:
- Machine A vs B → significant
- Machine B vs C → significant
- Machine A vs C → highly significant
Action
Focus on Machine C. It shows the highest cycle times.
Real Six Sigma Applications
The Kruskal-Wallis test fits many industries.
Manufacturing
- Compare machine performance
- Analyze defect rates across shifts
- Evaluate supplier quality
Healthcare
- Compare patient wait times
- Analyze treatment effectiveness
- Evaluate satisfaction scores
Service Industry
- Compare call center performance
- Analyze customer ratings
- Evaluate response times
Example: Customer Satisfaction Analysis
Scenario
A company collects satisfaction ratings (1–10 scale) across three regions.
Data summary
| Region | Median Score |
|---|---|
| East | 6 |
| West | 8 |
| Central | 7 |
Insight
The Kruskal-Wallis test reveals significant differences. Therefore, leadership should focus on improving the East region.
Advantages of the Kruskal-Wallis Test
This test offers several advantages for Six Sigma teams.
Key strengths
- Handles non-normal data easily
- Works with small sample sizes
- Reduces impact of extreme values
- Supports ordinal data analysis
Limitations You Should Know
Despite its strengths, the test has limitations.
Key drawbacks
- Does not identify specific group differences
- Less powerful than ANOVA for normal data
- Requires post-hoc testing
- Assumes similar distribution shapes
Kruskal-Wallis in the DMAIC Framework
You can apply this test across multiple DMAIC phases.
Define
Identify process variation across groups.
Measure
Collect data from multiple categories.
Analyze
Use Kruskal-Wallis to detect differences.
Improve
Target the worst-performing group.
Control
Monitor improvements using ongoing analysis.
Example: DMAIC Application
| Phase | Action |
|---|---|
| Define | Compare supplier defect rates |
| Measure | Collect defect data |
| Analyze | Run Kruskal-Wallis test |
| Improve | Improve worst supplier |
| Control | Track defect trends |
Software Tools for Kruskal-Wallis Test
Most Six Sigma professionals use statistical software.
Common tools
| Tool | Capability |
|---|---|
| Minitab | Built-in non-parametric tests |
| Excel | Requires add-ins |
| Python | SciPy library |
| R | kruskal.test() function |
Example in Python
from scipy.stats import kruskalgroup1 = [10, 12, 11]
group2 = [14, 16, 15]
group3 = [18, 20, 19]stat, p = kruskal(group1, group2, group3)print(stat, p)
Best Practices for Six Sigma Professionals
You should follow best practices to ensure valid results.
Key recommendations
- Always check data distribution first
- Use boxplots to visualize variation
- Combine with graphical analysis
- Follow up with post-hoc testing
- Communicate results clearly
Common Mistakes to Avoid
Many practitioners misuse this test.
Avoid these errors
- Using it for dependent samples
- Ignoring post-hoc analysis
- Misinterpreting p-values
- Skipping data visualization
Visualizing Kruskal-Wallis Results
Visualization improves understanding.
Recommended charts
- Boxplots
- Violin plots
- Rank plots
Example insight
A boxplot quickly shows which group has higher median performance.
Advanced Insight: Effect Size
Statistical significance alone is not enough. You should also measure effect size.
Common metric
- Eta-squared (η²)
Interpretation
| Value | Effect Size |
|---|---|
| 0.01 | Small |
| 0.06 | Medium |
| 0.14 | Large |
Kruskal-Wallis vs Mann-Whitney Test
Both are non-parametric tests. However, they serve different purposes.
Comparison
| Feature | Kruskal-Wallis | Mann-Whitney |
|---|---|---|
| Groups | 3 or more | 2 |
| Purpose | Multi-group comparison | Pairwise comparison |
| Output | Overall difference | Specific comparison |
Real-World Case Study
Problem
A factory sees variation in defect rates across three shifts.
Data
| Shift | Defects |
|---|---|
| Morning | Low |
| Afternoon | Medium |
| Night | High |
Analysis
The Kruskal-Wallis test shows a significant difference.
Action
- Investigate night shift processes
- Train operators
- Improve maintenance
Result
Defect rates drop by 25%.
How to Explain Results to Stakeholders
Clear communication drives action.
Simple explanation
“The test shows that at least one group performs differently. Therefore, we should focus on identifying and fixing the root cause.”
Key Takeaways
- Use Kruskal-Wallis when data is non-normal
- It compares medians across multiple groups
- It relies on ranked data
- It requires post-hoc testing for deeper insight
- It fits perfectly into the Analyze phase of DMAIC
Conclusion
The Kruskal-Wallis test gives Six Sigma professionals a powerful tool for analyzing non-normal data. It works well in real-world environments where ideal assumptions fail.
You can use it to compare multiple groups, detect variation, and guide improvement efforts. However, you should always combine it with post-hoc analysis and visualization.




