(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/06/18 02:22:24
![(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.求代码.实在是研究不动了 如果能一起解答下面一道就万分感谢了!](/uploads/image/z/11373168-48-8.jpg?t=%28a%29+Make+a+simulation+of+rolling+two+dice+%28with+six+faces%29%2Cand+note+their+sum.How+does+the+probability+density+function+look+like%3F%28b%29+Do+the+same+for+three+dice.%E6%B1%82%E4%BB%A3%E7%A0%81.%E5%AE%9E%E5%9C%A8%E6%98%AF%E7%A0%94%E7%A9%B6%E4%B8%8D%E5%8A%A8%E4%BA%86+%E5%A6%82%E6%9E%9C%E8%83%BD%E4%B8%80%E8%B5%B7%E8%A7%A3%E7%AD%94%E4%B8%8B%E9%9D%A2%E4%B8%80%E9%81%93%E5%B0%B1%E4%B8%87%E5%88%86%E6%84%9F%E8%B0%A2%E4%BA%86%21)
(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]