(a) Make a simulation of rolling two dice (with six faces),and note their sum.How does the probability density function look like?(b) Do the same for three dice.求代码.实在是研究不动了 如果能一起解答下面一道就万分感谢了!
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 15:26:31
(a) Make a simulation of rolling two dice (with six faces),and note their sum.How does the probability density function look like?(b) Do the same for three dice.求代码.实在是研究不动了 如果能一起解答下面一道就万分感谢了!
(a) Make a simulation of rolling two dice (with six faces),and note their sum.How does the probability density function look like?
(b) Do the same for three dice.
求代码.实在是研究不动了 如果能一起解答下面一道就万分感谢了!
下面这道题第一问我会,求第二问怎样解,用了Do和For但就是有错误.
(a) Make a simulation of rolling two dice (with six faces),and note their sum.How does the probability density function look like?(b) Do the same for three dice.求代码.实在是研究不动了 如果能一起解答下面一道就万分感谢了!
a[n_] := Module[{f},f[1] = 1; f[2] = 3; f[i_] := f[i] = f[i - 1] + f[i - 2]; f[n]]
mode[x_] := Module[{i},i = 1; While[Mod[a[2*i],Prime[x]] != 2,i++;]; i]