Matlab中F分布、卡方分布、t分布的关系

时间:2021-07-09 11:37:33

标签: matlab

我想制作一些Matlab图片,可以确认以下众所周知的关系

enter image description here

这是我对第一个关系的尝试

clear
m=30;
n=1000; %almost inf
x = 0:.1:20;
pdf_F=m*pdf('F', x, m, n);   
plot(x,pdf_F,'LineWidth',2)
hold on
pdf_Chisquare=pdf('Chisquare', x, m)/m;
plot(x,pdf_Chisquare,'LineWidth',2)
hold off
legend('m*F_{m,\infty}',   'X^2_m')

产生这张图片enter image description here

这是我对第一个关系的尝试

clear
m=30;
x = 0:.1:20;
pdf_F=pdf('F', x, 1, m);   
plot(x,pdf_F,'LineWidth',2)
hold on
pdf_T=(pdf('T', x, m)).^2;
plot(x,pdf_T,'LineWidth',2)
hold off
legend('F_{1,m}',   't^2_m')

产生这张图片enter image description here

图片无法证实开头所述的关系。你能帮我修复代码吗?

0 个答案:

没有答案