close all
clear all

x= -3:0.002:3;
z = normpdf(x);
y = tpdf(x, 2);
figure(1) %----------------------------------------------------------------
plot(x,y, 'k-','linewidth',3)
hold on
plot(x,z, 'k:','linewidth',2)
plot([-3 3],[0 0],'k-')
axis([-3 3 -0.2 0.45])
xx = -2:0.002:2;
yy = tpdf(xx,2);
fill([-2 xx 2], [0 yy 0], 'y')
plot(x,y, 'k-','linewidth',3)
set(gca,'XTick',[],'YTick',[])
%-----------------marker dots-----------------------------------------
plot([0 0],[0 0.4],'k:','linewidth',2)
plot(0,0,'-mo', 'LineWidth',2,'MarkerEdgeColor','k',...
                'MarkerFaceColor',[.49 1 .63],'MarkerSize',10)
 plot(-2,0,'-mo', 'LineWidth',2,'MarkerEdgeColor','k',...
                'MarkerFaceColor',[.49 1 .63],'MarkerSize',10)  
 plot(2,0,'-mo', 'LineWidth',2,'MarkerEdgeColor','k',...
                'MarkerFaceColor',[.49 1 .63],'MarkerSize',10)       
%--------------------------------------------------------------------------
% text(0.05,0.03,'\fontsize{25} \mu')
% text(-1.05,0.02,'\fontsize{25} a')
% text(1.95,0.02,'\fontsize{25} b')

text('Interpreter','latex',...
	'String','$$\mu$$',...
	'Position',[0.15 .03],...
	'FontSize',25)
text('Interpreter','latex',...
	'String','$$\mu - t_{n-1,1-\alpha/2} \, \frac{s}{\sqrt{n}}$$',...
	'Position',[-2.9   -.07],...
	'FontSize',20)

  xw = 0.36:0.02:0.65; yw = tpdf(xw,2); %whiten!
  plot(xw, yw, 'w-', 'linewidth',4)
 xw = 0.34:0.02:0.95; yw = normpdf(xw); %whiten!
  plot(xw, yw, 'w-', 'linewidth',4)

text('Interpreter','latex',...
	'String','$$\mu + t_{n-1,1-\alpha/2} \, \frac{s}{\sqrt{n}}$$',...
	'Position',[0.7  -.07],...
	'FontSize',20)

text('Interpreter','latex',...
	'String','$$\frac{\bar X - \mu}{s/\sqrt{n}} \sim t_{n-1}$$',...
	'Position',[0.4 .34],...
	'FontSize',20)

text('Interpreter','latex',...
	'String','$$1 - \alpha$$',...
	'Position',[-0.6  0.15],...
	'FontSize',30)


print -depsc 'C:\Springer\Estim\Estimeps\ci02.eps'

