Jump to content
BrainDen.com - Brain Teasers
  • 0

Random number probability


BMAD
 Share

Question

Get two random numbers between 0 and 1. Subtract the smaller from the bigger. What is the probability that the result is <0.3? Is it bigger than the probability it is > or equal to 0.3?
For what number the probability for both cases is the same?
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Consider placing one point N in the range from 0 to 1, and then placing a second point M in the range from 0 to 1.

If N is in the range from 0.3 to 0.7, then there will be a total area of 0.6 around N in which M could be placed to be within 0.3 units of N.

Probability (N is within 0.3 to 0.7) and (M is within 0.3 units of N, given that N is within 0.3 to 0.7)

= 4/10 x 6/10 = 24/100

If N is in the range from 0 to 0.3, or 0.7 to 1.0, then some of the area within 0.3 units of N will be outside of the 0-1 range and inaccessible to M. At either extreme (at 0 or at 1.0), there would be 0.3 units in which M could fall that are within 0.3 units of N. That accessible area within 0.3 units of N increases linearly from 0.3 to 0.6 as N moves from 0 to 0.3 (or as N moves from 1.0 to 0.7). If N is within 0 to 0.3 or 0.7 to 1.0, then on average, M would have 0.45 units of area that would put it within 0.3 units of N.

Probability (N is within either 0 to 0.3 or 0.7 to 1) and (M is within 0.3 units of N)

= 6/10 x 4.5/10 = 27/100

The sum of those two is 51/100. So slightly higher than 50/50 odds that M is within 0.3 units of N.

Now to find the distance D for which the odds are 50/50. Those equations would become:

Probability (N is not within D of 0 or 1) and (M is within D of N)

= (1 - 2D) x 2D

= 2D - 4D2

Probability (N is within D of 0 or 1) and (M is within D of N)

= 2D x 1.5D

= 3D2

The sum of those two is

2D - D2

Confirming this works with the previous answer, 2 x 0.3 - 0.32 = 0.51

Solving for a 50/50 chance:

2D - D2 = 0.5

D2 - 2D + 0.5 = 0

Using the quadratic formula

D = [2 +/- sqrt(4 - 4x1x0.5)] / 2

= [2 +/- sqrt(2)] / 2

The + solution would produce a number greater than one which would not be meaningful for this problem, so the - solution is the only one that makes sense

D = [2 - sqrt(2)] / 2 = 1 - sqrt(2)/2

roughly 0.29289

Edited by plasmid
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...