% LMex040310_4th.m
% Example 4.3.10 Swampwater Tech Elevator Pages 312-313 in
% Larsen & Marx (2006) Introduction to Mathematical Statistics, 4th edition
% Based on LMex040306_4th.m
% Written Fall 2010 by Eugene Gallagher for EEOS601 Revised: 1/8/11
% Eugene.Gallagher@umb.edu
% http://alpha.es.umb.edu/faculty/edg/files/edgwebp.html
% Swampwater Tech elevators have a maximum capacity of 2400 lb. Suppose
% that ten Swampwater Tech football players enter the elevator and that the
% football player weights are normally distributed with mean = 220 lb and
% standard deviation = 20 lb. What is the probability that there will be 10
% fewer football players at tomorrow's practice.
mu=220;
sigma=20;
n=10;
P=1-normcdf(240,mu,20/sqrt(n));
fprintf('\nThe probability of an elevator collapse is %4.2g.\n',P)
P2=1-normcdf(2400,mu*n,sqrt(n)*20);
fprintf('\nThe probability of an elevator collapse is %4.2g.\n',P2)
% If 11 players baoarded the elevator
n=11;
P3=1-normcdf(2400,mu*n,sqrt(n)*20);
fprintf('\nIf 11 players entererd the elevator, the expected weight \n')
fprintf('is %4.0f lb, and the probability of collapse is %5.3f.\n',...
mu*11, P3);