Mean, Median, Variance
When you have a set of numbers (like exam scores or house prices), you often want to summarize them. The most common summary statistics are mean, median, and variance. They tell you about the center and spread of the data.
Mean (Average)
The mean is the sum of all values divided by the number of values. It is the “balancing point” of the data.
Formula: μ = (x₁ + x₂ + … + xₙ) / n.
Example: scores [70, 80, 90] → mean = (70+80+90)/3 = 80.
Median (Middle Value)
The median is the middle value when the data is sorted. If there is an even count, it’s the average of the two middle numbers. Median is less sensitive to outliers than mean.
Example: [70, 80, 90] → median = 80.
Example with outlier: [10, 80, 90] → mean = 60, median = 80 (better represents typical value).
Variance and Standard Deviation
Variance measures how spread out the numbers are. It’s the average of squared differences from the mean. Standard deviation is the square root of variance (same units as data).
Formula for variance (population): σ² = Σ(xᵢ – μ)² / n.
Example: [70, 80, 90] → differences: -10, 0, 10 → squares: 100, 0, 100 → variance = (100+0+100)/3 ≈ 66.7, standard deviation ≈ 8.16.
Why These Matter in AI
- Data normalization: We often subtract the mean and divide by standard deviation to scale features.
- Outlier detection: Values far from the mean (e.g., >3 standard deviations) may be anomalies.
- Model evaluation: Mean squared error (MSE) is a common loss function – it’s related to variance.
Analogy: Shooting Arrows at a Target
- Mean = the average location of arrows (accuracy).
- Variance = how spread out the arrows are (precision).
- Low variance = arrows clustered together; high variance = scattered.
Two Minute Drill
- Mean = average, sensitive to outliers.
- Median = middle value, robust to outliers.
- Variance = average squared deviation from mean; measures spread.
- Standard deviation = square root of variance.
- Used for data scaling, outlier detection, and loss functions.
Need more clarification?
Drop us an email at career@quipoinfotech.com
