I saw a statement that $P(X\geq 2^{-n})\leq 2^nE X$ is true (for non-negative random variables X) in this question's answer: Supermartingale with constant Expectation is a martingale but I am unsure of how this was reached.
I tried writing the probability as an expectation using the indicator function and then as an integral, but then the resulting integral compared to $2^nEX$ doesn't have a clear relationship that I can see.
So I have $\int_{2^-n}^{\infty}dp(X)$ vs. $\int_{0}^{\infty}2^nXdp(X)$, but am unsure how to proceed from there or if that is even the correct way to proceed.
Any help would be appreciated.
Edit: This is actually very similar to the duplicate marked question (Markov's inequality question about random variable.), but I think it's worth leaving up since the duplicate question has the equations as a picture and therefore the search won't find it unless you indicate Markov's inequality, which other users (like I didn't) might not know about!
This follows from Markov's inequality $$\mathbb{P}(X \geq a) \leq \frac{\mathbb{E}(X)}{a},$$ substituting $2^{-n}$ for $a$.
The wikipedia article gives a proof of Markov's inequality (https://en.wikipedia.org/wiki/Markov%27s_inequality).