当前位置:网站首页>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?
边栏推荐
- How to reinstall Win7 system with U disk?How to reinstall win7 using u disk?
- TCP三次握手、四次挥手
- LORA芯片ASR6505无线远距离传输8位MCU
- pygame绘制弧线
- win10 system update error code 0x80244022 how to do
- LORA芯片ASR6601支持M4内核的远距离传输芯片
- Do Windows 10 computers need antivirus software installed?
- cmake配置libtorch报错Failed to compute shorthash for libnvrtc.so
- 蓝牙温度检测系统(基于BT08-B蓝牙模块)
- 单端K总线收发器DP9637兼容L9637
猜你喜欢
win10怎么设置不睡眠熄屏?win10设置永不睡眠的方法
13.56MHZ刷卡芯片CI521兼容cv520/ci520支持A卡B卡MIFARE协议
What should I do if I install a solid-state drive in Win10 and still have obvious lags?
CS4398音频解码替代芯片DP4398完全兼容DAC解码
2022TI杯D题混沌信号产生实验装置
Win10无法连接打印机怎么办?不能使用打印机的解决方法
MATLAB绘图函数plot详解
【STM32学习1】基础知识与概念明晰
推开机电的大门《电路》(三):说说不一样的电阻与电导
Win11 keeps popping up User Account Control how to fix it
随机推荐
define #使用
FP6195耐压60V电流降压3.3V5V模块供电方案
基于矩阵计算的线性回归分析方程中系数的估计
利用plot_surface命令绘制复杂曲面入门详解
Win10 cannot directly use photo viewer to open the picture
KiCad Common Shortcuts
[STM32 Learning 1] Basic knowledge and concepts are clear
SQL的通用语法和使用说明(图文)
DP4301无线收发SUB-1G芯片兼容CC1101智能家居
实战美团Nuxt +Vue全家桶,服务端渲染,邮箱验证,passport鉴权服务,地图API引用,mongodb,redis等技术点
win10 system update error code 0x80244022 how to do
C语言函数参数传递模式入门详解
关于c语言的调试技巧
Please make sure you have the correct access rights and the repository exists.问题解决
Publish module to NPM should be how to operate?Solutions to problems and mistake
vscode镜像
Win11 keeps popping up User Account Control how to fix it
Bash shell位置参数
Redis的线程模型
Win10电脑需要安装杀毒软件吗?