Previous | Next --- Slide 136 of 217
Back to Lecture Thumbnails
kyriaki

I am a bit confused about where the CDF comes from and what the horizontal axis represents here. Thank you!

motoole2

Sure, let's see if we can clear this up.

The x-axis represents the space of possible random observations. In this case, the variable $x$ can take on one of 10 possible values (corresponding to the 10 bins shown here). While the probability density function is discrete in this case, it can just as easily be a continuous function.

The goal in this slide is to generate samples according to the specified PDF. This involves:

  1. computing the cumulative density function, where the k-th bin is the sum of the first k bins from the PDF; and

  2. sampling the inverse $\text{CDF}^{-1}(y)$ with uniformly random values $y \in [0,1]$. The resulting samples will have a distribution equal to the original PDF.