function bindem2(p)
x=0:25;
n=5;
bar(x,  binopdf(x,n,p),'r' )
title('Binomial Distributions, fixed p')
xlabel('x')
ylabel('Probability of x')
gtext(['red. Bin, n= ' num2str(n) ' p= ' num2str(p)])
hold on
n=2*n;
bar(x, binopdf(x,n,p),'g')
gtext(['green. Bin, n= ' num2str(n) ' p= ' num2str(p)])
n=2*n;
bar(x, binopdf(x,n,p),'b')
gtext(['blue. Bin, n= ' num2str(n) ' p= ' num2str(p)])
n=2*n;
bar(x, binopdf(x,n,p),'y')
gtext(['yellow. Bin, n= ' num2str(n) ' p= ' num2str(p)])
hold off
figure
n=5;
stairs(x,  binocdf(x,n,p) )
title(' Cumulative Distribution Functions')

gtext([' Bin, n= ' num2str(n) ' p= ' num2str(p)])
hold on
n=2*n;
stairs(x, binocdf(x,n,p))
gtext([' Bin, n= ' num2str(n) ' p= ' num2str(p)])
n=2*n;
stairs(x, binocdf(x,n,p))
gtext([' Bin, n= ' num2str(n) ' p= ' num2str(p)])
n=2*n;
stairs(x, binocdf(x,n,p))
gtext([' Bin, n= ' num2str(n) ' p= ' num2str(p)])

hold off