上机作业_工学_高等教育_教育专区
第一次作业:1、模拟投不均匀硬币实验,正反面出现概率分别是0.3和0.7,分别投掷1000,5000,10000次,统计正反面次数。(使用工具:Excel)Al输入"=IF(RAND()vO3”正面丁反面”)"C1输入/Z=COUNTIF(A:AZ"正面”)"C2输入"二COUNTIF(A:A,”反面”)〃投掷1000次投掷5000次7fl-tFdUMDCXO.X*iEi\°n0♦i(xmtm4ooi正fififi正正fi正fi反fifififfsls^I:loul213u15l
XujnspujM©ujnsQ|ftuj$A&UM-W5S直曰OtMW(D4-Br®(WMg(70MG)・・G)«Xuoi)e)s)|Jo/\/\djeM^A•iunsp|niurSA\nVS,multisum•VMwareWorkstation文昨MODM(Y)tfwmd)»W)(H)II■」电I@-QH口口0Ltae宁J^r+sn子'VS.multisum国Windows7x64齐Windows8x64Windows10x64WindowsXPHomel\命主页魁我的计算机fl1VSrmuhiwmX••—•J当前文4牛夹①MATLAB?观»n=50(51Ubuntu(5)Windows8x64(5Ubuntug]Ubuntu12.0450»out=P*noutSLnr名田田田0.000000»n=1000.00000.000001.00001.00001.0000100»out=Pn>Eout■X■将W入"JW逐m・请在皮叙机內部■击或按CtrUG.QrRE业Ed"DAVS.multisum文件(DM(i)M(Y)創如UM)选项卡Q)¥助(H)・VMwareWorkstation・I为畀匕am口0-当前文件夹»out=PnIf;VSrmultiwmT不1逐MATLAB?观■此破,■闻读皿ML日辱翌的计jm住VS.multJ5umWindows7x64(5)Windows8x64(5Windows10x64I令主页聲我的计律机Ubuntu昂Windows8x64(5Ubuntu(JUbuntu12.04更共斟m0.0000000.00000.000001.00001.00001.0000»nz55S46484556456®«5.5©[0.S.5546e*13»out=Pnout300001.000001.000001.0000A»l■沁gq珈虔拟机・iHSAWtfl内那■壬或按CtrkG.\noooo\n\n第二次作业:1、模拟投骰子实验,六个面出现概率均为1/6,分别投掷500,1000,5000次,统计各面出现次数。使用工具:Excel相关代码:A1=RANDBETWEEN(1,6)E2hCOUNTIF(A:A,T)E3==COUNTIF(A:A;'2")E4==COUNTIF(A:A;'3")E5==COUNTIF(A:Az"4")E6==COUNTIF(A:A,"5")E7==COUNTIF(A:A,"6")投掷500次投掷1000次mm181718192021222324-■r■—一■EJ1t▼•ww\n第二次作业:1、模拟投骰子实验,六个面出现概率均为1/6,分别投掷500,1000,5000次,统计各面出现次数。使用工具:Excel相关代码:A1=RANDBETWEEN(1,6)E2hCOUNTIF(A:A,T)E3==COUNTIF(A:A;'2")E4==COUNTIF(A:A;'3")E5==COUNTIF(A:Az"4")E6==COUNTIF(A:A,"5")E7==COUNTIF(A:A,"6")投掷500次投掷1000次mm181718192021222324-■r■—一■EJ1t▼•ww\n投掷5000次rxm*1>?CMHidf・计曾CEXEtt・2、模拟投两个骰子实验,每个骰子六个面出现概率均为2/6,分别投掷1000,5000次,统计两个骰子点数和的出现次数。使用工具:Excel相关代码:A1=RANDBETWEEN(1,6)B1=RANDBETWEEN(1,6)C1=A1+B1E3==COUNTIF(C:CZH2")E4==COUNTIF(C:C;,3")E5==COUNTIF(C:C/"4")E6==COUNTIF(C:C,"5")E7==COUNTIFC:C,”6”)E8==COUNTIFC:C,”7")E9==COUNTIFC:C,“8“)E10==COUNTIFC:C,H9H)E11==COUNTIFC:C;,10H)E12==COUNTIFC:C,"11")E13==COUNTIFC:C,"12")投掷1000次\nMbZnsMttSRamE文8StUH权■子加・UcdBkasxaw•・Xe—@)公氏次・阿BfMOOWkMMuo・XflB_C_DFFcHRJ»pQR155lOftittt*个貳26393145231422436059384T>S1455109T1236130831471669448813410224911911n358101242611401362812W14224Sit1000IB63016145n3581843T1926820369219382211223I34241122S448X459©iM—1,E投掷5000次ER•>・~■D味•仕xMXDIS10IQ|顽I丹斫皿•jMAUKnmSm■X••机•®i>c«aiaw«匾QMhtBHBK1311・■55lomttan个it234?3S36244153S6284616T5?4486816T?95388102359U415101236nn13141211U308Sit500015538166410IT4481814519461020639212352214S23459244592525?2i426r»^r