Let $X= x\_1 + x\_2 + \ldots + x\_m$, $Y=y\_1 + y\_2 + y\_3 + \ldots + y\_n$, and $Y' = y'\_1 + y'\_2 + \ldots + y'\_n$, where 


* Each $x\_i$ is a Bernoulli variable which takes value $1$ with probability $p\_i>0$.
* Each $y\_i$ is a Bernoulli variable which takes value $1$ with probability $q\_i>0$.
* For $i>2$, each $y'\_i$ is a Bernoulli variable which takes value $1$ with probability $q\_i>0$.
* $y'\_1$ and $y'\_2$ are two Bernoulli variables which take value $1$ with probability $(q\_1 + q\_2)/2$ (Suppose that $q\_1 \neq q\_2$).
* All the variables are independent.


Furthermore, suppose that $E(X) \geq E(Y)$ and $m>n$. Now, let $A = Pr(Y\geq X)$ and $A' = Pr(Y' \geq X)$. The question is whether $A>A'$ or $A'>A$? 



$Pr(A>B)$, where $A$ and $B$ are sum of Bernoullies
Both $A>A'$ and $A'>A$ are possible.


Let $S:= Y\_3+Y\_4+\cdots Y\_n$.
Assuming independence, we have
\begin{align}
 \triangle A := A-A' &=
 \mathbb{P}(Y\geq X) - \mathbb{P}(Y'\geq X) \\
 &=
 \sum\_a\mathbb{P}(X=a)\big[\mathbb{P}(Y\geq a) - \mathbb{P}(Y'\geq a)\big] \\
 &=
 \sum\_a\mathbb{P}(X=a)\Big[\sum\_{b\geq a}\mathbb{P}(Y=b)-\sum\_{b\geq a}\mathbb{P}(Y'=b)\Big] \\
 &=
 \sum\_a\mathbb{P}(X=a)\sum\_{b\geq a}\sum\_{c=0}^2\mathbb{P}(S=b-c)
 \big[\mathbb{P}(Y\_1+Y\_2=c) - \mathbb{P}(Y'\_1+Y'\_2=c)\big] \;.
\end{align}
Let $\bar{q}:=(q\_1+q\_2)/2$ and $\varepsilon:=|q\_1-q\_2|/2$. We can verify that
\begin{align}
 \mathbb{P}(Y\_1+Y\_2=c) - \mathbb{P}(Y'\_1+Y'\_2=c) &=
 \begin{cases}
 -\varepsilon^2 &\text{if $c=0$,} \\
 2\varepsilon^2 &\text{if $c=1$,} \\
 -\varepsilon^2 &\text{if $c=2$.}
 \end{cases}
\end{align}
It follows that
\begin{align}
 \triangle A &= \sum\_a\mathbb{P}(X=a)\sum\_{b\geq a}
 \varepsilon^2\big[
 -\mathbb{P}(S=b) + 2\mathbb{P}(S=b-1) - \mathbb{P}(S=b-2)
 \big] \\
 &=
 \varepsilon^2\sum\_a\mathbb{P}(X=a)\Big[
 -\sum\_{b\geq a}\mathbb{P}(S=b)
 +2\sum\_{b\geq a-1}\mathbb{P}(S=b)
 -\sum\_{b\geq a-2}\mathbb{P}(S=b)
 \Big]\\
 &=
 \varepsilon^2\sum\_a\mathbb{P}(X=a)\big[
 \mathbb{P}(S=a-1)-\mathbb{P}(S=a-2)
 \big] \;.
\end{align}


Now, let us consider two examples.
Observe that if $n=2$, then $\mathbb{P}(S=0)=1$, and consequently
\begin{align}
 \triangle A &=
 \varepsilon^2\big[\mathbb{P}(X=1)-\mathbb{P}(X=2)\big]
 \tag{$\star$}
\end{align}
Also, note that $\mathbb{E}(X)\geq \mathbb{E}(Y)$ if and only if $p\_1+p\_2+\cdots+p\_m\geq q\_1+q\_2+\cdots+q\_n$.


**Example 1** ($A<A'$).  

Let $m=4$, $n=2$, $p\_1=p\_2=p\_3=p\_4=1/2$, and let $0<q\_1<q\_2<1$ 
Then, $p\_1+p\_2+p\_3+p\_4=2>q\_1+q\_2$, hence the requirements are satisfied. From ($\star$) we get
\begin{align}
 \triangle A &=
 \varepsilon^2(1/4)^4\Big[
 \binom{4}{1}-\binom{4}{2}
 \Big] < 0 \;.
\end{align}


**Example 2** ($A>A'$).  

Let $m=3$, $n=2$, $p\_1=1-\delta$, $p\_2=p\_3=\delta$ where $0<\delta\ll 1$, and assume $q\_1,q\_2$ are distinct and satisfy $q\_1+q\_2\leq 1$. Then, $p\_1+p\_2+p\_3=1+\delta>1\geq q\_1+q\_2$, hence the requirements are satisfied.
From ($\star$) we get
\begin{align}
 \triangle A &=
 \varepsilon^2\Big[
 (1-\delta)^3+2\delta^2(1-\delta) - 2\delta(1-\delta)^2-\delta^3
 \Big] \;.
\end{align}
which is positive (it is $\approx \varepsilon^2$) when $\delta>0$ is sufficiently small.


