Probability that the (rounded up or down) ratio of two random chosen numbers between 0 and 1 is ODD.

I thought i'd do a simple calculation to calculate that the probability of two random chosen numbers between 0 and 1 is 50%. At least I expect it to be 50%.

However, I keep getting that the probability is 53%, which does not seem correct to me.

I used the following method: x and y are the random chosen numbers. I made a graph with possible outcomes, with the y-axis being all the possible values for y and the x-axis all the possible outcomes for x. I wanted to graphically represent all the combinations that would yield an odd ratio:

  • x/y (ratio) could be 1, when rounded up or down. Then 0.5 <= x/y < 1.5. This means the borders of this area are between y=2x and y=2/3x.
  • x/y could be 3. Same reasoning, this are falls between y=2/5x and y=2/7x.

This keeps going so I made a small program to calculate the area for the next 1000 intervals. When adding this all up, I get to 53%.

Any explanation as to where I made my mistake? Thanks a lot. I apologise in advance for any mistakes on this post as it is my first one :-)

The pink highlighted area is the area where the ratio of the numbers is odd


Looking at the image, you might notice that the triangles below the line $y=x$ are each smaller than the previous, and the larger of every two is shaded. It is therefore evident that the total shaded area is greater than the non-shaded area.

The area of the shaded region is $$\frac{3}{4}-\frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\frac{1}{9}-\frac{1}{11}+\frac{1}{13}-\frac{1}{15}\cdots$$ This converges to the value given in the comments: $$=\frac{\pi-1}4\approx0.5354$$