# A pair of probability problems

By | January 15, 2018

Let $w = (w_1,w_2,\dots)$ be an infinite sequence of nonnegative numbers that sums to unity.

Consider the function

$$f_w(u) = \sum_{j=1}^{\infty}\mathbf{I}(u < w_j).$$

1. Prove that $f_w$ is a probability density in $u > 0$.
2. Describe a simulation technique for generating a random variable $U \sim f_w(u)$.