在学校里,我被教导了二项式的正态逼近,有人建议我可以在某些条件下有效地使用它,因为它可以“更容易计算”。
我知道如果我使用纸质桌子会更方便。当我的所有计算都使用计算机完成时,使用正态近似还有优势吗?使用近似值进行代数运算或微积分是否更容易?有哪些优势示例?
我不知道正确的基准测试是什么,但也许这给出了一个想法:
> benchmark(rbinom(1, 1, .5), replications=1000000)
test replications elapsed relative user.self sys.self user.child
1 rbinom(1, 1, 0.5) 1000000 3.593 1 3.476 0.156 0
sys.child
1 0
> benchmark(rnorm(1), replications=1000000)
test replications elapsed relative user.self sys.self user.child
1 rnorm(1) 1000000 3.724 1 3.564 0.2 0
sys.child
1 0