资源描述:
《西安交大概率论上机实验报告材料09528》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、概率论上机实验报告一、实验内容1、列出常见分布的概率密度及分布函数的命令,并操作。分布名称Matlab中的函数名解析表达式正态分布normpdf(x,m,s)=12πσe-x-μ22σ2指数分布exppdf(x,m)=1μe-xμx>00x≤0均匀分布unifpdf(x,a,b)=1b-ax∈(a,b)0x∉(a,b)伽玛分布gampdf(x,a,b)=xa-1e-xbbaΓ(a)x>00x≤0t分布tpdf(x,a)=Γa+12Γa2aπ·11+x2aa+12F分布fpdf(x,a,b)=Γa+b2Γa2Γb2·aba2·xa-221+axba+b
2、2x>00x≤0韦伯分布weibpdf(x,a,b)=abxb-1e-axbx>00x≤0二项分布binopdf(k,n,p)=Cnkpk1-pn-k0
3、概率分布律图形。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);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(
4、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时与泊松分布对比subplot(1,3,2);plot(x,y2,'^r');holdonplot(x,y4,'.');%λ=800时与泊松分布对比subplot(1,3,3);plot(x,y3,'^r');holdonplot(x,y4,'.');%λ=8000时与泊松分布对比运
5、行结果:ans=838984938110187798481978166848170886582794、设fx,y=12πe-x2+y22是一个二维随机变量的联合概率密度函数,画出这一函数的联合概率密度图像。x=-4:0.1:4;y=-4:0.1:4;[xb,yb]=meshgrid(x,y);zb=exp(-0.5*(xb.^2+yb.^2))/(2*pi);mesh(xb,yb,zb)运行结果:5、来自某个总体的样本观察值如下,计算样本的样本均值、样本方差、画出频率直方图。A=[16251920253324232024251715212226152
6、322 2014161114281813273125241619232617143021 1816181920221922182626132113111923182428 1311251517182216131213110915182115121713 1412161008231811162813212212081521181616 1928191214192828281321281911151824181628 1915132214162420281818281413282924281418 1818082
7、116243216281915181810121626181933 08111827231122221328142218261816322725241717283316202832192318281524282916171918]A=[1625192025332423202425171521222615232220141611142818132731252416192326171430211816181920221922182626132113111923182428131125151718221613121311091518211512171
8、314121610082318111628132122120815211816161928191214192