What is the probability that $\lfloor Z\rfloor$ is odd?

72 Views Asked by At

There are two IID standard uniform random variable ${X_1},{X_2}$. assume $Z = \frac{X_1}{X_2}$ ,what is the probability that $\lfloor Z\rfloor$ (floor function) is odd?

my solution is as follow:

${p_Z}(u) = \frac{1}{2}[\frac{{(H(u - 1))}}{{{u^2}}} + H(1 - u)]$

$\int {} {p_Z}(u)du = {P_Z}(u) = \frac{{{u^2} - {{(u - 1)}^2}H(u - 1)}}{{2u}}$

note that H is Heaviside step function. we define ${P_{odd}}(u) = P(2u) - P(2u - 1) = \frac{{4{u^2} - {{(2u - 1)}^2}H(2u - 1)}}{{4u}} - \frac{{{{(2u - 1)}^2} - {{(2u - 2)}^2}H(2u - 2)}}{{2(2u - 1)}}$

we can show that ${P_{odd}}(1)$ is the probability of $Z$ being the first odd number and so on. using wolfram alpha I found out

$\sum\limits_{i \in N} {{P_{odd}}(i)} = \frac{{\ln (4)}}{4}$

I tested this answer using Monte Carlo simulation and it seemed legit,I'm wondering is there any other simpler ways to answer this question? for example without using infinite sum.

1

There are 1 best solutions below

1
On BEST ANSWER

For convenience, instead of $X_1, X_2$, let us use $(X,Y)$ and observe their joint distribution is uniform on the unit square. Then $Y/X$ is the slope of a line through the origin, and the set of all $(X,Y)$ such that $\lfloor Y/X \rfloor$ is odd, is the union of the set of triangles $A_k$ with vertices $$\{(0,0), (\tfrac{1}{2k-1}, 1), (\tfrac{1}{2k}, 1)\}$$ excluding the edge joining $(0,0)$ and $(\tfrac{1}{2k}, 1)\}$. So the total probability is simply the sum of the areas of each $A_k$, and since they all have common height $1$, the answer is simply $$\frac{1}{2} \sum_{k=1}^\infty \frac{1}{2k-1} - \frac{1}{2k} = \frac{\log 2}{2}.$$