Probability Problem: Boxes & Balls - Calculate Probability

  • Thread starter Thread starter natugnaro
  • Start date Start date
  • Tags Tags
    Probability
natugnaro
Messages
61
Reaction score
1

Homework Statement


Given M boxes as well as N similar (distinguishable) balls. Each single
ball is assigned to box i with probability pi, where i = 1...M. All N balls are distributed
independently among the M boxes, where as many as desired balls fit into each box. How large is the probability that the i-th box contains ni balls?

The Attempt at a Solution


My answer is (pi)^N,
I think of this problem as some analogy to throwing a dice with M faces N times, where each
face has a probability of pi to show up.
But I'm not shure if this analogy is or my answer is good.
 
Physics news on Phys.org
Could you use either the latex typesetting system, or at least click those buttons above the box for superscripts and subscripts? It's not so easy to parse your meaning. I assume you mean pi. But what is ni? Is it some undefined ni, or a typo for "no" or what?
 
you want to get to a pdf & must consider all the events

given M boxes, N balls the ith box has a probability of the ith box having n balls is:
P(Bi = n)

if you ask what the probabilty of getting all N balls in the ith box is, then
P(Bi=N) = pi^N

which aligns with what you have, however now consider getting one (and only one) ball in the ith box

first the probabilty is the first ball is pi, but then every other ball after must go in a different box, which has probabilty (1-pi)^(N-1)

so the probabilty of getting only the first ball is:
pi(1-pi)^(N-1)

but then you must consider all the cases when it is the 1st ball, 2nd ball, etc. or n seprate cases

so the probabilty of one ball in the ith box is:
P(Bi=1) = N pi (1-pi)^(N-1)
 
sorry for superscripts/subscripts, yes I meant pi and ni, I have just copy/pasted the problem. Anyway I think that lanedance understood the problem.

then for two balls in the ith box (other balls elsewhere but not in ith box):
P(Bi=2)=N pi^2 (1-pi)^(N-2)

for three balls in the ith box:
P(Bi=3)=N pi^3 (1-pi)^(N-3)

etc...
so for n balls in the ith box:
P(Bi=n)=N Pi^n (1-pi)^(N-n)

is this ok ?
 
natugnaro said:
then for two balls in the ith box (other balls elsewhere but not in ith box):
P(Bi=2)=N pi^2 (1-pi)^(N-2)

not quite, the probabilty for getting only the balls k & m (k,m<=N), in Ui (the ith urn) is:
pi^2 (1-pi)^(N-2)

but remember you need to choose k & m from N potential values...
 
Last edited:
I can choose two balls from N in (\stackrel{N}{2}) = N!/(2!(N-2)!) ways, so for
two balls it would be :
P(Bi=2)= N!/(2!(N-2)!) pi^2 (1-pi)^(N-2) ?
 
Yeah that looks better and should generalize to the n case well
 
then the generalization to n cases wolud be:
P(Bi=n)= N!/(ni!(N-ni)!) pi^ni (1-pi)^(N-ni) ?
 
Looking good, now you want to check they all sum to one

Consider expanding the following
((1-pi)+pi)^N
 
  • #10
lanedance said:
Looking good, now you want to check they all sum to one

Consider expanding the following
((1-pi)+pi)^N

I could expand it by a binomial theorem but I would always arrive at ((1-pi)+pi)^N=1 for any N, why is this expansion important ?
 
  • #11
natugnaro said:
I could expand it by a binomial theorem but I would always arrive at ((1-pi)+pi)^N=1 for any N, why is this expansion important ?

compare the terms in the expansion with the terms for p(n)... should give you a nice feeling that everything adds up to one ;)
 
Last edited:
  • #12
I still don't get it, let's say that N=2, then :
((1-pi)+pi)^N = ((1-pi)+pi)^2 =(1-pi)^2+2pi(1-pi)+pi^2=1

and for N=2 general expression becomes :
P(Bi=n)= 2!/(ni!(2-ni)!) pi^ni (1-pi)^(2-ni)

what sholud I compare here and find out that it sums up to 1 ?
 
  • #13
so for N=2, throwing 2 balls into the urns

((1-pi)+pi)^2 =(1-pi)^2+2pi(1-pi)+pi^2

Probability of getting n balls in the ith urn
p(n=0) = (1-pi)^2
p(n=1) = 2pi(1-pi)
p(n=2) = pi^2

obviously the probability of getting gretear than 2 balls is zero so this set is exhaustive and must sum to one
 
  • #14
I get it now.
Thanks for your answers !
 
Back
Top