Urns and balls
- From: "\"Luis A. Afonso\"" <licas_@xxxxxxxxxxx>
- Date: Tue, 11 Apr 2006 20:05:19 EDT
A number of elementary problems in Probability have (or could have) the equivalent model consisting in to draw balls randomly among urns (of unlimited capacity).
The enumeration of all the possible ways that the balls can be distributed is indeed a very hard job because we must not repeat nor omit any one of them.
Before mankind has mechanical devices to do it that enumeration that was only possible for not too many urns and balls. (there are n^r such cases and 4^4 = 256).
However a computer can perform the job easily.
___probability____occupancy numbers
____0.01235______004-040-400
____0.04938______013-031-103-130-301-310
____0.07407______022-202-220
____0.14815______112-121-211
____A *configuration* abc has the probability
____p(abc) = r! /(a!b!c!) * (1/ n^r )
____c = r – (a + b).
The probabilities were evaluated through this routine:
REM "4x3"
CLS
a = 3 * 2 * 1: b = 1 / (3 ^ 4)
f(0) = 1: f(1) = 1: f(2) = 2
f(3) = 6: f(4) = 24
PRINT " Four balls among 3 boxes "
FOR i1 = 0 TO 4
FOR i2 = 0 TO 4
FOR i3 = 0 TO 4
ii = i1 + i2 + i3
IF ii <> 4 THEN GOTO 100
PRINT USING "# # # "; i1; i2; i3;
d = f(i1) * f(i2) * f(i3)
f = f(4) / d * b: s = s + f
PRINT USING "#.##### "; f;
100 NEXT i3: NEXT i2: NEXT i1
PRINT " total probability = "; s
END
The number of favourable cases depends on the problem. For instance the probability that one have no two empty urns in sequence is
_____1 - 2*(0.01235) = 1 - 0.02470 = 0.9753
because there are only TWO favourable cases, each one with the probability 0.01235.
________licas (Luis A. Afonso)
.
- Prev by Date: Re: Less random than I thought.
- Next by Date: Re: Less random than I thought.
- Previous by thread: Re: Less random than I thought.
- Next by thread: Calculating the best transitional value in a bimodal distribution
- Index(es):
Relevant Pages
|