Expectation to draw a random variable based upon another random variable

64 Views Asked by At

Any help on following question will be much appreciated:

Mr A selects a number X randomly from the uniform distribution on [0,1]. Then Mr B repeatedly and independently draws numbers Y1,Y2 ..... from the uniform distribution on [0,1], until he gets a number larger than X/2, then stops. The expected number of draws that B makes

Answer: 2 ln2

I tried using iterated expectation but could not proceed successfully.Can some one please explain it to me.

2

There are 2 best solutions below

2
On BEST ANSWER

If $X=x$, the probability B has a "success" on any trial (gets a result greater than $x/2$) is $1-x/2$.

Thus the distribution of the number of trials, given $X=x$, is geometric with parameter $p=1-x/2$. The mean of a geometrically distributed random variable with parameter $p$ is $\frac{1}{p}$.

So the conditional expectation of the number of trials, given $X=x$, is $\frac{1}{1-x/2}$. tt follows that the expected number of trials is $$\int_0^1 \frac{1}{1-x/2}\,dx.$$ An antiderivative is $-2\ln(2-x)$, so the definite integral is $2\ln 2$.

1
On

Let $N$ be the no. of trials required to get a value greater than $X/2$, $N\geq1$. Then $$P(N=n|X=x)=P(Y_1<\dfrac{x}{2},Y_2<\dfrac{x}{2},...,Y_{n-1}<\dfrac{x}{2},Y_n>\dfrac{x}{2})=(1-\dfrac{x}{2})\dfrac{x^n}{2^n}=\dfrac{x^n}{2^n}-\dfrac{x^{n+1}}{2^{n+1}}$$.

Hence, $$P(N=n)=\int_0^1P(N=n|X=x)f_X(x)dx=\int_0^1(\dfrac{x^n}{2^n}-\dfrac{x^{n+1}}{2^{n+1}})dx=\dfrac{1}{(n+1)2^n}-\dfrac{1}{(n+2)2^{n+1}}$$

So $$E(N)=\sum_{n=1}^\infty\dfrac{n}{(n+1)2^n}-\sum_{n=1}^\infty\dfrac{n}{(n+2)2^{n+1}}$$

Note that $$\sum_{n=1}^\infty\dfrac{n}{(n+1)2^n}=\sum_{n=1}^\infty\dfrac{1}{2^n}-\sum_{n=1}^\infty\dfrac{1}{(n+1)2^n}=1+2(-\log(2)+\dfrac{1}{2})=2-2\log2$$

Similarly $$\sum_{n=1}^\infty\dfrac{n}{(n+2)2^{n+1}}=\sum_{n=1}^\infty\dfrac{1}{2^{n+1}}-\sum_{n=1}^\infty\dfrac{1}{(n+2)2^n}=\dfrac{1}{2}+4(-\log2+\dfrac{1}{2}+\dfrac{1}{8})=3-4\log2$$

So $E(N)=2\log2-1$, essentially same as your answer but with an extra $-1$. So maybe I did some calculation error or supposedly made a mistake in specifying the domain of $N$.. But this is the method. Feel free to point out if you feel I've done some tiny error.