File:Normal Distribution PDF.svg

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

Original file(SVG file, nominally 720 × 460 pixels, file size: 63 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: A selection of Normal Distribution Probability Density Functions (PDFs). Both the mean, μ, and variance, σ², are varied. The key is given on the graph.
Date
Source self-made, Mathematica, Inkscape
Author Inductiveload
Permission
(Reusing this file)
Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
SVG development
InfoField
 
The source code of this SVG is invalid due to an error.
 
This W3C-invalid chart was created with R.
 
This SVG chart uses embedded text.
Source code
InfoField

R code

Plot[
 {
  PDF[NormalDistribution[1, Sqrt[2]], x],
  PDF[NormalDistribution[2, 1], x],
  PDF[NormalDistribution[3, Sqrt[3]], x],
    },
 {x, -5, 5},
 PlotRange -> All,
 Axes -> False]

Data

#			Normal Distribution PDF
#range
x=seq(-5,5,length=200)
#plot each curve
plot(x,dnorm(x,mean=0,sd=sqrt(.2)),type="l",lwd=2,col="blue",main='Normal Distribution PDF',xlim=c(-5,5),ylim=c(0,1),xlab='X',
ylab='φμ, σ²(X)')
curve(dnorm(x,mean=0,sd=1), add=TRUE,type="l",lwd=2,col="red")
curve(dnorm(x,mean=0,sd=sqrt(5)), add=TRUE,type="l",lwd=2,col="brown")
curve(dnorm(x,mean=-2,sd=sqrt(.5)), add=TRUE,type="l",lwd=2,col="green")

Text

#                    Normal Distribution
import numpy as np
import matplotlib.pyplot as plt 

def make_gauss(N, sig, mu):
    return lambda x: N/(sig * (2*np.pi)**.5) * np.e ** (-(x-mu)**2/(2 * sig**2))

def main():
    ax = plt.figure().add_subplot(1,1,1)
    x = np.arange(-5, 5, 0.01)
    s = np.sqrt([0.2, 1, 5, 0.5])
    m = [0, 0, 0, -2] 
    c = ['b','r','y','g']

    for sig, mu, color in zip(s, m, c): 
        gauss = make_gauss(1, sig, mu)(x)
        ax.plot(x, gauss, color, linewidth=2)

    plt.xlim(-5, 5)
    plt.ylim(0, 1)
    plt.legend(['0.2', '1.0', '5.0', '0.5'], loc='best')
    plt.show()

if __name__ == '__main__':
   main()

File history

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

Date/TimeThumbnailDimensionsUserComment
current16:06, 29 April 2016Thumbnail for version as of 16:06, 29 April 2016720 × 460 (63 KB)Rayhem (talk | contribs)Lighten background grid
17:19, 22 September 2009Thumbnail for version as of 17:19, 22 September 2009720 × 460 (65 KB)Stpasha (talk | contribs)Trying again, there seems to be a bug with previous upload…
17:15, 22 September 2009Thumbnail for version as of 17:15, 22 September 2009720 × 460 (65 KB)Stpasha (talk | contribs)Curves are more distinguishable; numbers correctly rendered in roman style instead of italic
14:07, 27 June 2009Thumbnail for version as of 14:07, 27 June 2009720 × 460 (55 KB)Autiwa (talk | contribs)fichier environ 2 fois moins gros. Purgé des définitions inutiles, et avec des plots optimisés au niveau du nombre de points.
18:22, 5 September 2008Thumbnail for version as of 18:22, 5 September 2008720 × 460 (109 KB)PatríciaR (talk | contribs)from http://tools.wikimedia.pl/~beau/imgs/ (recovering lost file)
19:09, 2 April 2008No thumbnail (109 KB)Inductiveload (talk | contribs){{Information |Description=A selection of Normal Distribution Probability Density Functions (PDFs). Both the mean, ''μ'', and variance, ''σ²'', are varied. The key is given on the graph. |Source=self-made, Mathematica, Inkscape |Date=02/04/2008 |Author

File usage on other wikis

The following other wikis use this file:

View more global usage of this file.

Metadata