# Determining what distribution a given random variable has.

Let $X$ be a poissonian random variable with an expected value of 100. (I guess it means $\lambda=100$). Let there be a kindergarten with $X$ kids. On a certain day, the teacher decides to split the kids to two groups- Heads group, and Tails group. For every kid she tosses a coin and that way knows what group the kid belongs to, independently. If $Z_H$ is the number of kids in the Heads group, what is its distribution?

a. Negative binomial
b. Poissonian
c. Binomial
d. None

I am really confused about it. How does one determines such a distribution? How does the fact that $X$ is poissonian help here? If I am to look into $Z_H$ distribution, isn't $X$ to merely be taken as a number? I would really appreciate your help.

There are $X$ number of kids, $X$ being $Pois(100)$. Given a realized value of $X$, the number of heads follows a binomial distribution:

$$P(k\mbox{ heads}|X)=\binom{X}{k}0.5^{k}0.5^{X-k}=\binom{X}{k}0.5^X.$$

Now just condition out $X$:

$$P(k\mbox{ heads})=\sum_{X=0}^\infty \binom{X}{k}0.5^X P(X)=\sum_{X=0}^\infty \binom{X}{k}0.5^X \frac{1}{e^{\lambda}}\frac{\lambda^X}{X!}=\frac{(0.5 \lambda)^{k}}{e^{\lambda} k!}\sum_{X=k}^\infty \frac{(0.5 \lambda)^{X-k}}{(X-k)!}=\frac{(0.5 \lambda)^{k}}{e^{\lambda} k!}e^{0.5\lambda},$$

where we used the fact that $\binom{X}{k}=0$ when $k>X$.

Simplifying gives:

$$P(k\mbox{ heads})=\frac{1}{e^{0.5 \lambda}}\frac{(0.5\lambda)^k}{k!},$$

a poisson distribution with parameter $0.5\lambda$. Cute!

Your question "isn't $X$ to merely be taken as a number" is the essence of conditioning. If $X$ is known, then $Z_H$ is simply a binomial distribution. However, $X$ is unknown...

Let $p$ be the probability that the coin is heads.

For $k \ge 0$, \begin{align*} \mathbb{P}(Z_H=k) &= \sum_{x \ge 0} \mathbb{P}(Z_H=k, X=x)\\ &= \sum_{x \ge k} \mathbb{P}(Z_H=k, X=x)\\ &= \sum_{x \ge k} \mathbb{P}(Z_H=k \mid X=x) \cdot \mathbb{P}(X=x)\\ &= \sum_{x \ge k} \binom{x}{k} p^k (1-p)^{x-k} e^{-\lambda} \frac{\lambda^x}{x!}\\ &= e^{-\lambda} p^k \sum_{x \ge k} \binom{x}{k} (1-p)^{x-k} \frac{\lambda^x}{x!}\\ &= e^{-\lambda}\lambda^k p^k \frac{1}{k!} \sum_{x \ge k} \frac{ ((1-p)\lambda)^{x-k}}{(x-k)!}\\ &= e^{-\lambda}(\lambda p)^k \frac{1}{k!} e^{(1-p)\lambda}\\ &= e^{-\lambda p} \frac{(\lambda p)^k}{k!}. \end{align*}

So, $Z_H$ is Poisson with parameter $\lambda p$. This is one of the nice properties of the Poisson distribution... I think it is called decomposition?