In my setup,

  • there are $m$ trials.
  • Each trial has a probability $q$ of being selected.
  • $N \leq m $ is the number of selected trials
    $$ \rightarrow N \sim \text{Bin}(q, m) $$

  • For each of the $N$ selected trials, the probability of success is $p$

  • $K\leq N$ is the number of successful trials
    $$ \rightarrow (K|N) \sim \text{Bin}(p, N) $$

I have already derived $E[K] = qmp $, and $Var(K)= qmp(1-p) + p^2 m q(1-q)$

However I am stuck in the derivation of $cov(K, N)$. I would appreciate any help to solve this.


1 Answer 1


Using the law of total covariance, \begin{align} \operatorname{Cov}(K,N) &=E\operatorname{Cov}(K,N|N)+\operatorname{Cov}(EK|N,EN|N) \\&=E 0+\operatorname{Cov}(pN,N) \\&=0+p\operatorname{Var}(N) \\&=pmq(1-q). \end{align}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.