概率论上机实验报告
一、实验内容
1、列出常见分布的概率密度及分布函数的命令,并操作。
分布Matlab中的函数名 名称 正态解析表达式 分布 指数分布 均匀分布 伽玛分布 t分布 F分布 韦伯分布 二项分布 泊松分布 几何分布 超几何分布 2、掷硬币150次,其中正面出现的概率为,这150次中正面出现的次数记为X,
(1) 试计算X=45的概率和X≤45的概率; (2) 绘制分布函数图形和概率分布律图形。
binopdf(45,150,%计算X=45的概率 binocdf(45,150,%计算X<=45的概率 x=0:1:150;
y1=binopdf(x,150,; y2=binocdf(x,150,; subplot(1,2,1);
plot(x,y1); %概率密度分布图 subplot(1,2,2); plot(x,y2); %分布函数图
运行结果:
3、用Matlab软件生成服从二项分布的随机数,并验证泊松定理。 binornd(2000,,1,20) %产生二项分布随机数 x=0:1:200;
y1=binopdf(x,200,; y2=binopdf(x,2000,; y3=binopdf(x,20000,; y4=poisspdf(x,80); subplot(1,3,1); plot(x,y1,'^r'); hold on
plot(x,y4,'.');%λ=80时与泊松分布对比 subplot(1,3,2); plot(x,y2,'^r'); hold on
plot(x,y4,'.');%λ=800时与泊松分布对比 subplot(1,3,3); plot(x,y3,'^r'); hold on
plot(x,y4,'.');%λ=8000时与泊松分布对比 运行结果: ans =
83 89 84 93 81 101 87 79 84 81 97 81
66 84 81 70 88 65 82 79 4、设概率密度图像。
x=-4::4; y=-4::4;
[xb,yb]=meshgrid(x,y); zb=exp*(xb.^2+yb.^2))/(2*pi); mesh(xb,yb,zb)
是一个二维随机变量的联合概率密度函数,画出这一函数的联合
运行结果:
5、来自某个总体的样
如下,计算样本的样本均值、样本方差、画出频率直方图。
A=[16 25 19 20 25 33 24 23 20 24 25 17 15 21 22 26 15 23 22
20 14 16 11 14 28 18 13 27 31 25 24 16 19 23 26 17 14 30 21 18 16 18 19 20 22 19 22 18 26 26 13 21 13 11 19 23 18 24 28 13 11 25 15 17 18 22 16 13 12 13 11 09 15 18 21 15 12 17 13 14 12 16 10 08 23 18 11 16 28 13 21 22 12 08 15 21 18 16 16 19 28 19 12 14 19 28 28 28 13 21 28 19 11 15 18 24 18 16 28 19 15 13 22 14 16 24 20 28 18 18 28 14 13 28 29 24 28 14 18 18 18 08 21 16 24 32 16 28 19 15 18 18 10 12 16 26 18 19 33 08 11 18 27 23 11 22 22 13 28 14 22 18 26 18 16 32 27 25 24
本观察值
西安交大概率论上机实验报告



