% LMFig120202_4th.m
% Modified from Example 4.3.7 Mensa & IQ Pages 309-310 in
% Larsen & Marx (2006) Introduction to Mathematical Statistics, 4th edition
% Based on LMex040306_4th.m
% Written Fall 2010 by Eugene Gallagher for EEOS601 Revised: 2/15/11
% Eugene.Gallagher@umb.edu 
% http://alpha.es.umb.edu/faculty/edg/files/edgwebp.html
% What does the critical cutoff for the F distribution look like?
% Use the inverse of the normal pdf to find the IQ cutoff for the upper 2%
% of the population 0.98=(1-0.02)
% Plot Figure 12.2.2
X=0:.01:4.5;
Y = fpdf(X,3,20);
plot(X,Y,'-k');
axis([0 4.5 0 0.8]);title('Figure 12.2.2','FontSize',20);
ax1=gca;
xlabel('y','FontSize',16),
ylabel('f_{F_{3,20}}(y)','FontSize',16);
ax1=gca;
set(ax1,'xtick',3.1,'FontSize',14);
hold on;
xf=3.1:.01:4.5;yf=fpdf(xf,3,20);
fill([3.1 xf 4.5]',[0 yf 0]',[.8 .8 1])
text(1,0.1,'Area=0.95','FontSize',18);
text(3.1,0.1,'Area=0.05','FontSize',18)
figure(gcf);pause
hold off;