Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Chebyshev Inequality Visualization



Chebyshev Inequality Visualizer

P(|X - μ| ≥ a) ≤ σ² / a²
P(|X - 10| ≥ 3) ≤ 4.00 / 9.0 = 0.444 = 44.4%
Actual: 13.4%
xPDFμ=10μ-aμ+a24681012141618

Chebyshev Inequality: For any distribution with mean μ and variance σ²: P(|X - μ| ≥ a) ≤ σ² / a²

Red areas show P(X < μ-a) + P(X > μ+a). Bound: 44.4%, Actual: 13.4%







Visualizing Chebyshev's Inequality

Chebyshev's inequality bounds the probability of deviating from the mean: P(|X - μ| ≥ a) ≤ σ² / a². This tool visualizes the two-tailed bound across nine distributions, showing both the Chebyshev bound and actual probability. Adjust mean, variance, and deviation threshold to explore how bounds behave.



Getting Started with the Chebyshev Visualizer

This tool demonstrates Chebyshev's inequality, which bounds the probability of deviating from the mean using variance. The visualization shows a probability distribution with both tails highlighted in red.

The left panel displays the PDF (for continuous) or PMF (for discrete distributions). A green dashed line marks the mean μ, and red dashed lines mark μ-a and μ+a. The red shaded regions represent the actual probability of being more than a away from the mean.

The top panel shows the Chebyshev bound formula and compares it to the actual two-tailed probability. Adjust mean, variance, and deviation threshold to explore when the bound is tight versus loose.

Understanding the Chebyshev Bound

Chebyshev's inequality states:

P(Xμa)σ2a2P(|X - \mu| \geq a) \leq \frac{\sigma^2}{a^2}


This bounds the probability of being at least a units away from the mean μ, in either direction. The bound uses two parameters:

