y=[1 2 3 4];
x=[.25 .25 .25 .25];
bar(y,x)
axis([0 5 0 .5])
title('Population Distribution N=4')
xlabel('X')
ylabel('p(x)')
pause
clf
y=[2 3 4 5 6 7 8]/2;
x=[1 2 3 4 3 2 1]/16;
bar(y,x)
axis([0 5 0 .5])
title('Sampling Distribution n=2')
xlabel('X')
ylabel('p(x)')
pause
clf
y=[3 4 5 6 7 8 9 10 11 12]/3;
x=[1 3 6 10 12 12 10 6 3 1]/64;
bar(y,x)
axis([0 5 0 .5])
title('Sampling Distribution n=3')
xlabel('X')
ylabel('p(x)')
pause
clf
clf
y=[ 4 5 6 7 8 9 10 11 12 13 14 15 16]/4;
x=[1 4 10 20 31 40 44 40 31 20 10 4 1]/256;
bar(y,x)
axis([0 5 0 .5])
title('Sampling Distribution n=4')
xlabel('X')
ylabel('p(x)')
pause
clf
