All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Random +, - or / Random (Posted on 2009-08-24) Difficulty: 3 of 5
Let A and B each be random real numbers chosen from the uniform interval (0,1).

Call X the first nonzero digit of A+B.
Call Y the first nonzero digit of A-B.
Call Z the first nonzero digit of A/B.

Find the probability distribution of each random variable.

See The Solution Submitted by Jer    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Division solution Comment 2 of 2 |

Division (/):

The two triangles making up the unit square, separated by the line A=B, must be treated separately.

Consider first the easier: A<B:

The triangle between A = B and A = 0.9 B has the same area as the triangle between A = 0.9 B and A = 0.8 B, as in either case the base is 0.1 and the height is 1. The same is true for each of the fractions 0.8 to 0.7, etc. Likewise, when we get down to 0.1 to 0.09, being equal to the triangle between 0.09 and 0.08 and between 0.08 and 0.07, etc.  Within each set of leading zero length, the digits themselves share equal areas. So whenever A < B, each digit has equal likelihood, contributing an overall probability of (1/9)*(1/2) = 1/18 to each of the nine digits.

The other half of the cases, when A > B, have unequal triangles. The height is always 1, but the base varies. From A = B to A = 2*B, assigned to the digit 1, takes up fully half of triangle above A = B, and so 1/4 of the whole square. From A = 2*B to A = 3*B is only 1/6 of the 1/2 square and thus contributes only 1/12 to the overall probability for its assigned digit, 2. The 1/6 comes from 2/3 - 1/2.


1    1/2 * 1/2           1/4
2    (2/3 - 1/2) * 1/2   1/12
3    (3/4 - 2/3) * 1/2   1/24
4    (4/5 - 3/4) * 1/2   1/40
5    (5/6 - 4/5) * 1/2   1/60
6    (6/7 - 5/6) * 1/2   1/84
7    (7/8 - 6/7) * 1/2   1/112
8    (8/9 - 7/8) * 1/2   1/144
9    (9/10 - 8/9) * 1/2  1/180

But the next set for the same digits would not seem to be in proportion to these (but see below, in actuality):

My original thought was that the numeric sequence continued for the second set, such as 1 accounting for (10/11 - 9/10) / 2 = 1/220, with the second set (for 2) accounting for (11/12 - 10/11) / 2 = 1/264, etc. These probabilities added up to 1, as expected, but the prediction for the digit 1 was about 0.314, taking into consideration the additional 1/18 from the other half of the square, while simulation insisted on 0.333 as the probability of beginning with a 1 (see below).

Then I realized that the next 10 items on the list all applied to the digit 1, not just the next one, as the next ten were for 10, 11, ..., 19, all beginning with the digit 1.

So the table continues:

10-19 (19/20 - 9/10) * 1/2    1/40
20-29 (29/30 - 19/20) * 1/2   1/120
...
100-199  (199/200 - 99/100) * 1/2    1/400
200-299  (299/300 - 199/200) * 1/2   1/1200
...

So it does indeed seem that each digit has a geometric series with ratio 1/10, so the numbers in the first table need only be multiplied by 10/9. For the digit 1, for example, 1/4 * 10/9 = 10/36 = 5/18, to which 1/18 is added from the other half of the square, making a total of 3/18 = 1/3, in agreement with the simulation.

The formula, then, for a given digit d is

10(d/(d+1) - (d-1)/d)/18 + 1/18

and is tabulated as

1  1/3         0.3333333333333333333
2  4/27        0.1481481481481481481
3  11/108      0.1018518518518518518
4  1/12        0.0833333333333333333
5  2/27        0.074074074074074074
6  13/189      0.068783068783068783
7  11/168      0.0654761904761904761
8  41/648      0.0632716049382716048
9  5/81        0.061728395061728395

Simulation verification:

188534  84231  57470  47003  42277  38795  36750  35554  34930
565544 trials
0.33337 0.14894 0.10162 0.08311 0.07475 0.06860 0.06498 0.06287 0.06176

  Posted by Charlie on 2009-08-24 19:16:12
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (11)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information