Statistics Skewed Distribution
A skewed distribution is lopsided rather than symmetric, and the direction of the skew -- left or right -- tells you whether the mean has been pulled below or above the median by a stretched-out tail.
When a Distribution Isn't Symmetric
In a symmetric distribution the two sides mirror each other and the mean and median coincide. A skewed distribution instead has one tail that stretches out much farther than the other. That single long tail pulls the mean toward it, while the median -- which only cares about the middle position, not the size of extreme values -- barely moves. Comparing mean and median is therefore a quick way to detect skew.
Right-Skewed (Positive Skew)
A right-skewed distribution has a long tail stretching toward high values, while most of the data is bunched up at the low end. A classic example is patient wait times at a clinic: most patients are seen fairly quickly, but a few unusual cases take much longer, dragging the tail -- and the mean -- to the right.
Example: Right Skew in Wait Times
wait_times = [5, 6, 6, 7, 8, 8, 9, 10, 12, 45] # minutes; one patient was badly delayed
n = len(wait_times)
mean = sum(wait_times) / n
sorted_times = sorted(wait_times)
median = (sorted_times[n // 2 - 1] + sorted_times[n // 2]) / 2
print(f"Mean: {mean}")
print(f"Median: {median}")
print("Right-skewed" if mean > median else "Not right-skewed")
# Output:
# Mean: 11.6
# Median: 8.0
# Right-skewedLeft-Skewed (Negative Skew)
A left-skewed distribution has a long tail stretching toward low values, while most of the data is bunched up at the high end. Consider exam scores where most students did well but a couple performed unusually poorly -- those low scores create a tail on the left that pulls the mean below the median.
Example: Left Skew in Exam Scores
exam_scores = [98, 95, 94, 92, 90, 89, 88, 85, 60, 40] # a couple of low outliers
n = len(exam_scores)
mean = sum(exam_scores) / n
sorted_scores = sorted(exam_scores)
median = (sorted_scores[n // 2 - 1] + sorted_scores[n // 2]) / 2
print(f"Mean: {mean}")
print(f"Median: {median}")
print("Left-skewed" if mean < median else "Not left-skewed")
# Output:
# Mean: 83.1
# Median: 89.5
# Left-skewed- The skew is named after the direction of the long tail, not the direction of the tall hump.
- The mean always gets pulled toward the tail, because it factors in the exact size of every value, including extreme ones.
- The median resists the pull, since it only depends on which values sit in the middle position.