4

$X$ and $Y$ are independent aleatory variables.

$X$ : Poisson with 1 such as parameter
$Y$ : Bernoulli with $\frac{1}{2}$ such as parameter


Calculate the discrete probability density of $Z=XY$
$$P(Z=0)=P(\{X=0\} \cup \{Y=0\})= \\=P(X=0)+P(Y=0)-P(X=0, Y=0)=\frac{1}{e}+\frac{1}{2}-\frac{1}{2e}=\frac{e+1}{2e} \\ \\ \forall n \in \mathbb{N^*}, P(Z=n)=P(X=n, Y=1)=\frac{1}{2 \ e \ n!} $$

Is it correct?

Elsa
  • 277

1 Answers1

1

Here is a confirmation by simulation of a million realizations of $Z$.

m = 10^6
x =  rpois(m, 1);  y = rbinom(m, 1, 1/2)
z = x*y

The histogram below is based on the simulated values. Dots atop histogram bars are based on your correct computation of the PDF. When simulation is this easy, it can provide a quick check on the accuracy of an analytic result.

enter image description here

BruceET
  • 51,500