🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
💼 Servicesℹ️ About✉️ ContactView Pricing Plansfrom $10

Skewness — Measuring Asymmetry of Distributions

Foundations of StatisticsDescriptive Statistics🟢 Free Lesson

Skewness

Descriptive Statistics

When Distributions Lean to One Side

Skewness reveals the hidden asymmetry in your data — and tells you whether the mean is trustworthy or misleading.

Understanding skewness helps you:

  • Interpret the mean — know when mean > median signals a long right tail
  • Choose the right model — decide between symmetric and skewed distributions
  • Fix data — apply log or square-root transforms to restore symmetry
  • Spot real-world patterns — income, house prices, and reaction times are almost always skewed

A symmetric distribution hides nothing. A skewed one whispers where the outliers hide.


What You'll Learn

  • 1Compute Fisher's moment skewness and state what each sign means for the tail
  • 2Use the mean, median, and mode ordering to read asymmetry without a formula
  • 3Judge whether an observed skewness is larger than sampling noise at your sample size
  • 4Match a skewed feature to the transformation that normalises it

What Is Skewness?

Definition

Skewness quantifies asymmetry of a distribution. Positive skew pulls the right tail out; negative skew pulls the left tail out. Zero means symmetric.

Positive -> right tail. Negative -> left tail. Zero -> symmetric.

The formula is a standardised third central moment, and the standardisation is what makes it comparable across variables. Cubing the deviations is the mechanism: values far above the mean contribute large positive cubes, values far below contribute large negative cubes, and because cubing preserves sign, an asymmetry in the tails cannot cancel out the way squared deviations would. Dividing by removes the units, so a skewness of 1.5 means the same thing for heights in metres and incomes in dollars.

Two older definitions still appear in older texts and in some software output. Pearson's first coefficient, , needs a modal estimate that is unstable for continuous data. Pearson's second coefficient, , exploits the rule of thumb that for a moderately skewed unimodal distribution the mean sits about three times as far from the median as the median does from the mode. Both are quick field checks; Fisher's moment coefficient is what SciPy, R, and pandas return.

python
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt

np.random.seed(42)
right_skew = np.random.lognormal(0, 0.8, 2000)   # income-like
symmetric  = np.random.normal(0, 1, 2000)
left_skew  = -np.random.lognormal(0, 0.8, 2000)

for name, data in [("Right-Skewed", right_skew),
                    ("Symmetric", symmetric),
                    ("Left-Skewed", left_skew)]:
    sk = stats.skew(data)
    print(f"{name:<15}: skew={sk:+.4f}, mean={np.mean(data):.3f}, median={np.median(data):.3f}")

A lognormal with has theoretical skewness , so a sample estimate near that value is confirmation rather than surprise. An exponential distribution has skewness exactly 2 whatever its rate, a uniform distribution has skewness exactly 0 despite having flat, bounded tails, and the standard normal has 0 by construction.

Reading the Shape From the Summary Statistics

Skewness and the ordering of the three measures of centre tell the same story from different angles. In a right-skewed distribution the long upper tail drags the mean above the median, and the median sits above the mode: Mode, Median, Mean. In a left-skewed distribution the ordering reverses. When the three coincide, the distribution is symmetric about its centre.

Architecture Diagram
Right-Skewed:   Mode < Median < Mean
Symmetric:      Mode ≈ Median ≈ Mean
Left-Skewed:    Mean < Median < Mode

This ordering is a practical diagnostic because it needs no computation. Salary data, house prices, wait times, city populations, and claim amounts are right-skewed by construction: they are bounded below by zero and unbounded above, so a small number of very large values can extend the right tail indefinitely. Left skew is rarer and typically marks a ceiling — exam scores clustered near the maximum, ages at retirement with a legal lower bound, or survival times truncated by a study that ends while most subjects are still alive.

python
fig, axes = plt.subplots(1, 3, figsize=(15, 4))
datasets = [("Right-Skewed", right_skew, '#f8d7da'),
            ("Symmetric",    symmetric,   '#d4edda'),
            ("Left-Skewed",  left_skew,   '#d1ecf1')]

