Probability Problem

Alex Martelli aleaxit at yahoo.com
Mon Apr 24 23:24:17 EDT 2006


Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> wrote:

> In article <mailman.4949.1145931967.27775.python-list at python.org>,
>  Elliot Temple <curi at curi.us> wrote:
> 
> >Problem: Randomly generate 10 integers from 0-100 inclusive, and sum
> >them. Do that twice. What is the probability the two sums are 390 apart?
> 
> I think the sum would come close to a normal distribution.

Yes, very close indeed, by the law of large numbers.

However, very close (in a math course at least) doesn't get the cigar.

You can compute the requested answer exactly with no random number
generation whatsoever: compute the probability of each result from 0 to
1000, then sum the probabilities of entries that are exactly 390 apart.


Alex



More information about the Python-list mailing list