% LMcs090402_4th.m
% Written by Eugene.Gallagher@umb.edu
% Calls Gallagher's binom2sample.m
% Written October 2010
[D,phat,z,pvalue,CI,obsp]=binom2sample(55,160,60,192,0.05);
fprintf('The expected joint probability is %6.4f\n',phat)
fprintf('The z statistic is %6.4f with two-tailed p = %6.4f\n',z,pvalue)
fprintf('The observed proportions were %6.4f and %6.4f\n',obsp)
fprintf(...
'The difference in proportions is %6.4f with confidence interval: %6.4f %6.4f\n',D,CI) 