当前位置:网站首页>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()
边栏推荐
- Redis implements distributed locks
- $parent/$children 与 ref
- Safety 20220722
- Pytest电商项目实战(上)
- Day32 LeetCode
- Select the smoke test case, and make the first pass for the product package entering QA
- IDEA comment report red solution
- 浅识Flutter 基本组件之showDatePicker方法
- some of my own thoughts
- (tree) Last Common Ancestor (LCA)
猜你喜欢
Knowledge Distillation 7: Detailed Explanation of Knowledge Distillation Code
5. How does the SAP ABAP OData service support the $filter operation
type_traits元编程库学习
STM32 problem collection
Redis implements distributed locks
浅识Flutter 基本组件之showDatePicker方法
SIP协议标准和实现机制
LeetCode每日一练 —— OR36 链表的回文结构
No qualifying bean of type 问题
安全20220712
随机推荐
Pytest e-commerce project combat (on)
Redis 统计用户新增和留存
Select the smoke test case, and make the first pass for the product package entering QA
Mysql 45 study notes (23) How does MYSQL ensure that data is not lost
Implementation of a sequence table
How to develop a high-quality test case?
Redis counts new and retained users
(Line segment tree) Summary of common problems of basic line segment tree
A brief introduction to the CheckBox component of the basic components of Flutter
[Compilation principle] Lexical analysis program design principle and implementation
Atomic operation CAS
errno错误码及含义(中文)
Web container and IIS --- Middleware penetration method 1
Zotero如何删除自动生成的标签
数据库文件中的未分配的块和未使用的块的区别
The application and practice of mid-to-platform brand advertising platform
LocalDate加减操作及比较大小
Can‘t load /home/Iot/.rnd into RNG
Knowledge Distillation 7: Detailed Explanation of Knowledge Distillation Code
Key Technologies of Interface Testing