python 概率分布相关API
来源:互联网 发布:优化win7系统运行速度 编辑:程序博客网 时间:2024/05/20 02:57
1 GUSSIAN 分布
numpy.random.normal
- numpy.random.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 [R215], 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 [R215].
Parameters : loc : float
Mean (“centre”) of the distribution.
scale : float
Standard deviation (spread or “width”) of the distribution.
size : tuple of ints
Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn.
See also
- scipy.stats.distributions.norm
- probability density function, distribution or cumulative density function, etc.
Notes
The probability density for the Gaussian distribution is
where is the mean and the standard deviation. The square of the standard deviation, , is called the variance.
The function has its peak at the mean, and its “spread” increases with the standard deviation (the function reaches 0.607 times its maximum at and [R215]). This implies that numpy.random.normal is more likely to return samples lying close to the mean, rather than those far away.
References
[R214]Wikipedia, “Normal distribution”, http://en.wikipedia.org/wiki/Normal_distribution [R215](1, 2, 3, 4) P. R. Peebles Jr., “Central Limit Theorem” in “Probability, Random Variables and Random Signal Principles”, 4th ed., 2001, pp. 51, 51, 125.Examples
Draw samples from the distribution:
Verify the mean and the variance:
Display the histogram of the samples, along with the probability density function:
(Source code, png, pdf)
- python 概率分布相关API
- 使用Python估计数据概率分布函数
- 概率分布
- 概率分布
- 概率分布
- 概率分布
- 概率分布-beta分布
- 如何在Python中实现这五类强大的概率分布
- 如何在Python中实现这五类强大的概率分布
- 如何在Python中实现这五类强大的概率分布
- python 实现5种强大的概率分布
- 如何在Python中实现这五类强大的概率分布
- 概率分布之间的距离度量以及python实现
- 概率分布之间的距离度量以及python实现
- 概率分布-二项分布、多项分布
- 概率分布之共轭分布
- 概率分布-泊松分布
- 条件概率分布与边缘概率分布
- android滑动基础篇 TouchView
- 常见各种语言编写的程序的入口点代码(识别是否到达OEP)
- 四川大学线下编程比赛第三题:书本转移
- iOS8新功能新特性
- HashMap是无序序列
- python 概率分布相关API
- 利用站内优化做好用户体验
- Cocos2dx 3.x在Android下多线程加载问题(thread exiting, not yet detached)
- 数位搜索bfs
- JS内存泄漏排查方法(Chrome Profiles)
- iOS8指纹识别TouchID
- [LeetCode]Length of Last Word
- opengl ES
- 【DP_背包专辑】