Discussion Problem (Expected Value and Variance)

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Discussion Problem (Expected Value and Variance)

Amit Goyal
Administrator
A miner is trapped in a room containing three doors. Door one leads to a tunnel that returns to the room after 4 days; door two leads to a tunnel that returns to the room after 7 days; door three leads to freedom after a 3-day journey. If the miner is at all times equally likely to chose any of the doors, find the expected value and the variance of the time it takes the miner to become free.
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

Mauli
hello sir:)
i am getting E(X) = 14 by using the law of total expectation .
but i tried to find the variance by using the law of total variance i was unable to get an answer.
as in ..that is how i did.
x= days to get free
y door 1,2,3
E(X) = E(X/Y=1) + E(X/Y=2) + E(X/Y=3)
          {4 +E(X) }* 1/3 +{ 7+E(X)}*1/3 + {3*1/3}
      ON SOLVING E(X)= 14
ii) for variance
v(x) = E(V(X/Y)) + V(E(X/Y)) .
HOW DO WE FIND THESE TWO TERMS?
PLEASE HELP SIR.
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

rohan
yeah E(X)=14

@mauli : how do u arrive at this: V(x) = E(V(X/Y)) + V(E(X/Y)) ???..i mean ye kaise aaya???
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

Amit Goyal
Administrator
Hi Rohan,

Here is the proof:
Let X and Y be random variables.
V(X) = E(X^2) - [E(X)]^2
       = E(E(X^2|Y)) - [E(E(X|Y))]^2
       = E(E(X^2|Y) - (E(X|Y))^2) +  E((E(X|Y))^2) - [E(E(X|Y))]^2
       = E(V(X|Y)) + V(E(X|Y))
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

TAANYA
Sir,
i got the answer as 14/3 for expected value and 26/9 for variance.
is that correct?
E(x)= summing x*p(x)
V(x)=summing (x^2)*p(x)-(E(x)^2)
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

rohan
In reply to this post by Amit Goyal
V(E(Y|X)) = 62
how to calculate E(V(Y|X))??..is it equal to (2/3)V(Y)??
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

Sinistral
This post was updated on .
In reply to this post by Mauli
Earlier I only studied the formula of law of total expectation and law of total variance but never got a chance to apply the latter. So I had to do a bit of reading to solve above ques.

the first part is done by Mauli. I also did the same way. I changed the notation from y to z just because the way mauli defined Y , (I constantly had that notation in mind ) kept on confusing me.

for the second part: ie the variance part

let choosing door 3,4,7 be events D3,D4,D7 respectively.

Let Z be the number of times the miner sees the room before he exits. so if he exits for the 1st  time Z=z=1. If 2nd time Z=z=2 and so on.
It is obvious that till (z-1) he chooses only D7 or D4. Suppose choosing D3 is success and choosing D4 or D7 is failure ==> Pr(Success)=1/3 & Pr(failure)=2/3. And obviously Z~Geometric Distribution (p=1/3)
ie f_Z(z)= (2/3)^(1-z)*(1/3) ; z=1,2,3...


Let X be the total no. of days the miner takes before he exits.
each time he comes to the room he takes (chooses) Xi days (by choosing a corresponding door) and he can choose either D3,D4 or D7. so Xi can take values of either 3 or 4 or 7 (days). ie X= X1+X2+..X_(z-1) + X_z  (as in the zth time miner choose D3 and exits)

also till (z-1)th time the miner doesn't choose D3 and in the zth turn he positively chooses D3

So the distribution of Xi|Z can be made as follows:

f_Xi|Z(xi|z) = 1/2  when xi=4,7 and i=1,2, ... z-1
                 = 1     when xi= 3  and i=z
note that zth is successful try.

Var[X]= Var[E(X|Z)] + E[Var(X|Z)]

E(X|Z) = E(X1+X2+..X_(z-1) + X_z   | Z=z)
          = E(X1|z) + E(X2|z) + ... E(X_(z-1)|z) + E(X_z|z)
also till (z-1)th time the miner doesn't choose D3 and in the zth turn he positively chooses D3, ie the first z-1 choices are similar (chooses either D4 or D7) and the  last choice (zth choice) is different. see f_Xi|Z(xi|z) above.
          = (z-1)E(X1|z) + E(X_z|z)
          = (z-1)( .5 *4 + .5*7) + 3*1
          = (z-1)*5.5 +3
          = 5.5z -2.5
Var[E(X|Z)] = 5.5^2*Var(Z)
                 = 30.25 * (2/3)/(1/3)^2   where Var(Z) is variance of a geometric distribution with p=1/3
                 = 181.5

To calculate  E[Var(X|Z)]
Var(X|Z) = Var(X1+X2+..X_(z-1) + X_z   | Z=z)
             = Var(X1|z) + Var(X2|z) + ... Var(X_(z-1)|z) + Var(X_z|z)   as all Xi's are independent
             = (z-1)Var(X1|z) + Var(X_z|z)   same argument as above i.e.till (z-1)th time the miner doesn't choose D3 and in the zth turn he positively chooses D3, ie the first z-1 choices are similar (choose either D4 or D7) and the  last choice (zth choice) is different. see f_Xi|Z(xi|z) above.

