Aller au contenu

Leçon 8 · Metrics and KPIs

Ratios, Averages and Percentages

Avoid classic reporting math errors: averaging percentages, mean versus median, percentage points versus percent, weighted rates and changing mix between groups.

Many wrong numbers in reports come from simple arithmetic used in the wrong way. The data is fine and each step looks reasonable, yet the result is false. This lesson shows the traps you are most likely to meet and how to avoid them.

Do not average percentages

Suppose store A converts 50 of 100 visitors (50%) and store B converts 90 of 900 (10%). The average of the two percentages is 30%. But together they converted 140 of 1,000 visitors, which is 14%.

The simple average gives each store the same weight, although B had nine times as many visitors. For an overall rate, add the numerators, add the denominators, then divide.

Python Wrong and right overall rates

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The simple average is not always meaningless. It answers "what is the rate of a typical store?" If that is your question, label it that way. Do not call it the company's conversion rate.

Keep the parts

Because of this rule, store numerators and denominators in your report data, not only the finished percentage. You can then total any group correctly. The same applies to averages: keep the sum and the count.

Distinct counts need extra care. You cannot add daily unique visitors to get weekly unique visitors, because the same person may appear on several days. Count distinct people again over the whole week.

Mean, median and spread

The mean is the total divided by the count. The median is the middle value when the values are sorted. A few very large values pull the mean up much more than the median.

For response times, order values and incomes, data is often lopsided. The median describes the middle case. A percentile describes the slow or large end: a 90th percentile of 8 hours means that about 90% of values are at or below 8 hours. Tools differ slightly in how they calculate percentiles, so small differences between systems can be normal.

Python Mean, median and a high percentile

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

One 72-hour case moves the mean from 3.0 to 9.9 hours. Do not remove it just to make the number nicer. Report the median, then look at the long case separately, because it may be the most important thing on the page. The mean, median and mode lesson goes further.

Percent and percentage points

If a rate rises from 4% to 5%, two statements are true:

  • It rose by 1 percentage point (5 minus 4).
  • It rose by 25 percent (1 divided by 4).

"The rate rose 1%" is ambiguous at best. Use "points" for differences between percentages. When you quote a relative change, include the before and after values.

Percent changes also do not cancel. A 20% fall followed by a 20% rise ends at 96% of the start, because the rise is calculated from a smaller base.

When the mix changes

A total rate can move even when every group stays the same, because the mix of groups changes. It can even move in the opposite direction to every group. This effect is known as Simpson's paradox.

Python Both groups improve, yet the total falls

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Read the output: web goes from 10.0% to 11.0% and the app from 30.0% to 31.0%, yet the total falls from 24.0% to 15.0%. Nothing inside either group got worse. Visits moved away from the app, which converts better, to the web. A reader who sees only the total might look for a problem in the checkout, when the real question is why the mix of traffic changed. Show the group rates and the group sizes together.

Rates need enough cases

A rate based on very few cases jumps around. One complaint out of 4 orders is 25%, and it says little about the next 400. Show the counts beside the rate, as in "25% (1 of 4)". You may also set a minimum number of cases below which you show counts only. Choose that limit openly and apply it consistently.

Name the denominator

Many arguments about a ratio are really about its denominator. "Return rate" could divide returned items by items sold, returned orders by all orders or refunded money by revenue. Each is reasonable, and each can give a different value.

Write the denominator into the label or a note: "Returned items as a share of delivered items." Also check that the numerator belongs to the same group as the denominator. If you divide the returns of this month by the sales of this month, many of those returns come from earlier sales. When sales grow or fall quickly, that ratio can move even if customer behavior does not.

A cohort view avoids the mismatch. It takes the items delivered in one month and follows how many of them are returned within a fixed number of days. The result arrives later, but the numerator is truly part of the denominator. Use the quick version for early warning if you like, and label it as what it is.

Before you publish a new ratio, calculate it by hand for a handful of records. It is a fast way to find a numerator that includes cases the denominator leaves out.

Round only at the end. If you round each part first and then add, totals can differ from the true value. When rounded shares add to 99% or 101%, add a short note; do not edit a number to force the total.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Team X resolves 9 of 10 tickets and team Y resolves 50 of 100. What is the combined resolution rate, rounded?

    Add the parts: 59 resolved out of 110 is about 54%. Averaging 90% and 50% would overweight the small team.
  2. 2. A rate moves from 10% to 12%. Which statement is correct?

    The difference is 2 points, and 2 divided by 10 is 20%.
  3. 3. Which summary is least affected by one extreme value?

    The median depends on the middle position, so one very large value changes it little.
  4. 4. Why can a total rate change while each group's rate stays the same?

    The total is weighted by group size, so a different mix changes it.

Summary

  • For overall rates, sum numerators and denominators before dividing.
  • Keep the parts, and never add distinct counts across periods.
  • Use the median and percentiles for lopsided data, and investigate extremes.
  • Say percentage points for differences between percentages.
  • Check the mix of groups and show counts beside rates.

Next: Designing Report Tables

Votre progression est enregistrée dans ce navigateur. Aucun compte nécessaire.