Conditioning the expected value

116 Views Asked by At

Joe looks for aliens. He finds female aliens with probability equal to $p$ ($p$ is not $0$ or $1$). Male aliens with probability $1-p$. He wants to breed alien so he wants male alien and female alien.

I want to find expectation and variance of aliens he will find before finding male and female pair with conditioning. I am having trouble with the set up. e

I suppose we can condition on the first alien like we normally condition. But I am not so sure how to move forward.

4

There are 4 best solutions below

2
On

On the first draw, we will find either a male or a female alien. If it's a male alien (probability $1 - p$), we have to keep drawing aliens until we find a female one. This is a geometric distribution with expected number of remaining draws $\frac{1}{p}$. If the first alien is female (probability $p$), we have to keep drawing aliens until we find a male one. The expected number of remaining draws is then $\frac{1}{1-p}$. If $X$ is the number of required draws, we thus find:

$$E(X) = 1 + \frac{1 - p}{p} + \frac{p}{1-p}$$

As an example, if $p = \frac{1}{2}$, we find $E(X) = 1 + 1 + 1 = 3$.

0
On

Consider $(X_n)$ a sequence of Bernoulli$(p)$ i.i.d random variables.

You're interested in $\tau = \min\{n\geq 2, X_n\neq X_1\}$. Note that $$\begin{aligned}P(\tau=n) &= P(X_1=0,\ldots,X_{n-1}=0,X_n=1) + P(X_1=1,\ldots,X_{n-1}=1,X_n=0) \\&=(1-p)^{n-1}p+p^{n-1}(1-p)\end{aligned}$$

Hence $\displaystyle E(\tau) = \sum_{n=2}^\infty n[(1-p)^{n-1}p+p^{n-1}(1-p)]=\frac{p^2-p+1}{p(1-p)}$

$\displaystyle E(\tau^2) = \sum_{n=2}^\infty n^2[(1-p)^{n-1}p+p^{n-1}(1-p)]=-\frac{p^4-2 p^3-4 p^2+5 p-2}{(1-p)^2 p^2}$

and $$V(\tau)=\frac{-2 p^4+4 p^3+p^2-3 p+1}{(1-p)^2 p^2}$$

0
On

Hint:

For convenience I will write $q$ for $1-p$.

Let $U$ denote the number of trials needed to find a female alien.

Let $V$ denote the number of trials needed to find a male alien.

Let $X$ denote the number of trials needed to find a pair.

Let $F$ denote the event that the first search results in a female alien.

Let $M$ denote the event that the first search results in a female alien.

Then we have:

$$\mathbb{E}X=P\left(F\right)\mathbb{E}\left(X\mid F\right)+P\left(M\right)\mathbb{E}\left(X\mid M\right)=p\mathbb{E}\left(1+V\right)+q\mathbb{E}\left(1+U\right)$$and also:

$$\mathbb{E}X^{2}=P\left(F\right)\mathbb{E}\left(X^{2}\mid F\right)+P\left(M\right)\mathbb{E}\left(X^{2}\mid M\right)=p\mathbb{E}\left(1+V\right)^{2}+q\mathbb{E}\left(1+U\right)^{2}$$

So finding $\mathbb{E}U,\mathbb{E}U^{2},\mathbb{E}V,\mathbb{E}V^{2}$ enables you to find mean and variance of $X$.

Also for that you can use total probability.

0
On

Nice way how you could calculate expected value without even knowing about geometric distribution:

Let $X$ denote the number of female aliens found before finding the first male.

Then: $$E(X) = \sum_{n=0}^\infty n \cdot P(X=n)$$

We can rewrite this into an array form: $$\begin{matrix} P(X=1) & +P(X = 2) & +P(X = 3) & +P(X = 4) & +P(X = 5) & \cdots \\ & +P(X = 2) & +P(X = 3) & +P(X = 4) & +P(X = 5) & \cdots \\ & & +P(X = 3) & +P(X = 4) & +P(X = 5) & \cdots \\ & & & +P(X = 4) & +P(X = 5) & \cdots \\ & & & & +P(X = 5) & \cdots\end{matrix}.$$

This we can sum up row by row and therefore: $$E(X) = \sum_{n=0}^\infty P(X > n) = \sum_{n=0}^\infty p^n = \frac{1}{1-p}$$

Similarly, let $Y$ denote the number of male aliens found before finding the first female. Hence: $$E(Y) = \sum_{n=0}^\infty (1-p)^n = \frac{1}{p}$$

Now, we know that the probability that we start with a female alien is $p$, versus $1-p$ that we start with a male alien. So if $Z$ is the number of aliens found before finding both genders, then: $$E(Z) = p \cdot E(X) + (1-p) \cdot E(Y) = \frac{p}{1-p} + \frac{1-p}{p}$$ If you also want to include the last alien found you can just add $+1$.

For the variance I would use the same logic as Gabriel Romon suggested in his answer.