File:Normal Distribution PDF.svg

来自testwiki
跳转到导航 跳转到搜索
原始文件 (SVG文件,尺寸为720 × 460像素,文件大小:61 KB)

本文件来自维基共享资源并可能被其他项目使用。 其文件描述页上的描述显示在下面。

本文件可由自动确认用户自相同来源覆盖。请确保操作符合规定

摘要

描述
English: A selection of Normal Distribution Probability Density Functions (PDFs). Both the mean, μ, and variance, σ², are varied. The key is given on the graph.
日期
来源 自己的作品 (原始文本: self-made, Mathematica, Inkscape)
作者 Inductiveload
授权
(二次使用本文件)
Public domain 我,本作品著作权人,释出本作品至公有领域。这适用于全世界。
在一些国家这可能不合法;如果是这样的话,那么:
我无条件地授予任何人以任何目的使用本作品的权利,除非这些条件是法律规定所必需的。
SVG开发
InfoField
 该SVG的源代码为有效代码
 本统计图使用Mathematica创作。
 此SVG统计图使用了内嵌文本。

Mathematica 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]

R Language Code

# Normal Distribution - Probability Density Function (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")

Python Code

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()

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

64,852 字节

460 像素

720 像素

image/svg+xml

b99eb650f05d6365525532a7cbc8dea005fcf187

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2024年12月28日 (六) 00:402024年12月28日 (六) 00:40版本的缩略图720 × 460​(61 KB)wikimediacommons>TheBooker66Minified the file a bit by removing unnecessary elements and fixed svg isues.

以下页面使用本文件: