Expectation and variance of sample mean with random sample size

I have a question regarding sampling where the sample size itself is a random variable.

Say I have two sub-populations $A$ and $B$ from which I can sample a real valued random variable with replacement. Suppose that the number of draws from sub-populations $A$ and $B$ is random and given by independent Poisson random variables $\tilde{n}_A$ and $\tilde{n}_B$ with parameters $\lambda_A$ and $\lambda_B$ respectively. I am interested in the resulting sample mean $\bar{x}$ consisting of $n_A$ draws from sub-population $A$ and $n_B$ draws from sub-population $B$.

I wish to compute the expectation and variance of $\bar{x}$. My intuition tells me that $E[\bar{x}]=\frac{\lambda_A}{{\lambda_A}+{\lambda_B}}\mu_A+\frac{\lambda_B}{{\lambda_A}+{\lambda_B}}\mu_B$, but I am getting lost when trying to demonstrate this. I am similarly stumped on computing the variance.

Any help or pointers would be greatly appreciated.

• – Mark L. Stone Jul 13 '16 at 16:53