The daily consumption of water in millions of gallons in a c
Solution
a) given water tower of the city has a daily capacity of 15 million gallons
the probability that this water supply will be inadequate on the given day i.e., supply is less than requirement is P(x<15)
>> fun = @(x) (1/9)*x.*exp(-x/3);
>> integral(fun,15,Inf)
ans =
0.0404
b) if the daily capacity is increased to 16 probability of adequate is given by P(x>16)
the following matlab comands are used for the calculation of P(x<16)
fun = @(x) (1/9)*x.*exp(-x/3);
>> integral(fun,0,16)
ans =
0.9694
therefore 1-p(x<16)=1-0.9694=0.0306
it changed to 17
integral(fun,0,17)
ans =
0.9769
1-p(x<17)=1-0.9769=0.0231
if capacity is changed to 18
fun = @(x) (1/9)*x.*exp(-x/3);
>> integral(fun,0,18)
ans =
0.9826
1-p(x<18)=1-0.9826=0.0174
if capacity is changed to 19
fun = @(x) (1/9)*x.*exp(-x/3);
>> integral(fun,0,19)
ans =
0.9870
1-p(x<19)=1-0.9870=0.0130
if capacity is changed to 20
fun = @(x) (1/9)*x.*exp(-x/3);
>> integral(fun,0,20)
ans =
0.9902
1-p(x<20)=1-0.9902=0.0098

