What is the probability that $\lfloor X/Y \rfloor$ is odd, where $X,Y \sim U(0,1)$?

57 Views Asked by At

What is the probability that $\lfloor X/Y \rfloor$ is odd, where $X,Y \sim U(0,1)$?

I was asked this question many years ago in a Putnam training class and I've shared my own solution (open to feedback!), but I'm also curious about any other solutions others may have.

1

There are 1 best solutions below

1
On

Let $Z = \lfloor X/Y \rfloor$. We can think of $X$ and $Y$ as points in the unit square $[0,1]\times [0,1]$. We first compute

  • $\mathbb{P}(Z = 1)$: This is equivalent to $P(Y\le X < 2Y)$, which is the area of the triangular region $Y\le X < 2Y$ in the unit square $[0,1] \times [0,1]$, which is $\frac{1}{4}$.
  • $\mathbb{P}(Z = 3)$: This is equivalent to $P(3Y\le X < 4Y)$, which is the area of the triangular region $Y\le X < 2Y$ in the unit square $[0,1] \times [0,1]$, which is $\frac{1}{24}$.

enter image description here

In general, $\mathbb{P}(Z = n)$ is equivalent to $P(nY\le X < (n+1)Y)$, which is $\frac{1}{2} \left(\frac{1}{n} - \frac{1}{n+1}\right)$. Therefore $$\mathbb{P}(Z \text{ is odd}) = \sum_{\text{odd }n} \mathbb{P}(Z = n) = \frac{1}{2} \sum_{\text{odd }n} \frac{1}{n} - \frac{1}{n+1} = \frac{1}{2} \left(1 - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} +\frac{1}{5} - \frac{1}{6}+ \dots \right).$$ We can use the Taylor series for $\log(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \dots$ to see that the answer is $\log{2}/2$.