When does equality in Markov's inequality occur? Markov's inequality states that given any nonnegative random variable and $a>0$ then we have: 
$$P(X \geq a) \leq \frac{E(X)}{a}$$
At which $a$ is equality supposed to hold?
 A: First assume $a$ is finite, otherwise the result is trivial. Define the random variable $Y_{a}=X-a1_{\{X \geq a\}}$, where $$1_{\{X \geq a\}}=
\begin{cases}
1, \:\text{if}\; X\geqslant a\\
0, \:\text{if}\; X< a
\end{cases}.$$
Observe that $Y_a$ is non-negative. Taking the expectation yields $$E(Y_a)=E(X)-aP(X \geq a).$$
Hence Markov's inequality holds with equality if and only if $E(Y_a)=0$. Since $Y_a$ is non-negative, this is equivalent to $P(Y_{a}=0)=1$. Note that $Y_{a}=0$ if and only if $X=0$ or $X=a$.
Therefore, Markov's inequality holds with equality if and only if $P(X\in\{0,a\})=1$.
A: For $X\ge 0$, $$ E[X]=\int_{0}^\infty \Pr[X\ge x] dx\ge \int_{0}^a \Pr[X\ge x] dx\ge (a-0)\cdot \Pr[X\ge a]=a\cdot \Pr[X\ge a]$$
So we can see we need $\Pr[X\ge x]$ constant for $0< x< a$ and $\Pr[X\ge x]=0$ for $x>a$ to have the equality. 
A: You get equality when $X$ is a random variable that takes on value $a$ with probability $1$. For any non-constant non-negative random variable, you will always have $P(X \geq a) < E(X)/a$ because the quantity $a P(X \geq a)$ is less than or equal to a strict partial contribution to the expectation $E(X)$.
