# probability mass function of a random pick from either of the other two random entities.

This is not a hypothesis testing problem.

Let $Z$ be discrete non-negative random variable, such that it picks either the value of random variable $X$ with probability $p$ or the random variable $Y$ with probability $q$. The pdfs of both $X$ and $Y$ are known, is there a way to caculate the pdf of $Z$.

For instance: $$X \: \sim Poisson(\lambda_0), \\ Y \: \sim Poisson(\lambda_1), \\ Z = \begin{cases} X &\mbox{with probability } p \\ Y &\mbox{with probability } q . \end{cases} \\ f(Z)= ?$$

I believe it is simply: $$f_Z(z) = \begin{cases}p \cdot f_X(z) + q \cdot f_Y(z)& \text{if } z \in \mathbb{N}_0,\\ 0 & \text{if }z \notin \mathbb{N}_0.\end{cases}$$
For the moment, let's say $X$ and $Y$ be continuous RVs. We know that the probability that $Z$ is included within the interval $(t,t+dt)$ is $f_{Z}(z)dt$
So, $$f_{Z}(z)dt = p\times f_{X}(z)dt +q\times f_{Y}(z)dt\\ \Rightarrow f_{Z}(z)= p\times f_{X}(z) +q\times f_{Y}(z)$$ Note: Make sure of the domain of $X,Y \,and\, Z$
Similarly, for discrete cases, (simple multiplication of probability of events) $$P_{Z}(z) = p\times P_{X}(z) +q\times P_{Y}(z)\\$$