【十大概率密度函数】一.二项分布
x=0:10;
y=binopdf(x,10,0.4);
plot(x,y,'*')
![十大概率密度函数](https://img.it610.com/image/info8/5bb45a09e8ed426cbee91b358b7295dd.jpg)
文章图片
二.卡方分布
x=0:0.3:10;
y=chi2pdf(x,4);
plot(x,y)
![十大概率密度函数](https://img.it610.com/image/info8/1bcba291a2d947f7aef420da37d4ce5d.jpg)
文章图片
三.非中心卡方分布
x=(0:0.2:10)';
p1=ncx2pdf(x,3,2);
p=chi2pdf(x,3);
plot(x,p,'-',x,p1,'--')
![十大概率密度函数](https://img.it610.com/image/info8/d935ac254b1d481eb8ec06ef0ab996b2.jpg)
文章图片
四.指数分布
x=0:0.2:10;
y=exppdf(x,3);
plot(x,y,'-')
![十大概率密度函数](https://img.it610.com/image/info8/a2c7aa69ace84d5aaf2822503b20b207.jpg)
文章图片
五.正态分布
x=-3:0.2:3;
y=normpdf(x,0,1);
plot(x,y,'--')
![十大概率密度函数](https://img.it610.com/image/info8/77f3a82e655c4d82828a33118493ca4d.jpg)
文章图片
六.对数正态分布
x=(10:100:125010)';
y=lognpdf(x,log(20000),2.0);
plot(x,y)
set(gca,'xtick',[0 20000 50000 90000 140000])
set(gca,'xticklabel',str2mat('0','$20000','$50000','$90000','$140000'))代码片
![十大概率密度函数](https://img.it610.com/image/info8/bc93a1a0c31f4f65bcb45223838b770a.jpg)
文章图片
七.F分布
x=0:0.02:10;
y=fpdf(x,5,4);
plot(x,y)
![十大概率密度函数](https://img.it610.com/image/info8/2299487e990f4dbfb19b48e4f303b30b.jpg)
文章图片
八.非中心F分布
x=0:0.02:10.02;
p1=ncfpdf(x,4,20,5);
p=fpdf(x,4,20);
plot(x,p,'-',x,p1,'--')
![十大概率密度函数](https://img.it610.com/image/info8/23e3210a59344fdda6b8e0322880e93d.jpg)
文章图片
九.负二项分布
x=(0:10)';
y=nbinpdf(x,3,0.5);
plot(x,y,'--')
![十大概率密度函数](https://img.it610.com/image/info8/f771263619d840c9bd916b19cd5fa2b4.jpg)
文章图片
10.绘制卡方分布密度函数在自由度分布为3,6,9的图形
x=0:0.5:10;
y1=chi2pdf(x,3);
plot(x,y1,'-');
hold on
y2=chi2pdf(x,6);
plot(x,y2,'--');
y3=chi2pdf(x,9);
plot(x,y3,'-');
axis([0 10 0 0.3])
![十大概率密度函数](https://img.it610.com/image/info8/0bd4888ce19441408f6869175c50e8dc.jpg)
文章图片