Pseudo-inverse of the Cumulative Distribution Function of $X$

1.3k Views Asked by At

The goal of these calculations is to write a Python function that generates pseudo-random values with the distribution described below. This isn't relevant to the question (or even to this community); however, I wanted to give context.

I was originally tasked with finding a closed-form expression for the cumulative distribution of X, where X is a discrete random variable that has all of the positive integers 1, 2, 3, ... as possible values, with a distribution of: $$P(X=n)=2^{-n}$$

I found that the closed-form expression would be: $$F_X(n)=P_x(X\le n)=\sum_{n_i\le n} 2^{-n_i}$$

The part that I do not know how to approach is finding a closed-form expression for the "pseudo-inverse" of the cumulative distribution function of X: $$F_{X}^{-1}(t)=\text{smallest }n\text{ such that } F_X(n)\ge t$$

I understand that the cdf is not invertible in the standard sense since $F_X$ is a piecewise constant (if X is a discrete random variable, which it is). However, I do not know how to approach this "pseudo-inverse." The only information my notes give on the subject is its mathematical definition, which is $F_{X}^{-1}(u)=min(\{x|F_X(x)\ge u\}) \text{ for } 0\le u<1$.

Any help would be greatly appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

$$F_X(n)=P_x(X\le n)=\sum_{n_i\le n} 2^{-n_i}= 1-2^{-n}$$ $$1-2^{-n} \geq t\\ 1-t \geq2^{-n} \\ \log_2(1-t) \geq -n \\ n \geq - \log_2(1-t) = \log_2\left( \frac{1}{1-t} \right) $$ $$ F_X^{-1}(t) = \left\lceil \log_2\left( \frac{1}{1-t} \right) \right\rceil $$ where $\lceil x \rceil$ is the least integer greater than or equal to $x$ function.