Distribution Type picks one of nine shapes, three continuous and six discrete; the plot redraws as a PDF curve or as PMF bars. Learn more about the distribution selector
E[X] slider (green) sets the mean from 1 to 30; the green dashed line and the whole distribution follow it. Learn more about the two sliders
Threshold a slider (red) sets a from 1 to 40; the red dashed line moves and everything at or beyond a turns red. Learn more about the two sliders
Read the banner above the plot: P(X≥a)≤E[X]/a with the numbers filled in, the bound as a percentage, and the Actual tail under it. Learn more about the Markov bound
Compare Bound with Actual in the banner or the grey panel: the actual tail never exceeds the bound, and is often far below it. Learn more about bound vs actual
Markov Inequality Visualizer
P(X ≥ a) ≤ E[X] / a
P(X ≥ 15) ≤ 10 / 15 = 0.667 = 66.7%
Actual: 22.3%
Markov Inequality: For non-negative X and a > 0: P(X ≥ a) ≤ E[X] / a
Red area shows P(X ≥ a). Bound: 66.7%, Actual: 22.3%
Markov's inequality states that for any non-negative random variable X and positive threshold a: P(X ≥ a) ≤ E[X] / a. This tool visualizes the bound across nine distributions, showing both the Markov bound and the actual tail probability. Adjust E[X] and threshold to see when bounds are tight versus loose.
Getting Started with the Markov Visualizer
This tool demonstrates Markov's inequality, which bounds tail probabilities using only the expected value. The visualization shows a probability distribution with the tail region P(X ≥ a) highlighted in red.
The left panel displays the PDF (for continuous) or PMF (for discrete distributions). A green dashed line marks E[X], and a red dashed line marks the threshold a. The red shaded area (or red bars) represents the actual tail probability.
The top panel shows the Markov bound formula and compares it to the actual probability. Adjust E[X] and threshold to explore when the bound is tight versus loose across different distributions.
Understanding the Markov Bound
Markov's inequality states:
P(X≥a)≤aE[X]
This bound requires only two conditions: • X must be non-negative (X ≥ 0 always) • a must be positive (a > 0)
The bound decreases as a increases relative to E[X]. When a = 2·E[X], the bound is 0.5 (50%). When a = 10·E[X], the bound is 0.1 (10%).
The visualization shows both the Markov bound (theoretical maximum) and the actual tail probability. For most distributions, the actual probability is much smaller than the bound, demonstrating that Markov's inequality is often conservative.
Using the Distribution Selector
DemoSame bound, different shapes
Step 0 of 4
Nine distributions are available, grouped into continuous and discrete:
Continuous Distributions: • Normal (positive range displayed) • Exponential • Uniform
Each distribution shows different tail behavior. Exponential has a long right tail, making Markov relatively tight. Normal concentrates around the mean, making the bound very loose. Discrete distributions display as vertical bars with dots at PMF values.
Try switching distributions while keeping E[X] and threshold fixed to see how the same Markov bound applies differently to different shapes.
Normal: the Bound Against a Bell Curve
At the tool's opening settings — E[X]=10, a=15 — the Markov bound is 10/15=0.667, so 66.7%. The normal option builds a curve with μ=10 and σ=μ/2=5, and the shaded tail beyond a is 15.9%.
The bound is about four times the truth here.
Normal, E[X] = 10, a = 15
The curve is the normal restricted to x >= 0 with sigma = 5. The shaded tail is 15.9% against a bound of 66.7% - about four times the truth.
The gap is the price of assuming nothing. Markov is handed one number, E[X]=10, and must produce a bound valid for every non-negative variable with that mean — including the worst case, which puts all its mass at 0 and at a and hits 10/15 exactly. A bell curve is nothing like that worst case, so its real tail is far smaller.
Worth flagging about this option specifically: the tool labels it "Normal (non-negative range only)". A genuine normal variable can be negative, and Markov requires X≥0, so what is drawn is the normal curve restricted to x≥0. With μ=10 and σ=5 the omitted region carries about 2.3% of the mass — small, but the reason for the label.
Exponential: Where Markov Is Tightest Among the Continuous Options
The exponential is the tool's opening choice. With E[X]=10 it uses λ=1/10, so the tail is P(X≥15)=e−1.5=22.3% against the same 66.7% bound.
A ratio of about 3× — the closest any of the three continuous options gets.
Exponential, E[X] = 10, a = 15
The tool opens here. The tail is exp(-1.5) = 22.3%, the tightest of the three continuous options against the same 66.7% bound.
The exponential does comparatively well because it is genuinely heavy-tailed relative to a bell curve: it puts real mass far from the mean, which is the direction Markov's worst case points.
It also gives the cleanest way to see how the bound behaves as a moves. The bound 10/a decays like 1/a, while the true tail e−a/10 decays exponentially. So the further out you look the worse the ratio gets, even though the bound itself keeps shrinking. Markov's guarantee weakens much more slowly than the reality it is bounding.
Uniform: the Largest Tail of the Nine
The uniform option spreads mass evenly over [0,2E[X]]=[0,20], giving a flat density of 0.05. The tail beyond a=15 is the rectangle from 15 to 20, so P(X≥15)=5/20=25.0%.
That is the largest actual tail among all nine distributions at these settings.
Uniform on [0, 20], a = 15
A flat density of 0.05, so the shaded tail is the rectangle from 15 to 20: 5 x 0.05 = 25.0%. The one state whose tail can be checked by hand.
Even the largest of the nine is well under the 66.7% bound, which is the honest summary of Markov: it is almost never close.
This state is the easiest to check by hand, and that makes it the best one to start from. The density is constant, so the tail is a rectangle and the arithmetic is 5×0.05. Every other option on the list requires either an integral or a sum.
Poisson: a Discrete Tail Read as Stems
Choosing Poisson switches the chart from a filled curve to stems with round heads, one per integer, and the tool sums the stems at x≥15 rather than integrating. With λ=E[X]=10 that sum is 8.3%.
The red stems are the ones being added up.
Poisson, lambda = 10, a = 15
The chart switches to stems, and the tool sums the red ones rather than integrating: 8.3%. Poisson mass sits within a few sigma of lambda, and sigma here is only 3.2.
The bound is now about eight times the truth. Poisson mass concentrates within a few standard deviations of λ — here σ=10≈3.2, so a=15 sits about 1.6σ out — and Markov has no way to know that, because it never sees a variance.
This is the first state where the switch from continuous to discrete matters for how the number is produced. For the three continuous options the tool evaluates a closed form; for the six discrete ones it adds up the plotted stems.
Binomial: the Bound at Its Loosest but One
The binomial option fixes p=0.4 and derives n=round(E[X]/p)=25, so the mean is 25×0.4=10 as required. The tail at x≥15 is 3.4%.
Against the 66.7% bound that is a ratio of roughly 20×.
Binomial, n = 25, p = 0.4, a = 15
A sum of 25 trials, so it concentrates: sigma = 2.45 and the threshold is over two sigma out. The tail is 3.4%, a twentyfold gap to the bound.
A binomial is a sum of 25 independent trials, and sums concentrate. Its standard deviation is np(1−p)=6≈2.45, so the threshold sits over two standard deviations above the mean and very little mass survives out there.
The pattern across the nine is now visible: the more concentrated a distribution is, the more Markov overstates its tail. That is not a flaw in the inequality but a statement of what it was given — one number, and no way to distinguish a spread-out variable from a concentrated one.
Geometric: Heavy Tail, Truncated Window
With p=1/E[X]=0.1 the geometric puts 21.4% of its mass at x≥15 — second only to the uniform among the nine.
The stems visibly decay by a constant factor of 0.9 from one integer to the next.
Geometric, p = 0.1, a = 15
Stems decaying by a constant 0.9 each step, with 21.4% at or beyond a. The plotted window holds 98.5% of the mass, so this figure slightly undercounts the true tail.
There is a detail here worth knowing before trusting the printed number. The geometric support is unbounded, but the tool plots and sums only x=1 to 40, which carries about 98.5% of the mass. The remaining 1.5% lies past the right edge and is not counted, so the reported "Actual" is a slight undercount rather than the exact tail.
That never threatens the inequality — undercounting can only make the actual smaller than the bound — but it does mean this figure is the sum over the drawn stems, not a closed form. The same applies to the negative binomial. For the exponential, normal and uniform the tool uses exact formulas instead, so no truncation is involved.
Negative Binomial: Five Successes at a Time
The negative binomial option fixes r=5 and solves p=r/(E[X]+r)=5/15=1/3 so the mean lands on 10. The tail beyond a=15 is 18.8%.
Its shape sits between the geometric's steady decay and the binomial's tight hump.
Negative binomial, r = 5, p = 1/3, a = 15
Shape between the geometric and the binomial, and a tail of 18.8% that sits between theirs. At r = 1 this option would be the geometric exactly.
That intermediate position is exactly what the parameter r controls. At r=1 the negative binomial is the geometric; as r grows the distribution becomes more symmetric and more concentrated, and the actual tail shrinks toward the binomial's. Fixing r=5 puts this option in the middle of that range, and its 18.8% sits between the geometric's 21.4% and the binomial's 3.4%.
Like the geometric, its support is unbounded and the plotted window is finite, though here the omitted mass is under 0.01%.
Hypergeometric: Where the Bound Is Almost Meaningless
The hypergeometric fixes a population of N=50 with K=30 successes and draws n=round(E[X]⋅N/K)=17. The tail at x≥15 is 0.3%.
The bound is still 66.7% — over two hundred times the truth, by far the widest gap of the nine.
Hypergeometric, N = 50, K = 30, n = 17, a = 15
Sampling without replacement, capped at 17 draws, so only three values exceed the threshold. The tail is 0.3% - over two hundred times smaller than the bound.
Two things drive it. Sampling without replacement is self-correcting — drawing a success makes the next success less likely — so the hypergeometric is more concentrated than the binomial with the same mean. And the support is hard-capped at n=17 draws, so there are only three integers between the threshold and the largest possible outcome.
Markov cannot use either fact. It does not know the variable is bounded above, and it does not know the variance. Given only E[X]=10 it must still allow for a variable that puts mass at 0 and 15, which is what produces 2/3.
Note also that the rounding makes the mean 17×0.6=10.2 rather than exactly 10, so the bound the tool prints is very slightly optimistic — a rounding artefact of deriving an integer number of draws.
Discrete Uniform: the Discrete Twin of the Flat Case
The discrete uniform puts equal probability on the integers 1 through n=2E[X]−1=19, each 1/19. The values at or above a=15 are 15,16,17,18,19 — five of them — so the tail is 5/19=26.3%.
That is the largest actual tail of all nine states.
Discrete uniform on 1..19, a = 15
Five of the nineteen values are at or above 15, so the tail is 5/19 = 26.3% - the largest of all nine states, and still well under the 66.7% bound.
It edges out the continuous uniform's 25% for a small reason worth seeing: the continuous version spreads mass over [0,20] and the discrete version over {1,…,19}, and the threshold a=15 is included in the discrete tail because the inequality is P(X≥a). Endpoint conventions matter for discrete variables in a way they never do for continuous ones, where a single point carries no probability.
Across all nine states the actual tail runs from 0.3% to 26.3% against one unchanging bound of 66.7%. Even the worst case among real distributions uses barely two fifths of what Markov permits.
Adjusting E[X] and Threshold
DemoMoving E[X] and a
Step 0 of 4
Two sliders control the key parameters:
E[X] Slider (green): Sets the expected value from 1 to 30. This changes the distribution's location and scale. Higher E[X] generally spreads the distribution rightward.
Threshold (a) Slider (red): Sets the threshold from 1 to 40. This determines where tail probability is measured. The red dashed line and shaded region update accordingly.
Key experiments to try:
• Set a = E[X]: The bound becomes 1 (100%), which tells us nothing • Set a = 2·E[X]: The bound becomes 0.5 (50%) • Set a >> E[X]: The bound becomes small, and actual probability becomes tiny • Compare Exponential vs Normal at the same settings
When Markov Becomes Useless
DemoWhen the bound says nothing
Step 0 of 4
The visualization displays a warning when a ≤ E[X]. In this case:
aE[X]≥1
A probability bound of 100% or more is trivially true and provides no information. Every probability is ≤ 1, so saying P(X ≥ a) ≤ 1.5 tells us nothing.
The warning box turns red and explains that the bound is useless. To get meaningful information, increase a above E[X].
This limitation is fundamental to Markov's inequality. The bound only constrains tail probabilities in the region beyond the expected value. For probabilities closer to the center, you need stronger inequalities like Chebyshev.
Exponential with a = 8, below E[X] = 10
With a under the mean the bound is 10/8 = 1.25, and the tool turns its header panel red. A bound of 125% is true but empty: every probability is at most 1 anyway.
Comparing Bound to Actual Probability
The information panel shows two values:
• Bound: The Markov upper bound E[X]/a • Actual: The true tail probability P(X ≥ a)
The ratio Bound/Actual indicates how loose the inequality is. Typical observations:
Exponential distribution: Bound is relatively tight (ratio 2-5x) Normal distribution: Bound is loose - at the opening settings it gives 66.7% against an actual 15.9% (about 4x), and the gap widens as a moves into the tail Uniform distribution: Bound can be exact at certain thresholds
The gap exists because Markov must hold for ANY non-negative distribution with that E[X]. The worst-case distribution (which achieves the bound) places all probability mass at exactly 0 and a, creating maximum tail probability.
Real distributions spread probability more evenly, giving smaller tails than the worst case.
Why Markov's Inequality Matters
Despite being loose, Markov's inequality is valuable because:
Minimal requirements: Only needs X ≥ 0 and E[X] known. No variance, no distribution shape.
Universal applicability: Works for any non-negative random variable, continuous or discrete.
Theoretical foundation: Building block for stronger inequalities. Chebyshev's inequality is derived from Markov applied to (X - μ)².
Quick bounds: When you only know the average, Markov gives an instant upper bound.
Applications include algorithm analysis (bounding worst-case by average-case), queueing theory (service time bounds), and proving convergence in probability (weak law of large numbers).
Related Tools and Concepts
Markov's inequality connects to other probability concepts and tools: