Expectation of a Random Variable
Markov's inequality applies to nonnegative random variables.
Try it: Expectation and Variance of a Random Variable
A discrete random variable X as values with probabilities: the expectation E[X] = Σ x·p(x) is a probability-weighted average, and the variance is the expected squared distance from that mean, computed two ways.
How it works
- Each outcome has a value x and a bar height; probabilities are the heights renormalised, p(x) = height / total, so they always sum to exactly 1.
- E[X] = μ is built term by term: every outcome adds x·p(x) to the running sum.
- Var[X] = E[(X − μ)²]: centre each value on μ, square the deviation, weight it by p(x) and add.
- The same variance again as E[X²] − μ², and the standard deviation √Var[X].
- All sums are exact fractions (shown alongside decimals).
Default run (22 steps): X has 6 outcomes with bar heights 10, 10, 10, 10, 10, 10 (total W = 60). … E[X] = μ = 7/2 = 3.5; Var[X] = 35/12 ≈ 2.9167; standard deviation = √Var ≈ 1.7078.
Simplified: Up to 8 outcomes with integer values from −20 to 20 and integer bar heights 0–100. If every bar is 0 the first outcome gets height 1 (a distribution needs total probability 1).
Loading the simulation…
From Average to Probability
Suppose Z is a random variable that never takes a negative value. You know its expectation, E[Z], but you want to control how likely Z is to reach or exceed a chosen threshold x. Markov's inequality connects these two pieces of information: it uses the expectation to produce an upper bound on the probability of the event Z ≥ x.
The result is an upper bound, not necessarily the exact probability.
What Expectation Tells You
The expectation of a random variable describes its average value. It combines the possible values of the variable with their probabilities to produce a weighted average. In Markov's inequality, the expectation E[Z] supplies the average-size information used to control the probability of reaching a threshold.
The Nonnegative Requirement
A nonnegative random variable is a random variable whose values are always at least zero. Markov's inequality applies only under this condition.
The condition matters because Markov's inequality is stated for a variable Z whose values are not negative, together with its expectation E[Z] and a threshold x. The event being bounded is Z ≥ x: Z reaches or exceeds the threshold.
Markov's Inequality
To use the inequality, identify three ingredients: the nonnegative random variable Z, its expectation E[Z], and the chosen threshold x. Divide the expectation by the threshold. The resulting ratio is an upper bound for the probability that Z reaches or exceeds x.
Substituting Known Values
Bounding a Threshold Event
Suppose Z is nonnegative, E[Z] = 6, and the threshold is x = 15. Use Markov's inequality to bound P[Z ≥ 15].
- 1Identify the inequality
For a nonnegative random variable, use P[Z ≥ x] ≤ E[Z] / x.
- 2Substitute the expectation and threshold
Replace E[Z] with 6 and x with 15, giving P[Z ≥ 15] ≤ 6 / 15.
- 3Evaluate the ratio
The ratio 6 / 15 equals 0.4.
P[Z ≥ 15] ≤ 0.4. The probability is at most 0.4; it is not necessarily equal to 0.4.
P[Z ≥ 15] ≤ 6 / 15 = 0.4Raising the Threshold
For a fixed nonnegative random variable and a fixed expectation, Markov's bound has the form E[Z] / x. When x increases, the denominator becomes larger, so the ratio becomes smaller. The probability of reaching or exceeding the higher threshold therefore has a no-larger Markov bound. The probability P[Z ≥ x] is also monotonically nonincreasing as the threshold increases.
Common Mistakes
Common mistake Applying Markov's inequality without checking nonnegativity.
What it looks likeUsing the formula for a random variable that may take negative values.
Why it failsMarkov's inequality requires the random variable to never take a negative value.
Do this insteadFirst verify that Z is nonnegative.
Common mistake Treating the upper bound as the exact probability.
What it looks likeConcluding that P[Z ≥ 15] equals 0.4.
Why it failsThe inequality states that the probability is at most 0.4.
Do this insteadWrite P[Z ≥ 15] ≤ 0.4 and interpret it as an upper bound.
Common mistake Using the wrong threshold event.
What it looks likeReplacing P[Z ≥ x] with a probability for an unrelated event.
Why it failsMarkov's inequality specifically bounds the event that Z reaches or exceeds x.
Do this insteadMatch the event and threshold carefully: P[Z ≥ x].
Common mistake Expecting a higher threshold to produce a larger bound.
What it looks likeAssuming that increasing x increases E[Z] / x.
Why it failsWith E[Z] fixed, increasing the denominator makes the ratio smaller.
Do this insteadRecalculate E[Z] / x and compare the two ratios.
Try the Bound
A nonnegative random variable Z has expectation E[Z] = 6. Use Markov's inequality to write an upper bound for the probability that Z reaches or exceeds a chosen threshold x. Then explain what happens to the bound if x increases while E[Z] remains fixed.
Hints
- Start with P[Z ≥ x] ≤ E[Z] / x.
- Substitute E[Z] = 6.
- Compare 6 / x with 6 divided by a larger threshold.
What do you think happens?
If E[Z] stays fixed and the threshold increases, does the Markov bound become larger, stay the same, or become smaller?
Reveal answer
Smaller
The bound is E[Z] / x. Increasing x increases the denominator, so the ratio becomes smaller.
Key Takeaways
- 1A nonnegative random variable never takes a negative value.
- 2Expectation E[Z] represents the average value used in Markov's inequality.
- 3For a nonnegative random variable, P[Z ≥ x] ≤ E[Z] / x.
- 4The result is an upper bound, not necessarily the exact probability.
- 5With a fixed expectation, increasing the threshold makes the Markov bound smaller.
At a glance
- A nonnegative random variable has values that are always at least zero.
- Expectation describes the average value of a random variable.
- Markov's inequality connects E[Z] with the threshold event P[Z ≥ x].
- The bound P[Z ≥ x] ≤ E[Z] / x gives an upper limit, not necessarily the exact probability.
- For fixed expectation, a higher threshold produces a smaller probability bound.