wolfram-mathematica - 使用Probability []或Probability []从4次抛硬币中计算出3个或更多正面的可能性

标签 wolfram-mathematica mathematica-8

是否有可能使用概率或NProbability函数从4次抛硬币中计算出3个或更多Head的概率。

这不是关于这个问题的简单答案的问题,更多的是要了解如何使用分布使用Mathematica解决此类问题。

因此,使用分布P中的4个随机变量

我希望这样的方法可以解决问题,但它不起作用。我得到0。

P = BernoulliDistribution[0.5];
vars = List[Distributed[a,P],Distributed[b,P],Distributed[c,P],Distributed[c,P]];
NProbability[Count[ {a,b,c,d}, 1] >= 3,  vars]

任何想法将不胜感激。

最佳答案

这里不是使用Mma进行统计的专家,但这似乎可行:

l = TransformedDistribution[
       x + y + w + z, {x \[Distributed] BernoulliDistribution[0.5], 
                       y \[Distributed] BernoulliDistribution[0.5], 
                       z \[Distributed] BernoulliDistribution[0.5], 
                       w \[Distributed] BernoulliDistribution[0.5]}];

Table[NProbability[x > i, x \[Distributed] l], {i, -1, 4}]
(*
{1, 0.9375, 0.6875, 0.3125, 0.0625, 0.}
*)

关于wolfram-mathematica - 使用Probability []或Probability []从4次抛硬币中计算出3个或更多正面的可能性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7821028/

相关文章:

java - J/Link 中 "if"语句的正确语法

wolfram-mathematica - 在笔记本中搜索并替换希腊字母

wolfram-mathematica - 稍作修改后重新布局图,同时保留原始布局的特征

wolfram-mathematica - 从 Rule 和/切换有什么好处。在大型应用程序中使用 OptionsPattern[] 和 OptionValue?

wolfram-mathematica - 防止在 Mathematica 8 中自动布局 Graph[] 对象

programming-languages - 数学 : what is symbolic programming?

python - 开箱即用的软件是否将 GPU 用于数字?

wolfram-mathematica - 如何在 Mathematica 中制作选择性下拉菜单?

wolfram-mathematica - Interpolation 的 InterpolationOrder 选项的奇怪行为

memory - Mathematica 中的子内核内存控制