介绍
正态分布(Normal distribution)又名高斯分布(Gaussian distribution),
是一个在数学、物理及project等领域都很重要的概率分布,在统计学的很多方面有着重大的影响力。
若随机变量X服从一个数学期望为μ、标准方差为σ2的高斯分布,记为:X~N(μ,σ2),
正态分布的期望值μ决定了其位置,其标准差σ决定了分布的幅度。因其曲线呈钟形,因此人们又常常称之为钟形曲线。
我们通常所说的标准正态分布是μ = 0,σ = 1的正态分布(见右图中绿色曲线)。
numpy random类中,看名称就是产生随机数的模块。
numpy.random.normal() 高斯分布随机数
normal(...) method of mtrand.RandomState instance
normal(loc=0.0, scale=1.0, size=None)
Draw random samples from a normal (Gaussian) distribution.
The probability density function of the normal distribution, first
derived by De Moivre and 200 years later by both Gauss and Laplace
independently [2]_, is often called the bell curve because of
its characteristic shape (see the example below).
The normal distributions occurs often in nature. For example, it
describes the commonly occurring distribution of samples influenced
by a large number of tiny, random disturbances, each with its own
unique distribution [2]_.
Parameters
----------
loc : float or array_like of floats
Mean ("centre") of the distribution.
scale : float or array_like of floats
Standard deviation (spread or "width") of the distribution.
size : int or tuple of ints, optional
Output shape. If the given shape is, e.g., ``(m, n, k)``, then
``m * n * k`` samples are drawn. If size is ``None`` (default),
a single value is returned if ``loc`` and ``scale`` are both scalars.
Otherwise, ``np.broadcast(loc, scale).size`` samples are drawn.
loc:均值(数学期望为μ) ÿ