Inverse transform sampling: Difference between revisions

Content deleted Content added
Sowhates (talk | contribs)
The method: Reworked section to cover general random variables
Sowhates (talk | contribs)
Line 35:
 
== Intuition ==
From <math>U \sim \mathrm{Unif}[0,1]</math>, we want to generate <math>X</math> with [[Cumulative distribution function|CDF]] <math>F_X(x).</math> We assume <math>F_X(x)</math> to be a continuous, strictly increasing function, which provides good intuition.
 
We want to see if we can find some strictly monotone transformation <math>T:[0,1]\mapsto \mathbb{R}</math>, such that <math>T(U)\overset{d}{=}X</math>. We will have
Line 41:
<math>F_X(x)=\Pr(X\leq x)=\Pr(T(U)\leq x) = \Pr(U\leq T^{-1}(x))=T^{-1}(x), \text{ for } x\in \mathbb{R},</math>
 
where the last step used that <math>\Pr(U \leq y) = y</math> when <math>U</math> is uniform on <math>([0,1)]</math>.
 
So we got <math>F_X</math> to be the inverse function of <math>T </math>, or, equivalently <math>T(u)=F_X^{-1}(u), u\in [0,1]. </math>