But Var(X1|z) = E(X1^2|z) - [E(X1|z)]^2
                    = (4^2 *.5 + 7^2 * .5 )  - ( .5 *4 + .5*7)^2
                    = 32.5 - 30.25
                    = 2.25
Var(X_z|z)      = E(X_z^2|z) - [E(X_z|z)]^2
                     = 9*1 -3^2 = 0
putting Var(X1|z) & Var(X_z|z) in the original equation of Var(X|Z)
Var(X|Z) = (z-1)2.25
              =2.25z - 2.25
E[Var(X|Z)] = E[2.25z - 2.25]
                 =2.25E(Z) -2.25   E(Z)= mean of that geometric distribution with p=1/3 ie mu=1/p=3
                  =2.25*3 -2.25
                   4.5

So Var[X]= Var[E(X|Z)] + E[Var(X|Z)]
             = 181.5 + 4.5
             = 186


---
 "You don't have to believe in God, but you should believe in The Book." -Paul Erdős
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

Amit Goyal
Administrator
Let T be the time taken by the miner to become free. We want to find
E(T).
Let X be the door that the miner takes initially.
E(T) = E(E(T|X))
       = (1/3)E(T |X = 1) + (1/3)E(T |X = 2) + (1/3)E(T |X = 3)
       = (1/3)(4 + E(T)) + (1/3)(7 + E(T)) + (1/3)(3)
Thus, E(T) = 14
To find Variance of T, we will use
V(T) = V(E(T|X)) + E(V(T|X))
V(E(T|X)) = (1/3)(16) + (1/3)(49) + (1/3) (121) = 62
E(V(T|X)) = (1/3)V(T) + (1/3)V(T) + (1/3)(0)
So, V(T) = 62 + (2/3)V(T)
Thus, V(T) = 186
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

Sinistral
I seriously need to learn how to calculate Var(T) in such a simple way without getting confused in between.
So sir if you could please clear the following doubts for me.

Doubt 1:
Amit Goyal wrote
V(T) = V(E(T|X)) + E(V(T|X))
V(E(T|X)) = (1/3)(16) + (1/3)(49) + (1/3) (121) = 62
V(E(T|X)) = E[  [E(T|X)]^2]   - [  E[E(T|X)]  ]^2
              = E[  [E(T|X)]^2]   -     [   E[T]   ]^2


If the above equation is right Please correlate the above equation with your equation.

Doubt 2:
Amit Goyal wrote
V(T) = V(E(T|X)) + E(V(T|X))

E(V(T|X)) = (1/3)V(T) + (1/3)V(T) + (1/3)(0)
If you could please add one more step as to how do we write E(V(T|X)) in the above way.
---
 "You don't have to believe in God, but you should believe in The Book." -Paul Erdős
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

Amit Goyal
Administrator
Doubt 1:

V(E(T|X)) = E[  [E(T|X)]^2]   - [  E[E(T|X)]  ]^2
              = E[  [E(T|X)]^2]   -     [   E[T]   ]^2
             
[   E[T]   ]^2 =  14^2 = 196

E[  [E(T|X)]^2] = (1/3) [E(T|X=1)]^2 + (1/3) [E(T|X=2)]^2 + (1/3) [E(T|X=3)]^2
                      = (1/3) [E(T) + 4]^2 + (1/3) [E(T) + 7]^2 + (1/3) [3]^2
                      = [(1/3) x 18 x 18] + [(1/3) x 21 x 21] + [(1/3) x 3 x 3]
                      = 108 + 147 + 3
                      = 258

Thus,
V(E(T|X)) = 258 - 196 = 62


Doubt 2:

E(V(T|X)) = (1/3)V(T|X=1) + (1/3)V(T|X=2) + (1/3)V(T|X=3)
              = (1/3)V(T) + (1/3)V(T) + (1/3)(0)  [Think why is this true]
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

Sinistral
thanx a lot.

wrt doubt 1: I was wondering how u calculated V(E(T|X)) = (1/3)(16) + (1/3)(49) + (1/3) (121) = 62 in 1 line.
I think I got this now. U were squaring the difference between the mean and the random variable in 1 go.

wrt doubt 2:
V(T|X=1) = var(T) because of recursion. ??
If he chooses the right door Var(T) will be zero because now there is no variation as he chose the correct door. Is this so? Intuitively this is fine but mathematically I am not able to digest this.

---
 "You don't have to believe in God, but you should believe in The Book." -Paul Erdős
Reply | Threaded
Open this post in threaded view
|

Re: Discussion Problem (Expected Value and Variance)

Sinistral
I am still not able to get the hang of this. Everytime I get stuck I turn towards making conditional pdfs.
For eg have a look at this. Please tell me if what I have solved is correct. In any case please do this  in a simpler way.
---
 "You don't have to believe in God, but you should believe in The Book." -Paul Erdős