for ax, (name, data, color) in zip(axes, datasets):
    ax.hist(data, bins=50, density=True, color=color, edgecolor='gray', alpha=0.7)
    ax.axvline(np.mean(data), color='red', lw=2, ls='--', label=f'Mean={np.mean(data):.2f}')
    ax.axvline(np.median(data), color='blue', lw=2, ls='-', label=f'Median={np.median(data):.2f}')
    ax.set_title(f'{name}\nskewness={stats.skew(data):.3f}')
    ax.legend(fontsize=8)
plt.tight_layout()
plt.savefig('skewness.png', dpi=150)
plt.show()

How Large Is Large Enough?

Absolute SkewnessInterpretation
less than 0.5Approximately symmetric
0.5–1.0Moderately skewed
greater than 1.0Highly skewed — consider transformation

These thresholds describe the population. A sample estimate carries its own uncertainty, and under normality the standard error of Fisher's skewness is approximately . At that is 0.245, so a 95 percent band runs from about −0.48 to +0.48: anything inside it is indistinguishable from symmetry. At the band tightens to roughly ±0.11, which is why large studies flag skewness values that would be invisible in a small one.

One caution applies to every formal test of normality that includes skewness and kurtosis: with enough data they always reject. The relevant question is never "is the distribution exactly normal" but "does the asymmetry change the inference I plan to make", and that question is answered by looking at the residual or Q-Q plot rather than by a p-value.

Fixing Skewness with Transformations

python
skewed = np.random.lognormal(0, 1, 500)
print(f"Original skewness: {stats.skew(skewed):.4f}")

# Log transform (works for positive right-skewed data)
log_transformed = np.log(skewed)
print(f"Log-transformed skewness: {stats.skew(log_transformed):.4f}")

# Square root (moderate right skew)
sqrt_transformed = np.sqrt(skewed)
print(f"Sqrt-transformed skewness: {stats.skew(sqrt_transformed):.4f}")

The transformation ladder runs from mild to aggressive: square root for moderate right skew, log for strong right skew, reciprocal for extreme right skew, and Box-Cox, which estimates the power λ by maximum likelihood rather than making you guess. Every one of these requires strictly positive data, so zero counts and negative values need either an offset or the Yeo-Johnson transform, which extends the family to the whole real line.

SituationPreferred transformNote
Strong right skew, strictly positiveNatural logInterpret coefficients as percentage changes
Moderate right skewSquare rootKeeps zero values; common for counts
Counts with a low meansqrt(x + 3/8)Stabilises Poisson variance
Extreme right skewBox-Cox with estimated λλ near 0 reproduces the log
Data containing zeros or negativesYeo-JohnsonGeneralisation of Box-Cox
Left-skewed bounded dataReflection then logMirror the tail before transforming

💡Transform the target, then transform the interpretation back

A model fitted to log(y) estimates multiplicative effects. Exponentiating a coefficient of 0.18 gives 1.197, so a one unit rise in the predictor multiplies y by about 1.20 rather than adding 0.18. Reporting both the transformed model and the back-transformed effect keeps the result readable.

Skewness in Machine Learning

ML ApplicationSkewness UsageWhy
Feature transformationLog/Box-Cox transform skewed featuresNormal distributions work better
Loss function designSkewed targets → asymmetric lossWeight false positives differently
Data augmentationKnow which direction to augmentBalance training data
Model selectionSkewed data → robust modelsRandom Forest over Linear
python
import numpy as np
from scipy.stats import skew, boxcox
from sklearn.preprocessing import PowerTransformer

np.random.seed(42)

# Skewed feature → log transform
skewed_data = np.random.lognormal(3, 1, 1000)
print(f"Before transform: skewness = {skew(skewed_data):.3f}")

log_data = np.log(skewed_data)
print(f"After log transform: {skew(log_data):.3f}")

# Box-Cox transformation (automatic)
bc_data, lam = boxcox(skewed_data)
print(f"After Box-Cox (λ={lam:.2f}): skewness = {skew(bc_data):.3f}")

# PowerTransformer (sklearn)
pt = PowerTransformer(method='yeo-johnson')
pt_data = pt.fit_transform(skewed_data.reshape(-1,1)).flatten()
print(f"After Yeo-Johnson: skewness = {skew(pt_data):.3f}")

