सामग्री पर जाएँ

लेसन 9 · Summarizing Data

Averages: Mean, Median and Mode

Learn what the mean, median and mode tell you, how skew and outliers pull the mean, when to use each one, and what the word average can hide.

An average tries to describe a whole list of values with one "typical" number. It is useful because you cannot hold a thousand values in your head. It is risky for the same reason: it throws away almost everything. The word "average" can also mean three different things, so you need to know which one you are reading.

Three kinds of average

Three typical values

Mean Total divided by count
Median Middle value in order
Mode Most frequent value
1 / 2

Take the delivery times, in days, of seven parcels: 2, 3, 3, 4, 4, 4, 15.

  • Mean: add them (35) and divide by 7, giving 5.
  • Median: sort them and take the middle one. The fourth of seven values is 4.
  • Mode: the most common value is 4.

With an even number of values, the median is the mean of the two middle ones. For 2, 4, 6, 100 the median is 5.

Outliers pull the mean

One very late parcel (15 days) raises the mean to 5, although six of the seven arrived in 4 days or less. The median hardly notices. We say the median is resistant to extreme values.

Python See how one value moves the mean

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.

When 15 becomes 150, the mean jumps to about 24 days, which describes no parcel at all. The median stays at 4.

Skew

Data is right-skewed when it has a long tail of large values, as with incomes, house prices, waiting times and website session lengths. In such data the mean is often higher than the median. Left-skewed data has a long tail of small values, for example scores on an easy test where most people score high. A roughly symmetric distribution has mean and median close together.

This is why reports about incomes or house prices often use the median. A few huge values would otherwise suggest that a "typical" person has far more than most people do.

Which should you use?

Situation Good choice Why
Symmetric data without extreme values Mean Uses every value
Skewed data or outliers Median Describes the middle case
Categories such as shoe style Mode Only option for names
Ordered ratings Median or distribution Gaps may not be equal
Planning a total budget Mean Mean times count gives the total

The last row matters. If you need to know the total cost of many repairs, the mean is useful even for skewed data, because the mean times the number of repairs equals the total. The median cannot give you that.

The average of nothing real

A family may have an "average" of 1.8 children. No family has 1.8 children, and that is fine: the mean is a balance point, not a person. Problems start when someone designs for the "average user" as if that user existed. If half your users are on phones and half on large monitors, an "average screen" fits nobody.

Two groups mixed together can make a distribution with two peaks, called bimodal. For example, a gym might be busy at 7 a.m. and 6 p.m. The "average visit time" could fall around midday, when it is nearly empty. Looking at a histogram, explained in Charts for Distributions and Relationships, reveals this.

Averages over time and groups

A moving average smooths a noisy series by averaging each value with its neighbors, such as the last 7 days. It makes trends easier to see but delays sharp changes.

Python A 3-day moving average

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 spike on day 4 is spread over three averages, so it looks smaller and lasts longer.

Questions to ask about any "average"

  1. Which average is it: mean, median or something else?
  2. How many values is it based on?
  3. What do the extremes look like?
  4. Could the data contain two different groups?
  5. Is a "typical" value even the right thing, or do you care about the worst cases?

For service quality, the worst cases often matter most. "Average wait 3 minutes" can hide that some people wait 30. A percentile, covered in the next lesson, shows that.

A worked example: two ways to describe pay

An invented small studio pays five people monthly amounts of 2,800, 3,000, 3,100, 3,300 and 12,800. The total is 25,000, so the mean is 5,000. The median is 3,100.

Both numbers are correct. A job advertisement saying "average pay 5,000" would be true as arithmetic, yet four of the five people earn far less. The median tells an applicant more about a typical position. The owner, planning the wage budget, needs the mean, because 5 times 5,000 gives the total of 25,000.

When you write about averages, name the measure ("median monthly pay"), give the number of values (5 people) and, if space allows, show the range (2,800 to 12,800). Three short facts prevent most misunderstandings.

Practice

Try these, then compare with the answers. First, the values 4, 6, 6, 8 and 26 have what mean, median and mode? Second, a team of five has a median task time of 3 hours. Can you work out the total time spent? Third, which average would you report for the most popular pizza topping?

Answers: the mean is 10 (50 divided by 5), while the median and mode are both 6. For the team, no: the median alone does not give a total, so you would need the mean and the number of tasks. For toppings, only the mode works, because toppings are names and cannot be added or ordered.

Common mistakes: quoting a mean for very skewed data without a note; averaging averages from groups of different sizes; and comparing a mean from one report with a median from another.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the median of 3, 9, 4, 8, 100?

    Sorted, the list is 3, 4, 8, 9, 100, and the middle value is 8.
  2. 2. A few very large salaries exist at a company. Which is usually the better picture of a typical salary?

    The median is not pulled upward by a few very large values.
  3. 3. When is the mean especially useful, even for skewed data?

    Mean times count equals the total, which the median does not.
  4. 4. A distribution has two clear peaks. What does a single average risk doing?

    With two groups, the center between them may be rare.

Summary

  • Mean, median and mode answer different questions.
  • Extreme values pull the mean much more than the median.
  • Use the median for skewed typical values, and the mean when totals matter.
  • A single average can hide two groups or very bad cases.
  • Always ask which average is reported and from how many values.

Next: Spread: Range, Percentiles and Standard Deviation

आपकी प्रगति इसी ब्राउज़र में सेव होती है। खाते की ज़रूरत नहीं है।