@nick_baba said:One of the data ninjas at a reputed analyst firm goes to make coffee for herself and two colleagues. The company has two Italian coffee machines, each capable of making 5 coffees before a refill is required. The first machine she tries is empty. If it is early in the morning, and people randomly choose which coffee machine to use, what is the probability that the second machine will have enough coffee to fulfill her order? You can assume that if both machines are empty, they get refilled immediately. Your answer needs to be a simplified fraction.@anytomdickandhary@naga25french@deedeedudu@krum@vijay_chandola@Zedai @scrabbler @techsurge @chillfactor @Brooklyn @sujamait @soumitrabengeri @rkshtsurana @Estallar12 @ScareCrow28 P.S : As and always requested, ek pyara sa detailed logic, coz i won't be able to provide an OA for this.
Ok here goes my logic.
(This is a fairly long post, but this is one of the very good questions that gives a good idea of conditional probability, hence have taken the liberty to write the detailed gyan for some who might be interested. Others can directly refer to the solution section)
Since it is known that if both the machines are empty then it gets refilled. So when we see that a given machine is empty it means that other must have at least 1 refill left, as in no case both the machines are ever empty.
Since one of the machines is empty => no. of people who have already come before is 5 or 6 or 7 or 8 or 9 and each of these numbers have equal probability of 1/5 each.
Now, If there are 3 or more refills left in other machine then we can definitely fill our order. Now, there are 5 possibilities for the other machine,it has either 5 refills, 4 refills, 3 refills, 2 refills or 1 refills. So to us it appears that in three out of five case we can get the refill hence we tend to get (3/5) as answer
Now a key point to realize here (which I think many of us tend to miss) is that it is given that people come randomly. So if we ask to ourselves that, say both the coffee machines are full and 5 people came one by one and randomly take coffee from any of the machines. So which one do you think is more probable. All five taking coffee from same machine, or any two of them take from first machine and other three take from the second machine?
Read the below para only if you could not get the point in previous paragraph
If it is still not clear then let us magnify the situation 100 times. Say each machine has 500 fills . and 500 people come one after the other and randomly chose one of the coffee machines and take a fill. Now do you think that all 500 refills from only one of the machines is equally likely as 200 from one machine and 300 from the other? So this means that probability of lots of people taking coffee and that too from same machine is not same as when they are evenly distributed.
So under the light of given information in the question that one of the machines is empty (i.e lots of people have taken from machine) we need to recalculate the probabilities of each of the 5 cases.
Back to the solution
So we go case by case. (say we name the machines p and q, and after checking p is the machine which was found to be empty)
case1: there are 5 refills left in machine q. This means that there were five people who have already come earlier and they all took coffee from p. Now probability of 5 people having come = (1/5).
notice that (p+q)^5 gives all the possible ways that 5 people could have used the coffee machine. Out of which we are interested in case of p^5 (i.e. all the people took coffee from machine p) co-efficient of p^5 is C(5,0) = 1
hence p(5) = (1/5)*C(5,0)/2^5 = (1/5)*(1/32)
case2: 4 re-fills left. i.e 6 people have taken coffee i.e we are interest in co-efficient of p^5*q in (p+q)^6 = (1/5)*C(6,1)
hence p(4) = (1/5)*C(6,1)/2^5
similarly
case3: 3 re-fills left p(3)= (1/5)*C(7,2)/2^5
case4: 2 refills left p(2)= (1/5)*C(8,3)/2^5
case5: 1 refill left = p(1) = (1/5)*C(9,4)/2^5
but only case1, case 2 and case3 are favorable.
So required probability = {p(5)+p(4)+p(3)}/{p(1)+p(2)....p(5) = 1/12
I hope this is correct!
ATDH.