当前位置:网站首页>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()
边栏推荐
- errno错误码及含义(中文)
- [Godot][GDScript] 2D cave map randomly generated
- 数据库实现分布式锁
- How to develop a high-quality test case?
- [shell basics] determine whether the directory is empty
- 安全20220718
- Understanding and Using Unity2D Custom Scriptable Tiles (4) - Start to build a custom tile based on the Tile class (below)
- (4) Recursion, variable parameters, access modifiers, understanding main method, code block
- Golang中的addressable
- $parent/$children 与 ref
猜你喜欢

LeetCode每日一练 —— 138. 复制带随机指针的链表

(四)递归、可变参数、访问修饰符、理解 main 方法、代码块

C语言从入门到如土——数据的存储

Mysql 45 study notes (23) How does MYSQL ensure that data is not lost

Understanding and Using Unity2D Custom Scriptable Tiles (4) - Start to build a custom tile based on the Tile class (below)

IDEA comment report red solution

Use of QML

Component pass value provide/inject

Ambiguous method call.both

浅识Flutter 基本组件之CheckboxListTile组件
随机推荐
C primer plus study notes - 8, structure
Observer pattern
Component pass value provide/inject
Summary of Huawei Distributed Storage FusionStorage Knowledge Points [Interview]
LeetCode每日一练 —— 138. 复制带随机指针的链表
No qualifying bean of type 问题
errno错误码及含义(中文)
(六)枚举、注解
Pytest e-commerce project combat (on)
立足本土,链接全球 | 施耐德电气“工业SI同盟”携手伙伴共赴未来工业
[C language] Three-pointed chess (classic solution + list diagram)
[shell basics] determine whether the directory is empty
IIR filter and FIR filter
Good place to download jar packages
LocalDate addition and subtraction operations and comparison size
C language from entry to such as soil, the data store
STM32 problem collection
$parent/$children 与 ref
IDEA常用快捷键与插件
Knowledge Distillation 7: Detailed Explanation of Knowledge Distillation Code