The inverse transform sampling method works as follows:
#[[pseudorandom number generator|Generate a random number]] <math>u</math> from the standard uniform distribution in the interval <math>[0,1]</math>, e.g. from <math>U \sim \mathrm{Unif}[0,1].</math>
#Find the [[cumulative distribution function#Inverse_distribution_function_(quantile_function)|generalized inverse]] of the desired CDF, ei.ge. <math>F_X^{-1}(xu)</math>.
# Compute <math>X'(u)=F_X^{-1}(u)</math>. The computed random variable <math>X'(U)</math> has distribution <math>F_X(x)</math> and thereby the same law as $X$.
Expressed differently, given a continuouscumulative uniformdistribution variablefunction <math>UF_X</math> inand a uniform variable <math>U\in[0,1]</math> and an [[Inverse function|invertible]] cumulative distribution function <math>F_X</math>, the random variable <math>X = F_X^{-1}(U)</math> has the distribution <math>F_X</math> (or, <math>X</math> is distributed <math>F_X</math>).
<ref>{{cite book | last1 = McNeil | first1 = Alexander J. | last2 = Frey | first2 = Rüdiger | last3 = Embrechts | first3 = Paul | title = Quantitative risk management | date=2005 | series=Princeton Series in Finance | publisher=Princeton University Press, Princeton, NJ | page=186 | isbn=0-691-12255-5}}</ref>
AIn the continuous case, a treatment of such inverse functions as objects satisfying differential equations can be given.<ref>{{cite journal | last1 = Steinbrecher | first1 = György | last2 = Shaw | first2 = William T. | title = Quantile mechanics | journal = European Journal of Applied Mathematics | date = 19 March 2008 | volume = 19 | issue = 2 | doi = 10.1017/S0956792508007341}}</ref> Some such differential equations admit explicit power series solutions, despite their non-linearity.<ref>{{Cite journal |last=Arridge |first=Simon |last2=Maass |first2=Peter |last3=Öktem |first3=Ozan |last4=Schönlieb |first4=Carola-Bibiane |date= |title=Solving inverse problems using data-driven models |url=https://www.cambridge.org/core/journals/acta-numerica/article/solving-inverse-problems-using-datadriven-models/CE5B3725869AEAF46E04874115B0AB15 |journal=Acta Numerica |language=en |volume=28 |pages=1–174 |doi=10.1017/S0962492919000059 |issn=0962-4929}}</ref>