close all;

x = -350:350;
x = x/100;
%y = cdf('norm',x,0,1);
y = exp(-x.^2/2)/sqrt(2*pi);
figure(1);
hold off;
fill([x(351-300:351+300) x(351+300) x(351-300)], [y(351-300:351+300) 0 0], [0.0 0.7 1.0]);
hold on;
fill([x(351-200:351+200) x(351+200) x(351-200)], [y(351-200:351+200) 0 0], [0.5 0.8 1.0]);
fill([x(351-100:351+100) x(351+100) x(351-100)], [y(351-100:351+100) 0 0], [0.8 0.9 1.0]);
plot(x,y)
plot([0 0],[-100 100], 'k-')
plot([-100 100], [0 0], 'k-')
xlim([-3.5 3.5]);
ylim([0.0 1.1/sqrt(2*pi)]);
axis manual;
text(-0.05,-0.03,'$\bar{x}$','Interpreter','latex');
text(0.83,-0.03,'$\bar{x}+s$','Interpreter','latex');
text(1.83,-0.03,'$\bar{x}+2s$','Interpreter','latex');
text(2.83,-0.03,'$\bar{x}+3s$','Interpreter','latex');
text(-1.17,-0.03,'$\bar{x}-s$','Interpreter','latex');
text(-2.17,-0.03,'$\bar{x}-2s$','Interpreter','latex');
text(-3.17,-0.03,'$\bar{x}-3s$','Interpreter','latex');
ylabel('Normal Density');
title('Figure 2.9: Bell Curve');
set(gca,'xtick',[]);
set(gca,'ytick',[]);

