Day 32 of 55Stage 3 · AnalyseTuesdayKruskal-Wallis and Mood's median

Checking with ranks and medians

ANOVA assumes roughly normal data, and the waits are skewed. Amara confirms the Monday effect with tests that don't need it.

Stage goal: Find and prove the root causes.
Team
Astrid (Data Analyst)
Stakeholders
Aurelie (Practice Nurse Manager)
Documents today Analysis record
How the day goes
  1. 09:00Kruskal-Wallis with Astrid (Data Analyst)
  2. 11:00Mood's median test
  3. 15:00Agree the root cause with Aurelie (Practice Nurse Manager)

Situation 1 of 2

09:00 · Kruskal-Wallis with Astrid (Data Analyst)
Astrid (Data Analyst)
ANOVA said Monday is different. Why test again?

Why confirm with another test?

For skewed data, compare several groups with Kruskal-Wallis (ranks) or Mood's median test (medians).

Situation 2 of 2

15:00 · Agree the root cause with Aurelie (Practice Nurse Manager)
Aurelie (Practice Nurse Manager)process owner
So Monday is a root cause?

How do you state it?

State a root cause as what in the process creates the effect, specifically enough to act on.
Worked example 1

Checking the Monday effect without assuming normal data

The same 60 waits by day, tested on ranks and on medians instead of averages.

Waits by the day of the first request010203040Monday: median 14, quartiles 11.25 and 20, n = 1814MondayTuesday: median 5, quartiles 3 and 6.25, n = 125TuesdayWednesday: median 10.5, quartiles 5 and 14.75, n = 1010.5WednesdayThursday: median 6, quartiles 4.25 and 9.25, n = 106ThursdayFriday: median 8, quartiles 5.5 and 11.75, n = 108Friday
RequestDay of first requestWait (days)
R01Friday12
R02Wednesday13
R03Monday12
R04Monday28
R05Friday11
R06Monday12
R07Thursday16
R08Thursday7
R09Tuesday3
R10Monday4
R11Tuesday4
R12Tuesday10
R13Wednesday4
R14Tuesday17
R15Tuesday5
R16Wednesday8
R17Thursday5
R18Tuesday5
R19Friday5
R20Monday20
R21Thursday3
R22Wednesday15
R23Wednesday5
R24Friday9
R25Tuesday5
R26Wednesday5
R27Wednesday15
R28Monday15
R29Wednesday14
R30Friday13
R31Monday18
R32Friday16
R33Tuesday3
R34Wednesday5
R35Monday10
R36Friday7
R37Thursday6
R38Thursday10
R39Thursday10
R40Tuesday5
R41Friday5
R42Thursday4
R43Friday5
R44Thursday6
R45Friday7
R46Monday11
R47Monday11
R48Tuesday3
R49Monday13
R50Monday26
R51Monday12
R52Monday22
R53Monday27
R54Wednesday18
R55Thursday4
R56Tuesday14
R57Monday20
R58Tuesday3
R59Monday6
R60Monday19
Download the data (spreadsheet file)
  1. Kruskal-Wallis: rank everythingrank all 60 waits from 1 to 60, ties sharing the average rank
  2. Compare average ranksdo the days' average ranks differ more than chance would give?= H = 19.66
  3. Kruskal-Wallis: p-valuechi-square with 4 degrees of freedom= 0.0006
  4. Mood's median: overall medianmedian of all 60= 10 days
  5. Count above and belowMonday: 15 above, 3 at or below · Tuesday: 2 and 10 · Wednesday: 5 and 5 · Thursday: 1 and 9 · Friday: 4 and 6
  6. Mood's median: p-valuechi-square on that table= 0.0006
What it meansBoth tests agree with ANOVA: Monday requests wait longer. Kruskal-Wallis uses ranks, Mood's median only counts above or below the median, so it's less powerful but very robust to extreme values.
What Amara decidesRoot cause confirmed: Monday demand (30% of the week's requests) meets the same capacity as any other day.
Try it yourself in a spreadsheet
Ranks=RANK.AVG(C2,$C$2:$C$61,1)
Average rank by day=AVERAGEIFS(D2:D61,B2:B61,"Monday")
Mood's table=COUNTIFS(B2:B61,"Monday",C2:C61,">10")
Chi-square p-value=CHISQ.TEST(observed,expected)

Which of the two tests would you trust more if a few waits were extremely long (say 80 days)?

Show the answer

Mood's median: it only asks whether each value is above or below the median, so extreme values can't pull it. Kruskal-Wallis is also robust but uses more information.

Key concepts

The ideas behind today. Concept how the work is done, in our own words · Common practice widely used ways of working.

Common practice

Kruskal-Wallis

  • Rank all values together; test whether groups' average ranks differ. The rank-based version of one-way ANOVA.

Where you will meet this: Kruskal-Wallis test

Common practice

Mood's median test

  • Count values above and below the overall median in each group, then run a chi-square test. Less powerful, but unaffected by extreme values.

Where you will meet this: Mood's median test

Concept

State the root cause precisely

  • A root cause says what in the process creates the effect, specifically enough to act on, not just where the problem shows up.

Explained in our own words. This helps you understand the concepts behind the certifications; it does not reproduce or replace any official guide. Sources

Day 32 complete

2 situations today.

Your responsibility todayConfirming with tests that don't need normal data
Technique you usedKruskal-Wallis, Mood's median test
Key points to remember
  • For skewed data, compare several groups with Kruskal-Wallis (ranks) or Mood's median test (medians).
  • State a root cause as what in the process creates the effect, specifically enough to act on.
Documents today Analysis record