Median Calculation:
From: | To: |
The median is the middle value in a sorted list of numbers. It's a measure of central tendency that divides the data set into two equal halves. Unlike the mean, it's not affected by extremely large or small values.
The median is calculated as follows:
Example: For the numbers 5, 10, 12, 4, 6, 11, 13, 5:
Details: Median is preferred over mean when:
Tips:
Q1: What's the difference between median and mean?
A: Mean is the average (sum divided by count), while median is the middle value. Median is less affected by outliers.
Q2: When should I use median instead of mean?
A: Use median when your data is skewed or has outliers (like income data). Use mean for normally distributed data.
Q3: How does median handle even vs odd number of values?
A: For odd counts, it's the middle value. For even counts, it's the average of the two middle values.
Q4: Can median be used for categorical data?
A: Only for ordinal data (data with a clear ordering). For nominal data (no order), mode is more appropriate.
Q5: Is median affected by extreme values?
A: No, that's one of its main advantages over the mean. Only the middle values matter.