Mean, Median and Mode
Three ways to describe the "middle" of a set of numbers.
- Mean: add them up and divide by how many there are.
- Median: the middle value once sorted (the average of the two middle values if there is an even count).
- Mode: the value that appears most often.
One extreme value drags the mean but barely moves the median, so the median is a better "typical" value for skewed data such as incomes.
Examplepython
Quick check
Which is least affected by one extremely large value?
Your turn: write the code
Print the median of the scores.
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.