# File:Inverse transform sampling.png

Inverse_transform_sampling.png(382 × 378 pixels, file size: 23 KB, MIME type: image/png)

## Summary

 Description English: Illustration of the inverse transform sampling Date 1/9/15 Source Own work Author Olivier Ricou

f1 = plt.figure(figsize=(6,6), dpi=300) x = np.linspace(-2, 2, 100)

plt.title(u"Inverse transforming sampling for normal distribution") plt.plot(x, n.pdf(x), label=r'pdf $f(x)$') # proba density function plt.plot(x, n.cdf(x), label=r'cdf $F(x) = \int_{-\infty}^x f(t) \, dt$') # cumulative distributive function plt.plot(x, n.ppf(x), label='ppf $F^{-1}(x)$') # percent point function plt.plot(x,x,'--k') plt.plot([n.ppf(0.2),n.ppf(0.2),0,0.2,0.2],[0,0.2,0.2,0,n.ppf(0.2)],'o:k') plt.text(n.ppf(0.2)-0.2, -0.2, r"$y \sim \cal N$", size=14) plt.text(0.2, 0.05, r'\$x \sim \calU(]0,1[][-2,2]) plt.axhline(color = 'gray') plt.axvline(color = 'gray') plt.rcParams['legend.loc'] = 'upper left' plt.legend()

This PNG graphic was created with Python.

 This math image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}}. It is recommended to name the SVG file "Inverse transform sampling.svg" – then the template Vector version available (or Vva) does not need the new image name parameter.

## Licensing

I, the copyright holder of this work, hereby publish it under the following license:

### Captions

Add a one-line explanation of what this file represents

## File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current16:34, 1 September 2015382 × 378 (23 KB)Ricoureplace x by u and y by x
16:11, 1 September 2015382 × 378 (23 KB)Ricou{{Information |Description ={{en|1=Illustration of the inverse transform sampling}} |Source ={{Own}} |Author =Olivier Ricou |Date =1/9/15 |Permission = |other_versions = }} f1 = plt.figure(figsize=(6,6), dpi=300) x = np...
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

## Global file usage

The following other wikis use this file:

• Usage on fa.wikipedia.org
• Usage on he.wikipedia.org
• Usage on su.wikipedia.org
• Usage on zh.wikipedia.org