What is inside is that when you make up a number, you need to use a "good" cumulative distribution. And there are plenty of them indeed to be found in any good probability theory book. In fact I named one. The standard normal, which is the prototypical bell-curve, is a probability function which will work. (Albeit with a tail that falls off very rapidly, so your win is miniscule if my numbers are very far away from zero.)
Trust me. I studied math long before I studied Perl, and I got this problem off of a well-known probability theorist. The solution is good.