In statistics, the mean and median are both measures of central tendency, but they differ in how they are calculated and what they represent:
-
Mean:
- The mean, often referred to as the average, is calculated by adding all the values in a dataset and then dividing by the number of values.
- Formula: \(\text{Mean} = \frac{\sum{X}}{N}\), where \(X\) represents each value in the dataset and \(N\) is the number of values.
- The mean is sensitive to extreme values (outliers). For example, if you have a dataset of incomes and one extremely high income, it will pull the mean up, potentially giving a skewed view of the typical income.
-
Median:
- The median is the middle value of a dataset when it is ordered from smallest to largest. If there is an even number of values, the median is the average of the two middle numbers.
- To find the median, you must first sort the data and then:
- If \(N\) is odd, the median is the value at position \((N + 1) / 2\).
- If \(N\) is even, the median is the average of the values at positions \(N / 2\) and \((N / 2) + 1\).
- The median is not affected by extreme values, making it a better measure of central tendency for skewed distributions.
Example: Consider the dataset: 2, 3, 4, 8, 10.
- The mean is \( \frac{2 + 3 + 4 + 8 + 10}{5} = \frac{27}{5} = 5.4\).
- The median is 4, as it is the middle value when the data is sorted.
In summary, while both mean and median provide insights into the center of a dataset, the mean is influenced by all values, including outliers, while the median focuses solely on the middle value, making it a robust choice for skewed distributions.