product of Bernoulli and Categorical distribution

612 Views Asked by At

I have random variable, which is the product of two random variables, derived such that.

$Z = X_i*Y$, where $X_i\sim Ber(p_i)$ and $Y \sim Categorical(i,\frac{1}{n}) $, here $n$ is the number categories. In my specific settings, I have 5 categories, and the probability of choosing any category is $\frac{1}{5}$.

What I am trying to do is, once I sample a category from using the category distribution, and multiply it with the binary variable {0,1} sampled from the Bernoulli distribution with parameter depending on the category.

What is the distribution of the Z ?. Any way to derive it analytically ?.

1

There are 1 best solutions below

4
On

Let $X_i\sim\operatorname{Ber}(p_i)$ for $1\leqslant i\leqslant n$ be independent and $Y$ be uniformly distributed on $\{1,2,\ldots n\}$, independent of the $X_i$. Define $$Z = \sum_{i=1}^n X_iY. $$ Then $$\mathbb P(Z=0) =\mathbb P\left(\bigcup_{i=1}^n \{X_i=0,Y=i\}\right) = \frac1n\sum_{i=1}^n (1-p_i) $$ and for $1\leqslant i\leqslant n$, $$\mathbb P(Z=i) = \mathbb P(X_i=1, Y=j) = \frac{p_i}n. $$