资源描述:
《西安交大概率论上机实验报告材料.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、概率论上机实验报告一、实验容1、列出常见分布的概率密度及分布函数的命令,并操作。分布名称Matlab中的函数名解析表达式正态分布指数分布均匀分布伽玛分布t分布F分布韦伯分布二项分布泊松分布几何分布超几何分布2、掷硬币150次,其中正面出现的概率为0.5,这150次中正面出现的次数记为X,(1)试计算X=45的概率和X≤45的概率;(2)绘制分布函数图形和概率分布律图形。binopdf(45,150,0.5)%计算X=45的概率binocdf(45,150,0.5)%计算X<=45的概率x=0:1:150;y1=binopdf(x,150,0.5);y2=binocdf(x,150,0.5
2、);subplot(1,2,1);plot(x,y1);%概率密度分布图subplot(1,2,2);plot(x,y2);%分布函数图运行结果:3、用Matlab软件生成服从二项分布的随机数,并验证泊松定理。binornd(2000,0.04,1,20)%产生二项分布随机数x=0:1:200;y1=binopdf(x,200,0.4);y2=binopdf(x,2000,0.04);y3=binopdf(x,20000,0.004);y4=poisspdf(x,80);subplot(1,3,1);plot(x,y1,'^r');holdonplot(x,y4,'.');%λ=80时与
3、泊松分布对比subplot(1,3,2);plot(x,y2,'^r');holdonplot(x,y4,'.');%λ=800时与泊松分布对比subplot(1,3,3);plot(x,y3,'^r');holdonplot(x,y4,'.');%λ=8000时与泊松分布对比运行结果:ans=838984938110187798481978166848170886582794、设是一个二维随机变量的联合概率密度函数,画出这一函数的联合概率密度图像。x=-4:0.1:4;y=-4:0.1:4;[xb,yb]=meshgrid(x,y);zb=exp(-0.5*(xb.^2+yb.^2))
4、/(2*pi);mesh(xb,yb,zb)运行结果:5、来自某个总体的样本观察值如下,计算样本的样本均值、样本方差、画出频率直方图。A=[16251920253324232024251715212226152322 2014161114281813273125241619232617143021 1816181920221922182626132113111923182428 1311251517182216131213110915182115121713 1412161008231811162813212212081521181616 192819121
5、4192828281321281911151824181628 1915132214162420281818281413282924281418 1818082116243216281915181810121626181933 08111827231122221328142218261816322725241717283316202832192318281524282916171918]A=[162519202533242320242517152122261523222014161114281813273125241619232617143021181618192022
6、192218262613211311192318242813112515171822161312131109151821151217131412161008231811162813212212081521181616192819121419282828132128191115182418162819151322141624202818182814132829242814181818082116243216281915181810121626181933081118272311222213281422182618163227252417172833162028321923182815242
7、82916171918];[n,x]=hist(A,15)hist(A,15);mean=mean(A)var=var(A)运行结果:n=5101892731141417101222226x=8.833310.500012.166713.833315.500017.166718.833320.500022.166723.833325.500027.166728.833330.500032.1667mean=19.5176var=34