% LMex030206_4th.m
% Larsen & Marx (2006) 4th edition Example 3.2.6, page 142 in 
% Larsen & Marx (2006) Introduction to Mathematical Statistics, 4th edition
% P = probability of a hung jury 
% Given that 2 of the 25 jurors in the jury pool would vote 'not guilty'
% and 23 of 25 would vote guilty
% What is the probability of observing a hung jury?
% Written by Eugene.Gallagher@umb.edu, written in 2001, revised 1/12/11
% http://alpha.es.umb.edu/faculty/edg/files/edgwebp.html
% Can be solved in a number of mathematically identical one-liners.
P=hygepdf(1,25,2,12)+hygepdf(2,25,2,12)
% or combining in one matlab statement.
P=sum(hygepdf(1:2,25,2,12))
% or using the complement of the probability that no jurors would vote
% guilty:
P=1-hygepdf(0,25,2,12);
