1. ## Probability question

I recently stumbled up on this question.
Need help in solving this.
N balls thrown at N baskets, what is the chance that a random basket will have at least one ball in it when all baskets have equal chance 1/N?

2. ## Re: Probability question

Try to solve the problem for a specific N and then generalize to the general case. Set N to 2 and solve. Then try 3. And by that moment you should be able to figure out a general equation.

3. ## Re: Probability question

prob(basket has >0 balls) = 1-prob(basket has 0 balls) = 1 - N^(N-1)/N^N = 1 - 1/N = (N-1)/N
Is this correct?

4. ## Re: Probability question

m is the number of empty baskets.

5. ## The Following User Says Thank You to Englund For This Useful Post:

sunragav (04-29-2016)

6. ## Re: Probability question

I tried solving the problem by hand.
With an understanding that the problem statement is
"N balls thrown at N buckets. What is the probability that a random bucket will have atleast one ball when all the buckets have equal chance".
I assumed there is always a ball that falls in to any basket each time the ball is thrown and there is no miss.

I solved it for 2 ,3 and 4 balls by hand and found the following pattern 2/3,6/10,20/35 => i.e., 2/3 , 3/5 , 4/7.

So I arrived at the formula N/(2N-1) where N=no.of balls = no. of buckets.

To confirm this I wrote an algorithm in javascript which I have attached.

Correct?

7. ## Re: Probability question

I don't think that's correct. My reasoning is as follows:

The above formula is the same as I posted before.

8. ## The Following User Says Thank You to Englund For This Useful Post:

sunragav (04-29-2016)

9. ## Re: Probability question

Originally Posted by Englund
I don't think that's correct. My reasoning is as follows:

The above formula is the same as I posted before.
The logic behind my solution is that
by definition, probability = (No. of favorable events/Total no. of events)

So when we take 2 balls 2 baskets scenario
Total no of events are (1,1)(2,0)(0,2)=> each set has to be seen as (No. of balls in basket1, no.of balls in basket2).
so for basekt 1 ,when we eleminate (0,2) from the above events as there should be atleast 1 ball , the probability that there is atleast one ball there is 2/3.

In the sameway, for 3 baskets 3 balls scenario
Total events : (0,0,3),(0,1,2),(0,2,1),(0,3,0),(1,1,1),(1,0,2),(1,2,0),(2,1,0),(2,0,1),(3,0,0)
So total no. of events = 10
So the events that basket 1 will have atleast one ball are (1,1,1),(1,0,2),(1,2,0),(2,1,0),(2,0,1),(3,0,0)
Total of events favorable for basket 1 is 6.
So the probability for basket1 to have atleast one ball in it is 6/10 = 3/5

so far p(2), p(3) === 2/3, 3/5 ...
This forms a series of N/(2N-1)

Am I doing anything wrong?

I will give more thought on your answer as I have forgot my high school maths now. Sorry that I am week in understanding your solution. It takes some time to sync in that concept. I will come back to you after some time.

11. ## Re: Probability question

Originally Posted by sunragav
So for an instance , in 3 balls 3 baskets scenario, when I apply your formula, I get,
p(m=0)*3/3 = p(m=0) = 1/10
p(m=1)*2/3 = p(m=1)*2/3 = 6/10*(2/3)
p(m=2)*1/3 = p(m=2)*1/3 = 3/10*(1/3)
p(m=3)*0/3 = p(m=3)*0 = 0

So the ans is (1/10)+(6/10)*(2/3)+(3/10)*(1/3) = (1/10)+(12/30)+(3/30) = 1/10*(1+(12/3)+(3/3)) =1/10*(1+4+1)=6/10 = 3/5
which is the same as what I got with my approach.

Please correct me if I am wrong.

12. ## Re: Probability question

I get (3!/3^3)*1+(3*3*2/3^3)*(2/3)+(3*1*1/3^3)(1/3) = 19/27 with N=3.

13. ## The Following User Says Thank You to Englund For This Useful Post:

sunragav (04-29-2016)

14. ## Re: Probability question

I dont really get that right. Can you explain how p(m=0) is (3!/3^3) and so on.

15. ## Re: Probability question

First of all according to me, the total no of possible outcomes is 10. But 3^3 is 27. Its confusing. Can you please point me to some right guide or course where I can learn the high school probability better?

16. ## Re: Probability question

Originally Posted by sunragav
First of all according to me, the total no of possible outcomes is 10. But 3^3 is 27. Its confusing. Can you please point me to some right guide or course where I can learn the high school probability better?
Is it because 3 balls can be arranged in 3 buckets in 3^3 different ways?

17. ## Re: Probability question

Originally Posted by sunragav
Is it because 3 balls can be arranged in 3 buckets in 3^3 different ways?
Exactly

18. ## Re: Probability question

Originally Posted by Englund
Exactly
But does it matter when the balls are identical. Arent we supposed to eliminate those duplicate cases. For an instance , when we ignore how many ever different ways a set of (1,1,1 ) can happen, we ihave only one such event to consider. Probabilty science does not allow that?