Demonstrate the BinomialTheorem for the doggy problem.
The example is taken from:
Nahin, P. J., "Duelling Idiots and Other Probability Puzzlers,"
Princeton University Press.
------------------------------------------------------------------------
See also Plot2D, BinomialTheorem
------------------------------------------------------------------------
births = [2 4 8 16 32 64 128];
pC = zeros(1,length(births));
for j = 1:length(births)
pC(j) = BinomialTheorem( births(j), births(j)/2, 0.5 );
end
Plot2D( births, pC, 'Births', 'Probability', 'Probability of Half Male Half Female Births')
set( gca, 'xlim', [0 births(end)], 'xtick', births )