Probability question about virus testing

95 Views Asked by At

I got the following homework assignment and I am having a hard time solving the second question. It goes like this:

1000 people come to test for a virus, the probability that one person have the virus is $p$ in an independent way. We divide the people to 50 equal groups, $A_{1},\ldots,A_{50}$ in the first stage we mix the sample of the people in some group and checks if the virus is in the mixed sample, and afterwards, for every group which has the virus we check the people individually for the virus.

  1. by using $p$ shows what the expected value of the number of tests the lab has to make.
  2. Assume the group testing are random, and after wards we make the individual's test also in a random way(random between all the people from all the positive groups). If Z is a random variable indicating how many tests passed until we know if anna's(random person) test is negative\positive. Show the expected value of Z using $p$.

My solution for 1 was $E\left(X\right)=50\cdot\left(21-20\left(1-p\right)^{20}\right)$, I used $X_{1},\ldots,X_{50}$ to compute the expected value of testing in each group, which came out as $$E\left(X_{i}\right)=1\cdot P\left(P_{1}=0,\ldots,P_{20}=0\right)+21\cdot P\left(\text{at least one is sick}\right)=21-20\left(1-p\right)^{20}$$ $$E\left(X\right)=50\cdot E\left(X_{i}\right)=50\left(21-20\left(1-p\right)^{20}\right)$$Is it right?

And for 2 I wanted to use $Y\sim\text{Ber}\left(1-\left(1-p\right)^{20}\right)$, random variable indicating whether anna's group tested positive or not, my idea is to compute $E\left(E\left[Z|Y\right]\right)=E\left(Z\right)$ it came out that $E\left(Z|Y=0\right)=25.5$ but I am having a hard time solving $E\left(Z|Y=1\right)$ as it starts to became real ugly, is it the right way? or am I just not using the right method to solve it? any help is welcomed, thank you!