Let $X, Y$ be Bernoulli RV's with parameters $p, q$, respectively.
Let $F_X, F_Y$ be the distribution functions.
Calculate
$$d_L(F_X, F_Y) := \inf \{ \varepsilon > 0 | F_Y(x - \varepsilon) - \varepsilon < F_X(x) < F_Y(x+ \varepsilon) + \varepsilon \} $$
When $p = q$, then clearly $d_L(F_X, F_Y) = 0$, but I'm having trouble calculating this when $p \neq q$...any hints?
We have that $F_Y(y) = (1-q)$ for $y=0$ and $1$ for $y=1$. Similarly $F_X(x) = (1-p)$ for $y=0$ and $1$ for $y=1$.
For $x,y < 0$ or $x,y>1$ it is 0 and 1, respectively.
We only need to examine two cases of $x$ then in the expression for the Levy distance, $x\in\{0,1\}$.
Case where x=0:
$F_Y(x-\varepsilon) - \varepsilon = -\varepsilon$, and $F_Y(x+\varepsilon) + \varepsilon$ = $q + \varepsilon$ if $\varepsilon < 1$ and $1+\varepsilon$ otherwise.
$F_X(x) = p$ in this situation.
So the value for $\varepsilon$ for which the infimum would be obtained would be $\varepsilon = 0$ for $q>p$, and $\varepsilon = p-q$ for $q<p$.
Case where x=1:
$F_Y(x-\varepsilon) - \varepsilon = q -\varepsilon$ for $\varepsilon < 1$, and $\varepsilon$ otherwise.
$F_Y(x+\varepsilon) + \varepsilon$ = $1 + \varepsilon$.
$F_X(x) = 1$ in this situation.
So the value for $\varepsilon$ for which the infimum would be obtained would be $\varepsilon = 0$ for $q<p$, and $\varepsilon = p+q$ for $q>p$.
So the value minimizing the distance is $0$ across both values of $x$.