4

Let $U$ be uniform on $[0,1]$. For any given real number $a$ let $\lfloor a \rfloor$ denote the largest integer no greater than $a$. If $q$ is a given constant such that $q \in (0,1)$

Find the pmf of $X = 1+\left\lfloor\frac{\ln U}{\ln q}\right\rfloor$.

I get an idea of what is going on by look at the question Find the probability mass function of the (discrete) random variable $X = Int(nU) + 1$. My problem is I can't quite figure out how to handle the $\log$ functions and the fact that $\ln q$ in not always an integer.

Starlight
  • 2,684
Wintermute
  • 3,930

2 Answers2

2

$P(X=n) = P(n-1< \frac{\log U}{\log{q}} < n ) = P(n\log(q) < \log U < \log(q) (n-1)) = P(q^{n} < U < q^{n-1}) = q^{n-1} - q^n = q^{n-1}(1-q)$

Wintermute
  • 3,930
Lost1
  • 8,085
1

The above answer ends at a geometric random variable. Here is an explanation of why this happens. Note that we are interested in the random variable:

$$X = 1+\left\lfloor\frac{\ln U}{\ln q}\right\rfloor=1+\left\lfloor\frac{-\ln U}{-\ln q}\right\rfloor=\left\lfloor\frac{-\ln U}{\ln \frac1q}\right\rfloor$$

The negative log of a uniform random variable follows an exponential distribution: $$-\ln U \sim \text{Exp}(\lambda=1)$$

And the scaled floor of an exponential distribution follows a geometric distribution: $$\left\lfloor\frac{-\ln U}{\ln \frac1q}\right\rfloor \sim \text{Geometric}(p=1-q)$$

Starlight
  • 2,684