《第二次概率上机作业——概率与统计资料文档.docx》由会员分享,可在线阅读,更多相关《第二次概率上机作业——概率与统计资料文档.docx(5页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、姓名:李苹卉班级:管经1308学号:20 xx 040661 ,模拟投骰子实验,六个面出现概率均为1/6,分别投掷1000,5000/0000次,统计各面出现次数 A=randint( 1000,1, 1,6); count_ 1 =length(find(A= 1)count_2=length(find(A=2)count_3=length(find(A=3)count_4=length(find(A=4)count_5=length(find(A=5)count_6=length(find(A=6)count_l 二182count_2 =170count_3 二162count_4 =1
2、79count_5 =163count_6 =158 A=randint(5000,l,l,6); count_ 1 =Iength(find(A= 1) count_2=length(find(A=2) count_3=Iength(find(A=3) count_4=length(find(A=4) count_5=length(find(A=5) count_6=length(find(A=6)count_l =839count_2 二826count_3 =855count_4 =836count_5 =832count_6 二841 A=randint(l 0000,1, 1,6);
3、 count_ l=lcngth(find(A=l) count_2=length(find(A=2) count_3=length(find(A=3) count_4=length(find(A=4) count_5=length(find(A=5) count_6=length(find(A=6)count 1 =1625count_2 =1637count_3 =1648count_4 =1677count_5 =1711count_6 =16962,模拟投三个骰子实验,每个骰子六个面出现概率均为1/6,投掷10000次,统计三个骰子点数 和的出现次数. A=randint( 10000
4、,1,1,6);B=randint(10000,l,l,6);C=randint(10000,l,l,6);count_3=length(find(A4-B+C=3)count_4=lcngth(flnd(A+B+C=4)count_5=length(find(A+B+C=5)count_6=length(find(A+B+C=6)count_7=length(find(A+B+C=7)count_8=length(find(A+B+C=8)count_9=length(find(A+B4-C=9)count_ 10=length(find(A+B+C= 10) count_l l=lengt
5、h(find(A+B4-C=l 1) count2=length(find(A+B+C= 12) count_13=length(find(A+B+C=13) count_l 4=length(find( A+B+C= 14) count5=length(find(A+B+C= 15) count_16=length(find(A4-B+C= 16) count7=length(find(A+B+C= 17) count_l 8=length(find(A4-B+C= 18)count_3 二43 count_4 二124 count_5 二272 count_6 二452 count_7 二676 count_8 二965count_9 二count 10 =1274count 111224count1109count1012count728count434count265count129count第6页,共6页