Binomic 概率计算器
找到在n独立审判中成功k的概率。
输入结果时更新 。
关于此计算器
The binomial probability calculator uses the binomial distribution to model the number of successes in a fixed number of independent trials, each with the same success probability — the classic "how many heads in ten coin flips" problem. It returns the probability of exactly k successes, P(X = k) = C(n, k)·pᵏ·(1 − p)ⁿ⁻ᵏ, along with the cumulative probabilities of at most k and at least k successes.
The term C(n, k) is the number of ways to choose which k of the n trials succeed, pᵏ is the chance those k succeed and (1 − p)ⁿ⁻ᵏ the chance the rest fail. It also reports the distribution’s mean (n·p), variance (n·p·(1 − p)) and standard deviation, and shows the full probability distribution as a table and a chart.
Worked example: for n = 10 flips of a fair coin (p = 50%) the chance of exactly k = 3 heads is C(10, 3) × 0.5³ × 0.5⁷ = 120 × 0.5¹⁰ ≈ 11.7%. The expected number of heads is 10 × 0.5 = 5, with a standard deviation of √(10 × 0.5 × 0.5) ≈ 1.58.
经常问到的问题
什么时候可以用二元分布法?
当有固定数量的独立审判,每次审判只有两项结果(成功或失败)时使用它,每次成功概率相同——例如把硬币翻10倍或分批计算有缺陷的项目。
P(X) = k) 和 P(X) = k 之间有什么区别?
P(X) = k) 是成功的机会, 而P(X) = k(k) 将成功的机会加起来为 0, 1,.., 直至 k(c) 成功。 累积版本回答的问题有“ 最多成功3个的概率是多少? ”
"不选择k"是什么?
C(n, k), 改为 “ n choose k ” 是选择哪种 k 的各种方式数。 对于 10 个 和 3 个 成功 来说, 共有 C( 10, 3 ) = 120 个 组合, 每种组合都促成了总概率。
二元分布的平均值和标准偏差是什么?
The mean (expected number of successes) is n·p and the variance is n·p·(1 − p), so the standard deviation is √(n·p·(1 − p)). For 10 fair coin flips the mean is 5 and the standard deviation about 1.58.
什么时候我能用正常的分布来接近二元论?
当 n 较大, 且 n- p 和 n- (1 - p) 至少 10 左右时, 则二元制的分布很接近于正常分布, 其平均值和标准差相同。 这是许多大比例测试的基础 。
我如何找到至少成功k的概率?
P(X ≥ k) sums the probabilities of k, k+1, … up to n successes. It equals 1 − P(X ≤ k − 1), and this binomial probability calculator reports it directly alongside the "at most" value.
API - 使用代码中的计算器
将此计算器称为自由 JSON 端点 。 不需要按键 。 将字段值发送到下面作为查询参数或 JSON 。 任何您省略的, 都会使用相同的默认值, 此页面预填的默认值是预填的; 未知参数是 400, 而不是静音零 。 读取 API 全部文件 →
终点
GET https://calculator.free/api/v1/binomial-probability/
curl
curl "https://calculator.free/api/v1/binomial-probability/?n=10&k=3&p=50"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/binomial-probability/?" + new URLSearchParams({
"n": "10",
"k": "3",
"p": "50"
}));
const data = await r.json();
console.log(data.results);
成果仅是一般指导的估计数,而不是财务、医疗或税务咨询。