# Doubt about the Markov Inequality

I have a random variable $X$ that can have 3 values : $\left \{ 0,1,2 \right \}$, and $E[X]=1$.

If i use the Markov Inequality i get that $P(X\geq 2)\leq \frac{1}{2}$.

Now, if i assign $\frac{1}{2}$ probability to 2, and the remaining $\frac{1}{2}$ probability to 1, i get an expected value $E[X]=1.5$, that is different from the initial expected value. Why Markov Inequality doesn't work ? Where am i wrong ?

• From the given support and expectation, we can easily deduced that $\Pr\{X = 1\} = 1$ and thus $\Pr\{X \geq 2\} = 0$. Note that Markov Inequality is quite general, requiring little assumption, so the bound is loose but not tight. And most importantly it is an inequality, and never tells you that the equality will hold for your specific case. And in fact $0 < 1/2$ so the inequality is satisfied. – BGM Jun 26 '18 at 6:46
• I'm sorry the values of the initial post were wrong, i edited. – Qwerto Jun 26 '18 at 6:50
• It does not matter. In this case you can also easily deduced that $\Pr\{X = 0\} = \Pr\{X = 2\}$, so you also obtain the same bound in this way. Now the equality can be attained when you assign them to be $1/2$, and $\Pr\{X = 1\} = 0$. – BGM Jun 26 '18 at 6:53
• So , Markov Inequality does NOT give an upper bound that is respected by every probability distribution of the given random variable. Is this correct ? – Qwerto Jun 26 '18 at 7:05
• The markov inequality contains the expectation. To get the expectation you have to fix a distribution. So: First choose your distribution THEN use markov inequality. The other direction doesn't work. – Gono Jun 26 '18 at 7:43

"If i use the Markov Inequality i get that $P(X≥2)≤\frac{1}{2}$"

This already uses $\mathbb{E}[X]=1$

"Now, if i assign $\frac{1}{2}$ probability to $2$, and the remaining $\frac{1}{2}$ probability to $1$, i get an expected value $\mathbb{E}[X]=1.5$, that is different from the initial expected value"

In this you are changing the expectation, hence the bound above when using Markov's inequality will change

To have $E[X]=1$, you will need $P(X=0)=P(X=2)$ and $P(X=1)=1-2P(X=2)$

• so if you assign $P(X=2)=\frac12$ then you have $P(X=0)=\frac12$ and so $P(X=1)=0$
• while if you assign $P(X=2)=0$ then you have $P(X=0)=0$ and so $P(X=1)=1$
• and if you assign $P(X=2)=\frac13$ then you have $P(X=0)=\frac13$ and so $P(X=1)=\frac13$

You can in fact assign $P(X=2)$ any non-negative value up to $\frac12$ and the Markov inequality you found is consistent with this