close all clear all r=0.01; r2=1-r/2; mu=0.574; v=0.008; n=6; n1=n-1; ho_min=mu-sqrt(v)*tinv(r2,n1)/sqrt(n1); ho_max=mu+sqrt(v)*tinv(r2,n1)/sqrt(n1); x=[-5:0.001:5]; x1=[-5:0.001:1.5]; figure('PaperUnits','normalized', 'PaperPosition',[ 0 0 1 1 ]) %,'visible','off') a=area(x1,tpdf(x1,n1),'linewidth',2,'FaceColor',[0.9 0.2 0]) b=get(a,'children'); alpha(b,0.9); axis([-5 5 0 0.4]) hold on grid on plot(x,tpdf(x,n1),'linewidth',5) set(gca,'plotboxaspectratio',[1.5 1 1],'fontsize',20,'linewidth',4,... 'xtick',[ 0 ],'xticklabel',[ 0 ],'ytick',[]) text(1.5,-0.025,'t_0','fontsize',24) xlabel(' t','fontsize',20) ylabel('T(t)','fontsize',20) legend('Intégrale de - \infty à t_0 de T(t)','Distribution de Student') print -depsc Student_graph_deg.eps for i=0:0.1:5 k=0; for j=0:0.01:0.09 k=k+1; if i==0 & j==0 t(k)=0.5 else t(k)=tcdf(j+i,n1); end end fprintf('%4.2f & %8.5f & %8.5f & %8.5f & %8.5f & %8.5f & %8.5f & %8.5f & %8.5f & %8.5f & %8.5f \\\\ \n',... i,t(1),t(2),t(3),t(4),t(5),t(6),t(7),t(8),t(9),t(10)) end minf=-1.5; msup=1.5; x2=[minf:0.001:msup]; figure('PaperUnits','normalized', 'PaperPosition',[ 0 0 1 1 ]) %,'visible','off') plot(x,tpdf(x,n1),'b','linewidth',3) hold on plot(x,tpdf(x+0.22,n1),'r','linewidth',3) a1=area(x2,tpdf(x2+0.22,n1),'linewidth',2,'FaceColor',[0.9 0.2 0]) b1=get(a1,'children'); alpha(b1,0.9); plot(x,tpdf(x-2.22,n1),'g','linewidth',3) a2=area(x2,tpdf(x2-2.22,n1),'linewidth',2,'FaceColor',[0.4 0.9 0]) b2=get(a2,'children'); alpha(b2,0.99); xlabel(' t','fontsize',20) ylabel('T(t)','fontsize',20) set(gca,'plotboxaspectratio',[1.5 1 1],'fontsize',20,'linewidth',4,... 'xtick',[minf msup],'xticklabel',{'Minf';'Msup'},'ytick',[]) legend('La machine fonctionne bien','La machine fonctionne mal',... 'Erreur \beta associée','la machine fonctionne très mal','Erreur \beta associée') print -depsc Erreur_beta.eps