💧 Bernoulli Trial Simulator

Run independent Bernoulli trials with a given number of trials and success probability, then report the observed frequency and deviation.

📐 工作原理与说明
伯努利试验蒙特卡洛模拟:每次试验独立以概率 p 判定成功,进行 n 次;实际频率 = 成功次数 / n;理论概率为 p;实际频率与理论值之差即抽样偏差,其标准误为 sqrt(p*(1-p)/n),随 n 增大而减小。

📚 深度解析:伯努利试验模拟

💡 常见使用场景

  • 模拟重复独立试验,观察成功频率与理论概率的偏差。
  • 用大样本演示频率趋近概率,辅助理解标准误。
模拟
设试验 1000 次、成功概率 30%,页面逐次独立抽样后输出成功次数、实际频率、与理论值的偏差及标准误。

❓ 常见问题(FAQ)

模拟结果为什么每次不同?
每次运行都是独立随机抽样,频率会在理论概率附近波动;样本越大,波动越小。
标准误怎么理解?
标准误 = √(p(1−p)/n),衡量实际频率偏离理论概率的典型幅度;n 越大越小。

Formula & Standard References

Item Formula / Note Source / Standard
Single trial Each trial is independent with a constant success probability p Bernoulli trial definition
Successes The number of successes in n trials follows the binomial distribution B(n,p) Binomial distribution
Standard error Standard error of the frequency sqrt(p·(1−p)/n) Sampling theory
⚠️ 使用说明与注意事项