1 1 vote A man with n keys wants to open a lock. He tries his keys at random. The expected number of attempts for his success is (keys are replaced after every attempt) a) n/2 b) n c) √ n d) None of the above Probability isro-ece engineering-mathematics expectation + – sh!va 4.1k views answer comment Share Follow Print See all 21 Comments 21 21 Comments reply Rahul Jain25 commented Mar 1, 2017 reply Follow flag I took small example of four key and my approach is 1(1/4) + 2( 3/4 ×1/3)+3(3/4 × 2/3 × 1/2) + 4 (3/4 × 2/3 ×1/2 × 1) = 1/4 ( 1+2+3+4)= 4×5/(4×2) = 5/2 So I think answer should be (n+1)/2 and so none of these. 0 0 replyShare Akriti sood commented Mar 1, 2017 reply Follow flag what i think is - for one attempt ,probability is 1/n for second attempt,probablity is (1-1/n) * 1/n for third attempt prob is (1-1/n)2 * 1/n and so on.. so,expectation is E[x] = 1* 1/n + 2 ( (1-1/n) * 1/n) + 3* (1-1/n)2 * 1/n +.... multiplying by (1-1/n) = 1/n [ (1-1/n) + 2 * (1-1/n)2 + 3* (1-1/n)3 + ...] subtracting above two we get ,E[x] - (1-1/n) E[x] = 1/n * (1/1-(1-1/n)) 1/n E[x] =1 so,E[X] =n 1 1 replyShare Rahul Jain25 commented Mar 1, 2017 reply Follow flag Expectation can be thought as mean or average. So supoose you have n keys then I dont think on average we need n trials. On average answer will be (n+1)/2. Also try 4 keys example and accordingly I think n+1/2 should be answer. 0 0 replyShare Akriti sood commented Mar 1, 2017 reply Follow flag @rahul,it is given that keys are replaced after every attempt,so why are u taking probabilitie as relative. as you are showing that for second attempt,first attempt fauilure is 3/4 but how success for second attempt is 1/3??as after fauilure of first key,it will be replaced in the lot.,so it should be 1/4 only correct me if i am wrong pls 0 0 replyShare Rahul Jain25 commented Mar 1, 2017 reply Follow flag Also keys are replaced affter attempts. So (1-1/n) and then 1/n is inappropriate 0 0 replyShare Rahul Jain25 commented Mar 1, 2017 reply Follow flag Lets say i have A,B,C,D and C is my key to open lock. Now for succes on two attempts I can select A,B,D hence 3/4 after that attempt I have only 3 keys remaining and for succes on two attempts in this attempt I have to select C which gives 1/3. 0 0 replyShare Akriti sood commented Mar 1, 2017 reply Follow flag as keys are always replaced ,so sample space will always be n..is'nt it so?? if it would have been without replacement then only,sample space starts decreasing by 1 0 0 replyShare Rahul Jain25 commented Mar 1, 2017 reply Follow flag Okay I got what you intend to say. But I think "replace" should not be used here otherwise it is possible that we go to infinte series and we may never get success. 0 0 replyShare Akriti sood commented Mar 1, 2017 reply Follow flag for your A.B.C.D example... in first attempt,you can choose btw A,B AND D,hence 3/4.suppose ,you choose A.it is given in question that key is replaced,hence again,A will be added to the set of keys and now,from A,B,C,D ,we will choose C,so prob of success at second attempt is 1/4 0 0 replyShare Akriti sood commented Mar 1, 2017 reply Follow flag yes..i am only gng by question's statement 0 0 replyShare Rahul Jain25 commented Mar 1, 2017 reply Follow flag Okay actually i have misinterpreted the question. You are correct. B is the correct answer I also verified it and question is also correct. 0 0 replyShare Rahul Jain25 commented Mar 1, 2017 reply Follow flag We can also use arithmetico geometric series formula for easy evaluation. 0 0 replyShare Akriti sood commented Mar 1, 2017 reply Follow flag thanks for confirming :) 0 0 replyShare Akriti sood commented Mar 1, 2017 reply Follow flag i dun know any such formula..nt good at these formulas..again if u have a good link then pls share :P 0 0 replyShare Rahul Jain25 commented Mar 1, 2017 reply Follow flag It is good if you can solve without formula so that exam time you don't need to mug them up.☺ This formula is quite handy https://en.m.wikipedia.org/wiki/Arithmetico-geometric_sequence 0 0 replyShare Kaluti commented Mar 1, 2017 reply Follow flag Answer is n only 0 0 replyShare sushmita commented Mar 3, 2017 reply Follow flag by arithmetico geometric series answer is coming n and i think we can directly use geometric distribution with probablity p=1/n and hence number of attempts= 1/p=n. 0 0 replyShare Rahul Jain25 commented Mar 3, 2017 reply Follow flag @sushmita how to identify it there is geometric distibution??? 0 0 replyShare sushmita commented Mar 3, 2017 reply Follow flag here we are asked number of trials and whenever no of trails are asked it is geometric distribution. 0 0 replyShare Rahul Jain25 commented Mar 3, 2017 reply Follow flag Thanks @sushmita. https://en.wikipedia.org/wiki/Geometric_distribution?wprov=sfla1 0 0 replyShare Akriti sood commented Mar 3, 2017 reply Follow flag @sushmita,is it true in every case?? 0 0 replyShare Please log in or register to add a comment.