Three places in a machine learning pipeline care about this number. Linear models and many distance-based methods assume features whose relationship with the target is roughly linear, and a heavily skewed predictor compresses most of its mass into a narrow band while a few points stretch the axis — a situation tree models handle for free and linear models do not. Distance-based algorithms such as k-nearest neighbours and k-means are sensitive to the scale and spread a skewed feature creates. And target skewness directly damages squared-error loss, which weights a 5× error far more than five 1× errors, making median regression or a log-transformed target the better choice.

Skewness alone never tells the whole story. A distribution can have zero skewness and still be heavy-tailed, bimodal, or bounded in ways that break an analysis, so the number belongs beside a histogram and a Q-Q plot rather than in place of them.

Common Mistakes

Reading a skewness near zero as evidence the data are normal

Fix: Symmetry is not normality. A uniform or bimodal distribution can have skewness zero with wildly non-normal tails, so always pair the number with a Q-Q plot.

Comparing a sample skewness against the 0.5 and 1.0 thresholds without regard to sample size

Fix: Use the standard error sqrt(6/n) to test whether the estimate differs from zero; at n = 100 the noise band is already ±0.48.

Transforming the target and reporting coefficients on the original scale

Fix: Back-transform explicitly. On a log target, exponentiate coefficients to report multiplicative effects, and note that the retransformation bias needs a smearing or Duan correction for mean predictions.

Best Practices

  • Plot the histogram before computing any moment, so the number is read against the actual shape
  • Report skewness with its standard error when sample size is small
  • Choose the transformation from the shape of the distribution, not from whichever one happens to minimise skewness on this sample

Key Takeaways

  • Fisher's skewness standardises the third central moment: positive pulls the right tail, negative pulls the left
  • Mean above median signals right skew — the tail drags the mean, the median stays in the middle
  • Sampling noise is sqrt(6/n), so |skew| below about 0.48 at n = 100 says nothing
  • Log, sqrt, Box-Cox, and Yeo-Johnson restore symmetry, and each changes how coefficients must be interpreted

Frequently Asked Questions

What is the difference between skewness and outliers?

Skewness is a property of the whole distribution's asymmetry, measured from every observation's cubed deviation. An outlier is an individual extreme value. A single outlier can inflate skewness, but a distribution can be strongly skewed with no outliers at all — that is the normal shape of income data — and a symmetric distribution can still contain two extreme values on opposite sides.

Does zero skewness mean the data are normally distributed?

No. Skewness measures only the third standardised moment, so any symmetric distribution scores zero, including the uniform, the Student t, the Laplace, and any symmetric bimodal mixture. Normality additionally requires the fourth moment to match and the whole shape to match, which is what a Q-Q plot evaluates.

Which transformation should I choose?

Match the transformation to the severity and sign of the skew: square root for moderate right skew, log for strong right skew, Box-Cox when you want the power estimated from the data, Yeo-Johnson when zeros or negative values rule out the others. Refit and re-check the shape afterwards rather than assuming the first choice worked.

Interview Questions

Q1: How do you compute skewness and what does the sign tell you?

Take the mean cubed deviation and divide by the cube of the standard deviation. A positive value means the right tail is longer and the mean exceeds the median; a negative value means the left tail is longer.

Q2: Your data have skewness 0.4 with n = 30. Is it skewed?

Almost certainly indistinguishable from zero. The standard error is sqrt(6/30) = 0.447, so 0.4 is well inside one standard error of a symmetric population.

Q3: Why do we transform a skewed variable instead of using a robust method?

Transformation repairs the linear relationship and the variance structure that the model assumes, not just the marginal shape. Robust methods protect against outliers but leave a curved or heteroscedastic relationship in place.

Q4: What happens to regression coefficients after a log transformation of y?

They become semi-elasticities: exponentiating a coefficient gives the multiplicative change in y for a one unit change in the predictor. Predictions on the original scale need a smearing correction because the median of the back-transformed distribution is not its mean.

CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-14

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Need Expert Statistics Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement