%!demo
%! ## Compute the mean for different Multinomial distributions
%! pd1 = MultinomialDistribution ([0.4, 0.3, 0.3]);
%! pd2 = MultinomialDistribution ([0.2, 0.2, 0.2, 0.2, 0.2]);
%! mean1 = mean (pd1)
%! mean2 = mean (pd2)
%!
%! ## This shows how to compute the expected value for Multinomial
%! ## distributions with different probabilities, representing the average
%! ## outcome index in categorical data.
