% LMex020705_4th.m
% Example 2.7.5 p 116-117 in
% Larsen & Marx (2006) Introduction to Mathematical Statistics, 4th edition
% Writtten by Eugene Gallagher, Eugene.Gallagher@umb.edu
% http://alpha.es.umb.edu/faculty/edg/files/edgwebp.html
% Written 1/16/2011 & last revised 1/16/2011
% Tarzan gives Cheetah the following letters
% AAA EE I J K L NN R T Z
% What is the probability that Cheetah arranges the letters to spell
% TARZAN LIKE JANE, ignore spaces
% using multinomial coefficients
DATA = [3 2 2 1 1 1 1 1 1 1];
format rat
1/exp(sum(DATA)*brillouin(DATA))
% or
exp(gammaln(4)+2*gammaln(3)-gammaln(15))
format