probability distribution of a random selection from one of two bernoulli random variables

354 Views Asked by At

Say I have two bernoulli random variables, $X$ and $Y$, and that I want to randomly select from either one of them with some probability $p$.

In other words:

$X$ ~ $Be(p_X)$

$Y$ ~ $Be(p_Y)$

Then I want to know the distribution of:

$Z = pX + (1-p)Y$

2

There are 2 best solutions below

5
On BEST ANSWER

The identity $Z=pX+(1−p)Y$ does not correspond to the situation you describe. Instead, one should define $$ Z=WX+(1-W)Y, $$ where $X$, $Y$ and $W$ are independent and Bernoulli with respective parameters $p_X$, $p_Y$ and $p$. Using the identities $$[Z=1]=[W=1,X=1]\cup[W=0,Y=1], $$ and $$ [Z=0]=[W=1,X=0]\cup[W=0,Y=0], $$ one sees that $Z$ is Bernoulli with parameter $$ q=pp_X+(1-p)p_Y. $$

1
On

Let $W$ be another bernoulli random variable with the probability $p$ in the definition of $Z$.

$W$ ~ $Be(p)$

Then $Z$ can be rewritten as:

$Z$ = $WX + (1-W)Y$

Note that $1-W$ is bernoulli:

$1 - W$ ~ Be($1-p$)

And the product of two bernoulli random variables is itself a bernoulli random variable, so:

$WX$ ~ Be($p\cdot p_X$)

$(1 - W)Y$ ~ Be($(1-p)\cdot p_Y$)

The sum of independent random bernoulli variables forms a poisson binomial distribution.

Since $WX$ and $(1-W)Y$ are independent bernoulli random variables, then $Z = WX + (1-W)Y$ is a poisson binomial random variable with parameters ($p\cdot p_X$, $(1-p)\cdot p_Y$).