当前位置:网站首页>How to simulate 1/3 probability with coins, and arbitrary probability?
How to simulate 1/3 probability with coins, and arbitrary probability?
2022-08-02 15:27:00 【Hongyao】
Suddenly I remembered something very interesting.How to simulate a 1/3 probability with a coin, or even an arbitrary probability?
I happened to talk with a friend about how to simulate any probability with a coin. At that time, I thought it was impossible, because the coin has two sides, and the base of the simulation result must be 2^n.
Today, I reviewed a classic conditional probability problem, and suddenly thought that it is feasible to simulate any probability with a coin.
Simply put: tossing n different coins, throwing the re-throwing event A3 and re-throwing, throwing the failure event A2 to judge the failure, and throwing the successful event A1 to judge the success.
In addition, when simulating the probability of base x, you must toss n different coins at a time, and 2^n is greater than or equal to x.
In fact, this is very clear.
Take the probability of 1/3 as an example, toss 2 different coins each time, when all are tails, it is a re-toss, otherwise, when all are heads, it is judged to be successful, otherSituation determination failed.
The proof process is as follows
Then, simulate any probabilityWhat about the situation?
边栏推荐
- Win11系统找不到dll文件怎么修复
- 2022TI杯D题混沌信号产生实验装置
- Spark及相关生态组件安装配置——快速回忆
- Win10上帝模式干嘛的?Win10怎么开启上帝模式?
- LORA芯片ASR6601支持M4内核的远距离传输芯片
- DP4301无线收发SUB-1G芯片兼容CC1101智能家居
- 发布模块到npm应该怎么操作?及错误问题解决方案
- Win10 cannot directly use photo viewer to open the picture
- Use libcurl to upload the image of Opencv Mat to the file server, based on two methods of post request and ftp protocol
- Win11声卡驱动如何更新?Win11声卡驱动更新方法
猜你喜欢
随机推荐
Binder机制(中篇)
Win11 keeps popping up User Account Control how to fix it
MATLAB绘图命令fimplicit绘制隐函数图形入门详解
Mysql的锁
cmake配置libtorch报错Failed to compute shorthash for libnvrtc.so
win10怎么设置不睡眠熄屏?win10设置永不睡眠的方法
pytorch模型转libtorch和onnx格式的通用代码
Win10无法连接打印机怎么办?不能使用打印机的解决方法
发布模块到npm应该怎么操作?及错误问题解决方案
系统线性、时不变、因果判断
jest测试,组件测试
What is Win10 God Mode for?How to enable God Mode in Windows 10?
利用plot_surface命令绘制复杂曲面入门详解
How to set the win10 taskbar does not merge icons
FP5139电池与适配器供电DC-DC隔离升降压电路反激电路电荷泵电路原理图
编译error D8021 :无效的数值参数“/Wextra” cl command line error d8021 invalid numeric argument ‘/wextra‘
PHY6222蓝牙5.2支持MESH组网M0内核超低功耗
Win10电脑需要安装杀毒软件吗?
总结计算机网络超全面试题
为android系统添加产品的过程