Visualizing PDFs
The plots Iβve included are the typical way to visualize PDFs, but I much prefer to visualize them as the number lines below. Implementation-wise, Iβve just sampled 300 values from each distribution and plotted each as a red dot with opacity 0.12.
Transforming variables
If I know the PDF of , how can I find the PDF of ?
Using our number line visual, letβs animate the transform from some random variable to :
Observe two things:
- A point originally at moves to .
- The density at every point is halved.
Therefore,
(Typically, we rearrange this as , but I find the first expression more enlightening.)
Letβs tackle a slightly more challenging transform, .
Note that the density is no longer uniformly stretched by a factor of ; instead, the density at point will get stretched by . Therefore for ,
Exercise
In general, what is the PDF of in terms of and ?