File:Inverse transform sampling.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

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

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

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[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

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

Date/TimeThumbnailDimensionsUserComment
current16:34, 1 September 2015Thumbnail for version as of 16:34, 1 September 2015382 × 378 (23 KB)Ricou (talk | contribs)replace x by u and y by x
16:11, 1 September 2015Thumbnail for version as of 16:11, 1 September 2015382 × 378 (23 KB)Ricou (talk | contribs){{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...

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata