In: Statistics and Probability
. I have n keys, exactly one of which opens the door. I try them one by one at random independently, removing the key from the fob and setting it aside if it doesn’t work. Let X be the number of keys I try until I open the door. Find E(X).
A. (n−1)/2
B. (n + 1)/2
C. n/2
D. n + 1/2
discrete random variable X = no. of keys I try until I open the door
so X can have values from 1 to n
I set aside a key if it is the wrong one .
P(X=1) = probability that we get the correct key in first try =
P(X=2) = Probability that we get the correct key in second try =
= Probability that we got wrong key in first try * Probability that we got correct key in next try
P(X=2) =
Similarly we get P(X=3) =
Similarly we get all the P(X=x) =
E(X) = Expected value of the random variable X
It is given by :
So ,
Sum of first n natural numbers is given by Sn
we have ,
Option B is correct