% pdf of chi2, t, F
clear all
close all

  disp('Chi2, t, F')
  lw = 2; 
  set(0, 'DefaultAxesFontSize', 16);
  fs = 15;
  msize = 10;
%
t0 = 0:0.01:40;
figure(1)
plot(t0, chi2pdf(t0,5),'LineWidth',lw)
hold on
plot(t0, chi2pdf(t0,10),'--','LineWidth',lw)
plot(t0, chi2pdf(t0,20),'-.','LineWidth',lw)
plot(t0, normpdf(t0, 20, sqrt(2*20)), 'r:','LineWidth',lw)
legend('\chi^2_5','\chi^2_{10}', '\chi^2_{20}','N(20,40)')
%print -deps 'C:/Brani/Courses/bmestatu/BMESBOOK/norm/chi2dens.eps'


t1= -4:0.005:4;
figure(2)
plot(t1, tpdf(t1, 2),'k-','LineWidth',lw)
hold on
plot(t1, tpdf(t1, 6),'b-','LineWidth',lw)
plot(t1, normpdf(t1),'r:','LineWidth',lw)
legend('t_2', 't_6','N(0,1)')
%print -depsc 'C:/Brani/Courses/bmestatu/BMESBOOK/norm/tdens.eps'


t2 = 0:0.005:5;
figure(3)
plot(t2, fpdf(t2, 5, 10),'LineWidth',lw )
%print -deps 'C:/Brani/Courses/bmestatu/BMESBOOK/norm/fdens.eps'