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

Home > Probability
Random log (Posted on 2018-02-04) Difficulty: 3 of 5
If r is a uniformly distributed random number between 0 and 1, what is the probability that floor(log2(1/r)) is odd?

  Submitted by Charlie    
No Rating
Solution: (Hide)

As exact powers of 2 in the denominator have zero probability we can ignore equality in these inequalities:

                                   log2
       r > 1/2 ;      1/r < 2      even
1/2  < r < 1/4 ;  2 < 1/r < 4      odd      span 1/4
1/4  < r < 1/8 ;  4 < 1/r < 8      even
1/8  < r < 1/16;  8 < 1/r < 16     odd      span 1/16
1/16 < r < 1/32; 16 < 1/r < 32     even
1/32 < r < 1/64; 32 < 1/r < 64     odd      span 1/64

        ...


p = 1/4 + 1/16 + 1/64 + ...

4p = 1 + p

3p = 1

p = 1/3, the desired probability

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Puzzle AnswerK Sengupta2022-04-22 04:38:38
SolutionSolution with generalizationJer2018-02-04 13:19:07
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