We say that $X$ dominates $Y$ stochastically if for all $x\in\mathbb R$, $F_X(x)\leqslant F_Y(y)$, written $X\geqslant_{\mathrm{st}}Y$. It is a known theorem that if $X\geqslant_{\mathrm{st}}Y$, there exists a probability space $(\Omega,\mathcal F, \mathbb P)$ (namely $([0,1], \mathcal B([0,1]), \mathsf{Leb})$ and random variables $X'$, $Y'$ such that
- $X' \stackrel d= X$
- $Y' \stackrel d = Y$
- $\mathbb P(X'\geqslant Y')=1$.
For example, let $X_n$ be i.i.d. with $\mathbb P(X_n=1)=p=1-\mathbb P(X_n=0)$, which models the flips of an unfair coin. Fix $p<q<1$ and define $Z_n$ to be i.i.d. with $\mathbb P(Z_n=1)=\frac{q-p}{1-p}=1-\mathbb P(Z_n=0)$. Define $$ Y_n = X_n\mathsf 1_{\{X_n=1\}} + Z_n\mathsf 1_{\{X_n=0\}}. $$ Then any sequence of $Y_n$ has exactly the distribution of tosses made with a second unfair coin with probability heads $q$, but we can directly compare the $X_n$ and $Y_n$ like so: $$ \mathbb P\left(\sum_{j=1}^n X_j>k\right)\leqslant P\left(\sum_{j=1}^n Y_j>k\right) $$
My question:
I get that $\mathbb P(Y_n=1)=q=1-\mathbb P(Y_n=0)$ and that the inequality in the above displayed equation holds, but where is the intuition behind defining $Y_n$ like so? Is it just to write $Y_n$ in terms of indicator functions of $X_n$?