# Visualizing Markov and Chebyshev inequalities

I am helping a class on introductory probability covering Markov and Chebyshev's inequalities. I would like to give the students a nice visualization for why they are true or at least to show what they mean. What would be a good way to do this? Fix a non-negative integer random variable $X$. Plot $\Pr[X\ge x]$ as a function of $x$. By splitting the area under the curve into horizontal rectangles, we see that the area under curve is $\sum_x \Pr[X\ge x] = \sum_x x\cdot \Pr[X=x] = E[X]$. For any particular value of $x$, the (shaded) rectangle with width $x$ and height $\Pr[X\ge X]$ fits under the curve. We conclude that $x\cdot \Pr[X\ge x] \le E[X]$.

The same argument works for continuous random variables; the only difference is that the curve may be smooth.

Here's a picture that might prove helpful in explaining Markov's theorem. The scenario is as follows. We have $11$ different outcomes. Each has a value ranging from $2$ to $12$, and a probability between $0.02$ and $0.18$. This information is contained in the top left picture. If we want to find the probability $P(X \geq 8)$, i.e. that we get an event of value at least $8$, we add the heights of the last five bars, as shown in the top-right picture. If we then multiply this by $8$, we get the area of the purple bars in the bottom left picture. But the area of the purple bars in the bottom left picture is left than the area of the purple bars in the bottom right picture, with their original widths (width represents value). And, of course, the area of the purple bars in the bottom right picture is less than the total area of all the bars, which represents the sum of the probabilities times the values, which is just the expectation. So we have

$$8 \times P(X \geq 8) \leq E(X)$$

Rearranging,

$$P(X \geq 8) \leq \frac{E(X)}{8}$$