当前位置:网站首页>binom二项分布,
binom二项分布,
2022-07-31 03:40:00 【人工智能曾小健】
二项分布(英语:Binomial distribution)是n个独立的是/非试验中成功的次数的离散概率分布,其中每次试验的成功概率为p。这样的单次成功/失败试验又称为伯努利试验。实际上,当n = 1时,二项分布就是伯努利分布。二项分布是显著性差异的二项试验的基础。
from scipy.stats import binom
import matplotlib.pyplot as plt
# setting the values
# of n and p
n = 6
p = 0.5
# defining list of r values
r_values = list(range(n + 1))
# list of pmf values
dist = [binom.pmf(r, n, p) for r in r_values ]
# plotting the graph
plt.bar(r_values, dist)
plt.show()
边栏推荐
猜你喜欢
Database implements distributed locks
端口排查步骤-7680端口分析-Dosvc服务
How Zotero removes auto-generated tags
Know the showTimePicker method of the basic components of Flutter
"A daily practice, happy water problem" 1331. Array serial number conversion
Component pass value provide/inject
(八)Math 类、Arrays 类、System类、Biglnteger 和 BigDecimal 类、日期类
Redis implements distributed locks
数据库实现分布式锁
5. How does the SAP ABAP OData service support the $filter operation
随机推荐
web容器及IIS --- 中间件渗透方法1
BP神经网络
VS QT - ui does not display newly added members (controls) || code is silent
Implementation of a sequence table
Problems that need to be solved in distributed system architecture
【Exception】The field file exceeds its maximum permitted size of 1048576 bytes.
安全20220722
SIP协议标准和实现机制
C language from entry to such as soil, the data store
(线段树) 基础线段树常见问题总结
Know the showTimePicker method of the basic components of Flutter
type_traits metaprogramming library learning
some of my own thoughts
postgresql 15源码浅析(5)—— pg_control
识Flutter 基本组件之showTimePicker 方法
(六)枚举、注解
$attrs/$listeners
errno error code and meaning (Chinese)
Day32 LeetCode
Recursive query single table - single table tree structure - (self-use)