Re: Chances of (random(0,n) + random(0,n) <= m)

From: Stan Brown (the_stan_brown_at_fastmail.fm)
Date: 11/03/04


Date: Wed, 3 Nov 2004 16:46:54 -0500


"Brendan Sechter" <sgeos@granicus.if.org> wrote in sci.math:
>If I am going pick two numbers at random, both from zero to n and add
>them, what is the chance of the sum being less than or equal to m?

What do you mean, "at random"? If you mean every number from 0 to n
has an equal chance of being picked, then the most likely value for
the sum of two such picks is n, with probability diminishing on both
sides to the least likely choices, 0 and 2n.

You can get some insight into this by working out the probabilities
for the sum of two dice. The individual dice are each 1-6 in equal
probabilities, but for the sum 7 is the most likely number and 2 and
12 are least likely. (It's n+1 and 2 and 2n, not n and 0 and 2n,
because dice go from 1 to n not 0 to n as in your question.)

-- 
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
                                  http://OakRoadSystems.com/
"And if you're afraid of butter, which many people are nowa-
days, (long pause) you just put in cream."     --Julia Child