๐Ÿ“Š Introduction to Statistics

Understanding Mean, Median, Variance, and IQR

Statistics help us make sense of data by summarizing large amounts of information into meaningful numbers. Today, we'll explore four fundamental statistical measures that help us understand the center and spread of our data.

1 The Mean (Average)

The mean is what most people call the "average." It's calculated by adding up all the values and dividing by how many values you have.

Mean = (Sum of all values) รท (Number of values)
๐ŸŽฏ Example: Test Scores

Five students scored: 78, 85, 92, 88, and 82 on their exam.

Mean = (78 + 85 + 92 + 88 + 82) รท 5 = 425 รท 5 = 85

The average test score is 85.

78 85 92 88 82 Mean = 85 Test Scores Frequency

2 The Median (Middle Value)

The median is the middle value when all data points are arranged in order. If there's an even number of values, it's the average of the two middle values.

Median = Middle value when data is sorted
๐Ÿ  Example: House Prices

Seven houses on a street cost: $150k, $180k, $200k, $210k, $220k, $250k, and $800k

Sorted order: already sorted!

Median = $210k (the 4th value out of 7)

Notice: The mean would be $287k, but the median better represents the "typical" house price because it's not affected by the one very expensive house!

$150k $180k $200k $210k $220k $250k $800k Median

3 Variance (Spread of Data)

The variance measures how spread out the data is from the mean. A small variance means values are close to the mean; a large variance means they're spread out.

Variance = Average of squared differences from the mean
๐Ÿ“ Example: Comparing Two Classes

Class A scores: 84, 85, 86, 85, 84 (Mean = 85, Variance โ‰ˆ 0.8)

Class B scores: 70, 95, 80, 90, 85 (Mean = 84, Variance โ‰ˆ 90)

Class A has much more consistent scores (low variance), while Class B has more variation!

Class A (Low Variance) Class B (High Variance) Small spread Large spread

4 IQR (Interquartile Range)

The IQR measures the spread of the middle 50% of your data. It's the difference between the 75th percentile (Q3) and the 25th percentile (Q1).

IQR = Q3 - Q1
Where Q1 = 25th percentile, Q3 = 75th percentile
๐Ÿ“ฆ Example: Package Weights

Twenty packages sorted by weight (in pounds):

2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 25

Q1 (25th percentile) = 5.5 pounds

Q3 (75th percentile) = 14.5 pounds

IQR = 14.5 - 5.5 = 9 pounds

The middle 50% of packages weigh between 5.5 and 14.5 pounds!

Min (2) Q1 (5.5) Median Q3 (14.5) Max (25) IQR = 9 Box Plot (showing quartiles)

๐Ÿ“Š Putting It All Together

Each measure tells us something different about our data:

Measure What it tells us When to use it Sensitive to outliers?
Mean The "balance point" of the data When data is symmetric without extreme values Yes - very sensitive
Median The middle value When data has outliers or is skewed No - robust to outliers
Variance How spread out the data is To measure consistency or risk Yes - squared differences amplify outliers
IQR Spread of the middle 50% To understand typical variation No - ignores extreme values

๐ŸŽฏ Real-World Application

Imagine you're analyzing employee salaries at a company:

Mean: $75,000 | Median: $65,000

The higher mean suggests a few high earners pull the average up. The median better represents what a "typical" employee earns!

๐Ÿ’ก Key Takeaways