• μ = EX], the [expected value
• σ² = Var(X), the variance

The bound decreases quadratically as a increases. Doubling the threshold reduces the bound by a factor of 4. This quadratic relationship makes Chebyshev tighter than Markov for large deviations.

The visualization shows both tails simultaneously, representing P(X < μ-a) + P(X > μ+a).

The k Standard Deviations Form

Chebyshev is often expressed in terms of standard deviations. Setting a = kσ gives:

P(Xμkσ)1k2P(|X - \mu| \geq k\sigma) \leq \frac{1}{k^2}


This yields memorable bounds:

• k = 2: At least 75% of values within 2σ of mean (bound = 1/4 = 25% outside)
• k = 3: At least 89% within 3σ (bound = 1/9 ≈ 11% outside)
• k = 4: At least 94% within 4σ (bound = 1/16 ≈ 6% outside)
• k = 5: At least 96% within 5σ (bound = 1/25 = 4% outside)

These percentages are worst-case guarantees. Actual distributions like Normal concentrate much more tightly—99.7% of Normal values fall within 3σ, far better than Chebyshev's 89% guarantee.

Normal: the Bound at Its Most Familiar

At the opening settings μ=10\mu = 10, σ2=4\sigma^2 = 4 and a=3a = 3, the normal curve is drawn with σ=2\sigma = 2, so the threshold sits at a=1.5σa = 1.5\sigma.

Chebyshev allows 49=44.4%\frac{4}{9} = 44.4\% outside μ±3\mu \pm 3. The actual two-tailed area is 13.4%13.4\%.
xPDFμ=10μ-aμ+a24681012141618
Normal, mu = 10, sigma^2 = 4, a = 3

The variance slider does set sigma here, so sigma = 2 and a = 1.5 sigma. Bound 44.4%, actual 13.4% - about as tight as Chebyshev gets.

The ratio is about three to one, and for the normal that is as good as Chebyshev ever looks. The reason is that Chebyshev is handed only a mean and a variance; it must hold for every distribution with those two numbers, including much heavier-tailed ones than a bell curve.

It is worth converting the threshold to standard deviations, because that is the form the bound really lives in. With k=a/σk = a/\sigma, Chebyshev reads P(Xμkσ)1k2P(|X - \mu| \geq k\sigma) \leq \frac{1}{k^2}, and here k=1.5k = 1.5 gives 1/2.25=44.4%1/2.25 = 44.4\% — the same number, arrived at without reference to the particular σ\sigma.

The normal and the continuous uniform are the only two options on this page whose spread the variance slider actually sets. For the other seven, choosing the mean fixes the variance too.

Exponential: When the Bound Says Nothing

The exponential is built from the mean alone: λ=1/μ=0.1\lambda = 1/\mu = 0.1, which forces σ2=μ2=100\sigma^2 = \mu^2 = 100 and σ=10\sigma = 10.

So a=3a = 3 is only 0.3σ0.3\sigma, and Chebyshev's bound is 1009=11.1\frac{100}{9} = 11.1 — capped at 100%100\%, and useless.
xPDFμ=10μ-aμ+a01020304050
Exponential, lambda = 0.1

One parameter, so the mean fixes sigma^2 = mu^2 = 100 and the slider does nothing. a = 3 is only 0.3 sigma, so the bound caps at 100% and says nothing; the actual is 77.6%.

A bound of "at most 100%100\%" is true and empty, exactly as Markov's is when aE[X]a \leq E[X]. It happens here whenever k=a/σ<1k = a/\sigma < 1, because 1/k2>11/k^2 > 1. Chebyshev only says anything once the threshold is more than one standard deviation from the mean.

The actual figure is 77.6%77.6\%, which is genuinely large — an exponential really does put most of its mass more than 33 away from its mean of 1010, because its standard deviation is as big as its mean. The tool is not failing here; the distribution is simply very spread out.

Note what the variance slider does on this option: nothing. Set it anywhere and σ2\sigma^2 stays at 100100, because an exponential has one parameter and the mean already used it.

Continuous Uniform: the Other Slider-Driven Case

The uniform is constructed as [μ3σ2, μ+3σ2][\mu - \sqrt{3\sigma^2},\ \mu + \sqrt{3\sigma^2}], which is exactly the interval whose variance is the requested σ2\sigma^2. With σ2=4\sigma^2 = 4 that is [6.54,13.46][6.54, 13.46].

Bound 44.4%44.4\%, actual 13.4%13.4\% — numerically identical to the normal's.
xPDFμ=10μ-aμ+a24681012141618
Continuous uniform on [6.54, 13.46]

Built to have exactly the requested variance, so bound 44.4% and actual 13.4% - identical to the normal at this k, but beyond k = sqrt(3) its actual drops to exactly zero.

The coincidence is not deep: both distributions have the same μ\mu and σ\sigma, and both are symmetric, so at k=1.5k = 1.5 they happen to leave a similar fraction outside. Push kk higher and they part company sharply — the uniform has hard endpoints, so beyond k=31.73k = \sqrt{3} \approx 1.73 its actual drops to exactly zero while the normal's never does.

That is the clearest demonstration of why Chebyshev must be loose. A bound that has to cover both a distribution with no tails at all and one with tails reaching to infinity cannot be tight for either.

Poisson: Variance Fixed by the Mean

A Poisson with λ=μ=10\lambda = \mu = 10 has σ2=λ=10\sigma^2 = \lambda = 10 — its defining property — so σ=3.16\sigma = 3.16 and the threshold a=3a = 3 is 0.95σ0.95\sigma.

Just under one standard deviation, so the bound is again vacuous, and the actual is 26.5%26.5\%.
xPMFμ=10μ-aμ+a05101520
Poisson, lambda = 10

Mean and variance are the same parameter, so sigma^2 = 10 whatever the slider says. a = 3 is 0.95 sigma - just short of one - so the bound is still vacuous. Actual 26.5%.

This is the cleanest example of a distribution whose variance is not a free choice. Mean and variance are the same single parameter, so asking for "a Poisson with mean 1010 and variance 44" is asking for something that does not exist.

Nudging the mean up to 1111 would take σ\sigma to 3.323.32 and push kk further below 11; taking the mean down to 99 raises kk toward 11. To make the bound say anything at all you have to move the threshold, not the variance.

Binomial: the Bound Starts to Bite

With p=0.4p = 0.4 fixed and n=μ/p=25n = \mu/p = 25, the binomial has σ2=np(1p)=6\sigma^2 = np(1-p) = 6 and σ=2.45\sigma = 2.45.

Now a=3a = 3 is 1.22σ1.22\sigma, so the bound is 69=66.7%\frac{6}{9} = 66.7\% — a real constraint at last — against an actual of 15.1%15.1\%.
xPMFμ=10μ-aμ+a24681012141618
Binomial, n = 25, p = 0.4

A sum of 25 trials concentrates: sigma^2 = 6, so a = 1.22 sigma and the bound becomes a real constraint at 66.7%. Actual 15.1%.

A binomial is a sum of 2525 independent trials, and sums concentrate. That is why its variance, 66, is well below the Poisson's 1010 at the same mean, and why the threshold clears one standard deviation here when it did not there.

The four-fold gap between 66.7%66.7\% and 15.1%15.1\% is still large. Chebyshev never knows it is looking at a sum of independent things; that extra structure is precisely what sharper tools like the central limit theorem exploit and Chebyshev cannot.

Geometric: the Widest Spread on the Page

With p=1/μ=0.1p = 1/\mu = 0.1 the geometric has σ2=1pp2=90\sigma^2 = \frac{1-p}{p^2} = 90, so σ=9.49\sigma = 9.49 and a=3a = 3 is a mere 0.32σ0.32\sigma.

The bound is vacuous and the actual is 71.6%71.6\%.
xPMFμ=10μ-aμ+a010203040
Geometric, p = 0.1

sigma^2 = 90, nearly the square of the mean. a = 0.32 sigma, bound vacuous, actual 71.6%. The window holds about 99.3% of the mass, so that actual slightly undercounts.

A standard deviation almost as large as the mean is the geometric's signature, and it is the reason so much probability sits outside a window of ±3\pm 3. The mode is at k=1k = 1 while the mean is at 1010, so the distribution is nowhere near symmetric about μ\mu — most of its mass is well below the mean and a long tail stretches far above it.

One caveat on the figure. The plotted window is μ±4σ\mu \pm 4\sigma truncated at zero, and the geometric's support runs past it, so the reported actual is summed over about 99.3%99.3\% of the mass. Truncation can only make the actual smaller, so it never threatens the bound — but the true tail probability is slightly higher than the number shown.

Negative Binomial: Between the Two Extremes

With r=5r = 5 and p=r/(μ+r)=1/3p = r/(\mu + r) = 1/3, the negative binomial has σ2=r(1p)p2=30\sigma^2 = \frac{r(1-p)}{p^2} = 30 and σ=5.48\sigma = 5.48.

a=3a = 3 is 0.55σ0.55\sigma, so the bound is vacuous, and the actual is 51.8%51.8\%.
xPMFμ=10μ-aμ+a051015202530
Negative binomial, r = 5, p = 1/3

sigma^2 = 30, between the geometric 90 and the binomial 6 - five waits concentrate more than one, less than twenty-five fixed trials. Actual 51.8%.

Its variance of 3030 sits between the geometric's 9090 and the binomial's 66, which is exactly where a sum of five waiting times should land: more concentrated than one wait, less than a sum of twenty-five fixed trials.

Setting r=1r = 1 would reproduce the geometric exactly. Raising rr shrinks the variance toward the binomial's, and with it the actual — the same "sums concentrate" effect, seen from the waiting-time side.

Hypergeometric: the Tightest Bound Here

Drawing n=17n = 17 from a population of N=50N = 50 with K=30K = 30 successes gives σ2=2.75\sigma^2 = 2.75, the smallest variance of the nine, and σ=1.66\sigma = 1.66.

That makes a=3a = 3 equal to 1.81σ1.81\sigma — the largest kk on the page — so the bound falls to 30.5%30.5\% against an actual of 3.2%3.2\%.
xPMFμ=10μ-aμ+a46810121416
Hypergeometric, N = 50, K = 30, n = 17

The smallest variance of the nine, 2.75, so a = 1.81 sigma - the largest k on the page. The bound drops to 30.5% against an actual of 3.2%.

Two things push the variance down. Sampling without replacement is self-correcting, so the finite population correction NnN1\frac{N-n}{N-1} scales the variance below the binomial's; and the support is hard-capped at 1717 draws, so there is simply nowhere far from the mean to go.

This is the one state where the bound looks almost respectable, and the reason is entirely about kk. Chebyshev's quality depends on how many standard deviations out you are asking about, not on how large σ\sigma happens to be — which is why the kk form of the inequality is the one worth remembering.

Discrete Uniform: Spread Without a Tail

The integers 11 to n=2μ1=19n = 2\mu - 1 = 19, each equally likely, have σ2=n2112=30\sigma^2 = \frac{n^2-1}{12} = 30 and σ=5.48\sigma = 5.48.

a=3a = 3 is 0.55σ0.55\sigma, the bound is vacuous, and the actual is 63.2%63.2\% — twelve of the nineteen values lie outside [7,13][7, 13].
xPMFμ=10μ-aμ+a051015202530
Discrete uniform on 1..19

Twelve of the nineteen values lie outside [7, 13], so the actual is exactly 12/19 = 63.2%. Same variance as the negative binomial, reached by spreading evenly rather than by a tail.

This one can be checked by counting. The values inside μ±3\mu \pm 3 are 77 through 1313, which is seven of nineteen, so the outside is 12/19=63.2%12/19 = 63.2\% exactly. No integration, no approximation.

It also makes a point the continuous cases obscure: a distribution can be very spread out without having a tail at all. The discrete uniform has the same variance as the negative binomial, 3030, but achieves it by spreading mass evenly rather than by reaching far out with a little. Chebyshev sees only the variance, so it treats them identically — and their actual figures, 63.2%63.2\% and 51.8%51.8\%, differ because it cannot tell them apart.

Using the Control Sliders

Three sliders control the distribution and bound:

Mean (μ) Slider (green): Sets the expected value from 5 to 20. The distribution centers on this value, and the green dashed line moves accordingly.

Variance (σ²) Slider (purple): Sets the variance from 1 to 16. Higher variance spreads the distribution wider, affecting both the shape and the Chebyshev bound.

Deviation Threshold (a) Slider (red): Sets the distance from mean from 0.5 to 10. The red dashed lines at μ-a and μ+a move, changing the shaded tail regions.

Key experiments:

• Fix μ and a, then increase σ²: The bound increases (loosens)
• Fix μ and σ², then increase a: The bound decreases quadratically
• Compare Normal vs Exponential at identical settings

Two-Tailed vs One-Tailed Bounds

Chebyshev bounds two-tailed probability: deviations in BOTH directions from the mean. The visualization shows this with red shading on both the left tail (X < μ-a) and right tail (X > μ+a).

For symmetric distributions like Normal, these tails are equal. For asymmetric distributions like Exponential, one tail dominates.

If you need a one-tailed bound, Chebyshev gives:

P(Xμ+a)σ2a2P(X \geq \mu + a) \leq \frac{\sigma^2}{a^2}


But this is looser than necessary because the two-tailed bound includes both sides. For strictly one-tailed bounds, Markov's inequality applied to appropriate transformations may be tighter.

Comparing Bound to Actual Probability

The information panel displays:

Bound: Chebyshev's upper bound σ²/a²
Actual: True probability P(|X - μ| ≥ a)

Typical observations across distributions:

Normal distribution: Chebyshev is very conservative. At 2σ, bound is 25% but actual is about 4.5%. At 3σ, bound is 11% but actual is about 0.3%.

Uniform distribution: Chebyshev can be exact at the distribution boundaries. The uniform distribution is one of the "worst cases" for Chebyshev.

Exponential distribution: Asymmetric, so left tail contributes differently than right tail. Bound is moderately loose.

The gap demonstrates that Chebyshev guarantees apply to all distributions, including pathological ones that concentrate probability at exactly ±a from the mean.

Why Chebyshev's Inequality Matters

Chebyshev's inequality is fundamental because:

Distribution-free: Works for ANY distribution with finite mean and variance. No shape assumptions required.

Tighter than Markov: Uses variance information for quadratic improvement. The 1/k² decay is much faster than Markov's 1/k.

Theoretical cornerstone: Used to prove the weak law of large numbers, convergence of sample means, and consistency of estimators.

Practical applications:
• Quality control: Setting tolerance limits based on process variance
• Finance: Bounding portfolio deviations from expected return
• Statistics: Constructing distribution-free confidence intervals

The tradeoff is conservatism. When you know more about your distribution (e.g., it's Normal), distribution-specific bounds are much tighter.