Probability and Statistics Homework Solutions
Probability and Statistics Homework Solutions
i =3 i
b. What is the expected number of free lines at any time during this
period?
Sol’n: The mean (expected value) of a random variable having a
binomial distribution is np, which in this instance is 6(0.25) =1.5
c. You need to make three calls to this exchange, and each time you
receive a busy signal you try again. What is the probability that you
require exactly six tries in order to complete your three calls?
Sol’n: Consider each call to the exchange to be a Bernouilli “trial”, and
Tk the number of the call on which you receive a free line for the kth
time. Then Tk has a Pascal Distribution (or, for the special case of k=1,
a geometric distribution). The required probability is therefore
6 − 1
P {T 3 = 6} = (0.25)3(1 − 0.25)6− 3
3− 1
= 0.1318 + 0.0326 + 0.0044 + 0.0002
= 0.0659
P {N 10 = 0} = 1− = 0.2631
0 8 8
P {N 10 = 2} = 1− = 0.2416
2 8 8
= 1 - [0.2631+0.3758+0.2416]
= 0.1195
3. A light bulb in an apartment entrance fails randomly, with an expected
lifetime of 20 days, and is replaced immediately by the custodian. Assume
that this bulb's lifetime has an exponential distribution.
a. What is the probability that a bulb lasts longer than its expected
lifetime?
Sol’n: T1, the lifetime of the first bulb (i.e., the time of the first
failure), has exponential distribution with parameters λ =1 failure/20
days, i.e., the failure rate is 0.05 failures/day.
( ) 20) = 0.3679
P {T 1 > 20} = e 20 (
− 1
b. If the current bulb was inserted 10 days ago, what is the probability
that its lifetime (since it was inserted) will exceed the expected
lifetime of 20 days?
Sol’n: Because of the Memoryless Property of the exponential
distribution, the time between the 10th day and the failure again has
the same exponential distribution as T1. Therefore, since the
probability that the time from day 10 until the failure will exceed ten
days is
( ) (10)
P {T 1 > 10} = e 20
− 1
= 0.6065 ,
the probability that the total lifetime will exceed 20 days, given that it
is at least 10 days, is 60.65%.
d. If the custodian has 2 spare bulbs, what is the probability that these
(including the one currently in use) will be sufficient for the next 60
days?
Sol’n: Consider the Poisson process in which an event is defined to be
a failure of a bulb. Then the number of events during a 60-day period
will have the Poisson Distribution with rate λ =1 event per 20 days,
i.e., 1/20 = 0.05 events/day. The two spare bulbs will be sufficient for
the next 60 days, provided that the number of bulb failures is not
greater than 3. According to the formula for the Poisson distribution
with λ = 0.05 events/day and t=60 days is
P {N 60 ≤ 3} = 0.6472
•••••••••••••••••••••••••••• Homework # 2 ••••••••••••••••••••••••••••••••
up a hitchhiker is p=4%, i.e, an average of one in twenty-five drivers will stop;
different drivers, of course, make their decisions whether to stop or not
independently of each other.
2. Given that a hitchhiker has counted 15 cars passing him without stopping, what
is the probability that he will be picked up by the 25th car or before?
( )
= 0.04 0.96 + 0.961 + 0.962 +...... +0.969 =0.33517
0
Suppose that the arrivals of the cars form a Poisson process, at the average rate of 15
per minute. Define "success" for the hitchhiker to occur at time t provided that both
an arrival occurs at t and that car stops to pick him up. Let Y1 be the time (in
seconds) of the first "success", i.e., the time that he finally gets a ride, when he
begins his wait at time t =0.
7. What is the probability that he must wait less than 2 minutes for a ride (P{Y1<
2}? ___0.6988__
Soln: The CDF (cumulative distribution function) for Y1, which has
the exponential distribution, is
F(t) = P {Y 1 ≤ t } = 1 − e − λt where λ = 0.6.
Another equivalent approach:
{ } { }
If P T n < t is true, then P N t ≥ n is true, i.e., P {T n < t } ⇒ P {N t ≥ n}
P {T 1 < 2} = P {N 2 ≥ 1} = 1− P {N 2 < 1} = 1 − P {N 2 = 0}
−(0.6)(2) {(0.6)(2) }
0
=1- e = 0.6988
0!
8. What is the probability that he must wait more than 2 minutes for a ride(P{Y1>
2}? Soln: ___0.3012___
P {Y 1 > 2} = 1− P {Y 1 ≤ 2} = 1− F (2) = e ( ) = 0.3012
− 0.6 2
Equivalently,
Using the property " P {T n > t } ⇔ P {N t < n} "
−(0.6)(2) {(0.6)(2)}
0
9. What is the probability that he must wait exactly 2 minutes for a ride? (P{Y1=
2}? Soln: ____0_____.
The probability that the event occurs in a time interval of length zero
is zero!
Suppose that after 2 minutes (during which 28 cars have passed by) the hitchhiker is
still there waiting for a ride.
10. What is the conditional expected value of Y1 (expected total waiting time,
given that he has already waited 2 minutes). ____3.6667___
Soln: Because of the memoryless property of the Exponential
distribution, the expected additional time until a car stops is identical
to the original expected time until the car stops. That is, he now
1
expects to wait a total of 2+ E (T ) = 2 + = 3.6667
1 0.6
Note: Your solutions to #11, 12, 14, and 15 below will vary
because of the different random number seed used in the
simulation!
11. Using the first four digits of your ID number as the "seed" for the "Midsquare"
technique, generate a sequence of 10 pseudo-random numbers R1, R 2, ... R10
uniformly distributed in the interval [0,1].
i Xi Xi 2 Ri
1 4852 23541904 0.5419
2 5419 29365561 0.3655
3 3655 13359025 0.3590
4 3590 12888100 0.8881
5 8881 78872161 0.8721
6 8721 76055841 0.0558
7 0558 00311364 0.3113
8 3113 09690769 0.6907
9 6907 47706649 0.7066
10 7066 49928356 0.9283
12. Using the "Inverse Transformation" technique and the 10 numbers generated in
(10.), generate the interarrival times τ1, τ2, ... τ10 for the first ten cars with
arrival rate λ = 15/minute, and then the arrival times T1, T2, ... T10 of those ten
cars.
Soln:
i Ri τi Ti
1 0.5419 0.05204452 0.05204452
2 0.3655 0.03032787 0.08237238
3 0.3590 0.02964839 0.11202077
4 0.8881 0.14600998 0.25803075
5 0.8721 0.13710044 0.39513119
6 0.0558 0.00382782 0.39895901
7 0.3113 0.02486330 0.42382231
8 0.6907 0.07822957 0.50205188
9 0.7066 0.08174789 0.58379978
10 0.9283 0.17568430 0.75948408
ln R ln 1− R
( Since τ = − i =− i , where τ is the interarrival time,
i
i λ λ
i.e., τ1 =T1, τ2 = T2 - T1, τ3 = T3 - T2, etc., so that the arrival times are
T1=τ1, T2=τ1 + τ2, T3=τ1+ τ2 + τ3, etc.)
13. What is the expected number of arrivals during the first 20 seconds?
= (15 / min)( 1 min) = 5
Soln: E N
1/3 3
14. What is the actual # of arrivals during the first 20 seconds of your simulation?
Soln: 4 arrivals in the first 20 seconds. ( Since the 5th arrival
occurs at 0.3952 minutes which is later than 0.3333 minutes(= 20
seconds). )
15. What is the probability that you would observe exactly this number of arrivals
in this Poisson process? 0.1755 .
Soln:
{(15)(1 / 3)}
4
54
{ }
P N 1/3 = 4 = e −(15)(1/ 3)
4!
= e −5
4!
= 0.1755
GEN,BRICKER,BANKTELLERS,9/12/1996,,,,,,,72;
LIM,2,1,50;
INIT,0,480;
NETWORK;
CREATE,EXPON(3.0),,1;
QUE(1),0,4,BALK(OVFLO);
ACT(1)/1,EXPON(2.0);
COLCT,INTVL(1),CUSTOMER_TIME,20/.5/.5;
TERM;
OVFLO COLCT,ALL,OVERFLOW;
TERM;
END;
FIN;
S L A M I I S U M M A R Y R E P O R T
**FILE STATISTICS**
ACT ACT LABEL OR SER AVERAGE STD CUR AVERAGE MAX IDL MAX BSY ENT
NUM START NODE CAP UTIL DEV UTIL BLOCK TME/SER TME/SER CNT
GEN,BRICKER,BANKTELLERS,9/12/1996,,,,,,,72;
LIM,2,1,50;
INIT,0,480;
NETWORK;
CREATE,EXPON(3.0),,1;
QUE(1),0,4,BALK(OVFLO);
ACT(2)/1,EXPON(2.0);
COLCT,INTVL(1),CUSTOMER_TIME,20/.5/.5;
TERM;
OVFLO COLCT,ALL,OVERFLOW;
TERM;
END;
FIN;
S L A M I I S U M M A R Y R E P O R T
**FILE STATISTICS**
ACT ACT LABEL OR SER AVERAGE STD CUR AVERAGE MAX IDL MAX BSY ENT
NUM START NODE CAP UTIL DEV UTIL BLOCK TME/SER TME/SER CNT
1 QUEUE 2 .785 .79 0 .00 2.00 2.00 179
••••••••••••••••••••••••••••••
a. How many cars were unable to enter the queue each day, because the queue was
filled to capacity?
Case A: 1 Case B: none
b. What fraction of the time was each teller busy each day?
Case A: 67.9 % Case B: 39.25 %
c. Estimate the mean (average) time in the system for the customers.
Case A: 5.86 min . Case B: 2.37 min.
d. What fraction of the customers spend more than 5 minutes (total of both waiting
and being served) at the bank?
Case A: 72 / 158 = 45.6% Case B: 17 / 179 = 9.5%
The average number of arrivals was 3.8/hour. We wish to test the "goodness-of-fit"
of the assumption that the arrivals correspond to a Poisson process with arrival rate
3.8/hour. The first step is to compute the probability of each observed value, 0
through 9:
0.1943588
a. What is the value missing above? (That is, the probability that the number of
arrivals is exactly 4.)
(3.8)4
e −3.8 = 0.1943588
4!
d. Ignoring the suggestion that cells should be aggregated so that they contain at
least five observations, what is the observed value of
2
D= Σi
Ei -Oi
Ei
?
Soln: 7.8241705
e. Keeping in mind that the assumed arrival rate λ =3.8/hour was estimated from
the data, what is the number of "degrees of freedom"?
Soln: 8 (=10-1-1) degrees of freedom
f. Using a value of α = 5%, what is the value of the quantity
2
χ
5% such that D
χ2
exceeds 5% with probability 5% (if the assumption is correct that the
arrivals form a Poisson process with arrival rate 3.8/hour)?
Soln: 15.507
2
g. Is the observed value greater than or less than 5% ? χ
χ 2
Soln: D (=7.82) < 5% (=15.507)
Should we accept or reject the assumption that the arrival process is Poisson
with rate 3.8/hour?
Soln: Accept the assumption that the arrival process is Poisson with rate
3.8/hour.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2. Consider again the SLAM II example of the garment factory with 50 sewing
machine operators and machines, 54 machines (including 4 backup machines) and
3 repairmen. The original system was modeled by the following SLAM statement.
Note that the time units are hours, and that the system is simulated for 2000 hours,
i.e., 50 weeks of 40 hours each.
GEN,BRICKER,GARMENTFACTORY,9/18/1996,,,,,,,72;
LIM,2,,55;
INIT,0,2000;
NETWORK;
Q1 QUE(1),4;
ACTIVITY(50)/1,EXPON(157);
Q2 QUE(2);
ACTIVITY(3)/2,UNFRM(4,10),,Q1;
END;
FIN;
The output of this SLAM model is
S L A M I I S U M M A R Y R E P O R T
**FILE STATISTICS**
ACT ACT LABEL OR SER AVERAGE STD CUR AVERAGE MAX IDL MAX BSY ENT
NUM START NODE CAP UTIL DEV UTIL BLOCK TME/SER TME/SER CNT
1 Q1 QUEUE 50 49.542 1.29 47 .00 10.00 50.00 649
2 Q2 QUEUE 3 2.236 .98 3 .00 3.00 3.00 642
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The modified example, in which the repair of the failed machines is subcontracted if
there are already two machines in the repair queue, is modeled by the SLAM
statements:
GEN,BRICKER,GARMENTFACTORY,9/18/1996,,,,,,,72;
LIM,2,,55;
INIT,0,2000;
NETWORK;
Q1 QUE(1),4;
ACTIVITY(50)/1,EXPON(157);
Q2 QUE(2),,2,BALK(SUB);
ACTIVITY(3)/2,UNFRM(4,10),,Q1;
SUB COLCT,BETWEEN,SUBCONTRACT;
ACTIVITY,UNFRM(20,30),,Q1;
END;
FIN;
The output of this SLAM model is
S L A M I I S U M M A R Y R E P O R T
**FILE STATISTICS**
ACT ACT LABEL OR SER AVERAGE STD CUR AVERAGE MAX IDL MAX BSY ENT
NUM START NODE CAP UTIL DEV UTIL BLOCK TME/SER TME/SER CNT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note: When “between” statistics are collected, the number of observations is the
number of intervals between arrival of entities, i.e., one less than the number of
arrivals!
Suppose that
• the hourly wage of a sewing machine operator (including benefits, etc.) is $15.
• the hourly wage of a machine repairman (including benefits, etc.) is $25.
• each machine operator (when busy) generates $27.50 per hour of revenue for
the company,
• the cost of subcontracting the repair of a machine is $250.
Speed s (mph) 20 30 40 50 60 70 80 90
Consumption C (mile/gal.) 11.4 17.9 22.1 25.5 26.1 27.6 29.2 29.8
It is suggested that the relationship between the two variables is of the form C = a + b/s.
a. Run the "Cricket Graph" software package (on the Macintosh), and enter the
above observed values of s and C (columns 1 and 2).
b. Plot the "scatter plot" of C versus s by choosing "scatter" on the Graph menu, and
specifying s on the horizontal axis and C on the vertical axis. Does the plot appear
to be linear? ___NO____
20 C
C
10
0 20 40 60 80 100
c. Choose "transform" from the "data" menu to create a new variable 1/s which is the
reciprocal of s. (Put this new variable into Column 3.)
d. Plot the "scatter plot" of 1/s (horizontal axis) versus C (vertical axis). Does the plot
appear to be linear? ___Yes ____
20 C
C
10
0.01 0.02 0.03 0.04 0.05 0.06
1/s
e. After plotting C versus 1/s, select "Simple" from the "Curve Fit" menu, in order to
fit a simple linear relationship between C and 1/s, i.e., to determine a and b such
that C ≈ a + b(1/s). What is the value of a? ___34.604 ___ of b? ___-476.94 ___
34.604 476.94
f. Another suggestion is that the relationship is of the form C = axb . Perform the
appropriate linear regression to fit a curve of this type. What is the value of a?
_2.14067(=e 0.76112 ) _ of b? __0.60572 _
3.2
3.0
ln C
ln C
2.8
2.6
2.4
2 3 4 5
ln s
y = 0.76112 + 0.60572x R^2 = 0.923
◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊
Next, start the shareware program “Curve Fit 0.7e ” (author: Kevin Raner) which
can be found on the “Public Software” fileserver of ICAEN. This program can
perform nonlinear regression directly, without first linearizing the function.
2.80000E+01
2.40000E+01
2.00000E+01
1.60000E+01
1.20000E+01
Next, enter the function “f(x) = a + b/x” and give initial values of 1 to the
parameters a & b . Then choose “Custom Fn” from the menu in order to find the
values of a & b which will minimize the sum of the squared errors, using a nonlinear
optimizing algorithm, e.g. a Quasi-Newton algorithm. (You may have encountered
this type of algorithm, e.g. Fletcher-Powell, in 57:021 “Principles of Design I”.) Be
sure to indicate that both a & b are to be selected:
h. What is the optimal fitted curve? C = (34.6 ) + (-477 ) / s. What is the SSE (sum of
the squared errors)? ___2.48990 ___
2.80000E+01
2.40000E+01
a=3.46E+01
b=-4.77E+02
2.00000E+01
1.60000E+01
Sum of Squares
=2.48990
1.20000E+01
and find the optimal curve of this type: C = 3.04 s0.519 . What is the SSE for this
fitted curve? 19.80037
2.80000E+01
2.40000E+01
a=3.04E+00
b=5.19E-01
2.00000E+01
1.20000E+01
j. You now have four candidate curves. Write them below, together with their SSE’s.
(You may need to compute the values of SSE for the curves fit by Cricket Graph
manually.)
C = asb SSE C = a + b/s SSE
--------------------------------------------------------------------------------------
Soln : The question was perhaps vague, in that “SSE” did not specify in which
equation the error was to be computed, i.e., ln Ci = ln a + b×ln s i or Ci = asbi . My
intention was the latter, i.e., the error in the original curve rather than the
linearized curve.
There is neglible difference between the SSE in the fitted curves of the form C = a +
b/s found by Cricket Graph and Curve Fit 0.7e. (This is because the objective
functions for the optimization are identical.)
However, this SSE is considerably smaller than that of the two fitted curves of the
form C = asb . Note that for the form C = asb , the SSE in the curve found by Curve Fit
0.7e is less (19.8 compared to 25.78) than that in the curve found by Cricket Graph.
(In these two cases, the objective functions were different, namely
8
∑
2
Minimize ln Ci - ln a + b×ln s i in the case of Cricket Graph,
i=1
8 2
Minimize ∑ Ci - as bi in the case of Curve Fit 0.7e.
i=1
To estimate the expected lifetime (and its standard deviation) by recording the failure
times of all 500 units would require perhaps several years, an excessive amount of
time. Hence, we wish to estimate the Weibull parameters u & k from only the data
above, and use these to estimate µ and σ.
b. Enter the observed values of t and R (failure time & reliability, i.e., the fraction
surviving) into the Cricket Graph program.
c. Using "transform" on the menu:
- compute ln t and place it into column 3 of the data matrix.
- compute R-1 and place it into column 4 of the data matrix.
- compute ln R-1 and place it into column 5 of the data matrix.
- compute ln (ln R-1) and place it into column 6 of the data matrix.
t # of failures NS FS % Surviving
(= NF ) ( = % FS)
5.00E+01 2.00E+00 4.98E+02 9.96E-01 9.96E+01
1.00E+02 6.00E+00 4.94E+02 9.88E-01 9.88E+01
1.50E+02 2.10E+01 4.79E+02 9.58E-01 9.58E+01
2.00E+02 4.70E+01 4.53E+02 9.06E-01 9.06E+01
2.50E+02 7.90E+01 4.21E+02 8.42E-01 8.42E+01
2.80E+02 1.00E+02 4.00E+02 8.00E-01 8.00E+01
d. Plot the scatter graph of the data, with ln t (column 3) on the horizontal axis,
and ln (ln R-1) (column 6) on the vertical axis. Do the points appear to lie on a
straight line?
Yes, the points appear to lie on a straight line.
-2
ln ( ln (1/R) )
-3
ln ( ln (1/R) )
-4
-5
-6
3 4 5 6
ln t
e. Fit a line to the points, using the Cricket Graph program. What is the equation
of the line? What is its slope and y-intercept?
The Equation is " y = -15.225 + 2.4244 x "
with slope 2.4244 and y-intercept -15.225
-2
ln ( ln (1/R) )
-3
ln ( ln (1/R) )
-4
-5
-6
3 4 5 6
ln t
y = - 15.225 + 2.4244x R^2 = 0.984
f. Based upon the fitted line, what are the parameters u & k of the Weibull
distribution? u = _______________ , k= _______________
k = slope = 2.4244 ≈ 2.4
µ Y = u ⋅Γ 1 +
1
Soln: k = (533.7353)(0.8865) = 473.1563 = expected lifetime
2
Γ 1+
σY k −1
= σY
Γ 21 +
µY 1 0.9407
= −1
k ⇒ 473.1563 (0.8865)2 = 0.4439 ⇒ σ Y = 210.0341
Note: The above evaluations of the Gamma function were done using the tables
which were e-mailed to the class (& put onto the web site).
400 2.4
−
F(400) = P{t ≤ 400} = 1 − e 533.7353
= 0.3937 ∴ 39.37 %
or using the "ProbLib" APL workspace on the macintosh, we can find that
the expected lifetime of the device is 473.1468,
the standard deviation of the device's lifetime is 209.9998, and
the probability that the device will fail during the first 400 hours is 0.3937
h. Using the parameters u & k, compute the expected number of failures (of the
100 units tested) in each of the intervals:
Observed Expected
Interval # failures # failures
0- 50 ___2___ __1.7__
50-100 ___4___ __7.2__
100-150 __15___ _14.3__
150-200 __26____ _22.0__
200-250 __32____ _29.55_
250-280 __21____ _21.0__
Note: The Weibull cumulative distribution function (CDF) may be evaluated
using the “ProbLib” APL workspace on the Macintosh, and used to calculate the
expected # of failures in the table above.
F(t) = 1− e ( )
− tuk
) (
− 1−e −( 0 u )
k
) = 0.0034
∴ E1 = 500p1 .= 1.7
p2 = F(t2 ) − F(t1 ) = F(100) - F(50) = 1 − e (
−(100 u )
) (
− 1 − e −( 50 u )
k k
) = 0.0144
∴ E1 = 500p1 .= 7.2
and so on ...
D = 2.43983215
k. The manufacturer wishes to state a warranty period such that 99% of the
units produced are expected to survive the warranty period. According to these
estimates of u & k, what should be the length of the warranty period ?
-1 1
Soln: Again, we solve F (p) = u - ln 1 -p k where u & k are as above, and
p = 1%. This gives us a warranty period of 80 days (more exactly, 80.0352 days)
◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊
Use the Curve Fit 0.7e software to try fitting a Weibull distribution in its original
(nonlinear) form. If x = upper limit of the intervals and y = fraction failed, then you
should enter the function f(x) = 1 - 2.718281828^(-(x/a)^b)
where a=u and b=k. (Note that Curve Fit allows only variables a, b, c, d, & e.)
m. Using as starting values for a & b the values which you found in (f), try fitting
the curve to the data. What are the values of a & b?
a = _______________ +/- __________________
b = _______________ +/- __________________
Was Curve Fit able to find values with small error estimates (e.g. with error less
than about 5 or 10% of the parameter)? ________
If yes, proceed to question (n); otherwise, stop.
Soln: According to the Curve Fit output, the parameters are
a = 533.73486 +/- 23.74058
b= 2.35061 +/- 0.13497
Yes, the Curve fit can find values with small error estimates.
2.00000E-01
1.60000E-01
1.20000E-01
8.00000E-02
4.00000E-02
1.00000E+02 2.00000E+02
Corr. Coeff. (R2) = 0.99607
Sum of Squares = 0.00013
n. What are the values of the parameters for this new fitted distribution?
u = 534 , k = 2.35
p. Using these new parameters u & k, compute the expected number of failures (of
the 100 units tested) in each of the intervals:
Observed Expected
Interval # failures # failures
0- 50 ________ _______
50-100 ________ _______
100-150 ________ _______
F(t) = 1− e ( )
− tuk
) (
− 1 − e −( 0 u )
k
)
= 0.0038
∴ E1 = 500p1 .= 1.90
= F(t ) − F(t ) = F(100) - F(50) = (1 − e ) − (1 − e ) = 0.0155
−(100 u ) −( 50 u )
k k
p2 2 1
∴ E1 = 500p1 = 7.75
and so on ...
D = 2.43391213
◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊◊
r. You needn’t perform a “goodness-of-fit” test to confirm it, but state your
opinion about which Weibull distribution seems to be a better fit.
Soln: I f we were to perform the “goodness-of-fit” test, then since " D ( =2.4339)
< χ 5% (= 7.815) ", we would conclude that this distribution also provides an
2
acceptable fit to the observed data with α =5%. The results are so similar that
there is probably no significant difference in the qualities of the fits. If each
program found the exact optimum of its objective function, then clearly the
result of Curve Fit would be a better fit. However, because Curve Fit is doing
computation with nonlinear functions while Cricket Graph is using linear
functions, the latter will perform the computations more accurately.
It has been estimated that the lifetime probability distributions of the devices are as
follows:
A: Weibull, with mean 1000 days and standard deviation 1200 days
B: Exponential, with mean 4000 days
C: Normal, with mean 3000 days and standard deviation 750 days
D: Exponential, with mean 1000 days
a.) Compute the reliabity of a unit of each device for a designed system lifetime of 1000
days:
Sol’n:
Device Reliability R(1000)
1000 0.8376
−
A 33.91% RA(1000) = 1 − FA (1000) = e 910.6269
1000
−
B 77.88% RB(1000) = 1 − FB (1000) = e 4000
Notes:
• The CREATE node indicates that only 1 entity is initially created.
• “A”, “B”, “C”, and “D” above should be replaced by the lifetime distribution of the
corresponding devices, i.e., WEIBL( , ), EXPON(4000), RNORM(3000,750), and EXPON(1000),
respectively.
• The parameters of the Weibull distribution as defined by SLAM are named ALPHA and
BETA, and are not (µ,σ), the mean & standard deviation. ALPHA is identical to the
parameter k in the class notes, and BETA is uk . To determine u and k from the mean and
standard deviation, one may roughly estimate k given the coefficient of variation σ/µ
=1.2 from the table below (taken from the class notes):
The value of k is between 0.8 and 0.9; interpolating would give k=0.8 + .1(0.06/0.15) =
0.84. Next, the parameter u may be found from
µ = u Γ 1+ 1 ⇒ u = µ = 1000 ≈ 1000 = 909.09
k Γ 1+ 1 Γ 1+ 1 1.1
k 0.84
where the Gamma function is evaluated by interpolating in the table below (also found
in the notes):
2. A system has 3 types of components (A, B, & C) which are subject to failure. As shown
below, the system requires at least one of components A and B, and at least two of
component C. One of component A is in “stand-by”. That is, when the first component A
has failed, the second is to be switched on, and until then does not begin to "age" or fail.
Assume that the sensor/switch has 95% reliability. In the case of components B & C, on
the other hand, all units of these components are in operation simultaneously, so that
each unit is subject to failure from the beginning of the system’s operation. Note that the
system requires at least 2 of component C for proper functioning.
a. Draw a SLAM network which can simulate the lifetime of this system.
Sol’n:
Notes:
• Again, the values “A”, “B”, and “C” on the diagram above should be replaced by
the lifetime distributions, namely ERLNG(100,5), EXPON(200), and EXPON(300),
respectively.
• The parameters of the Erlang distribution in SLAM are not the mean and
standard deviation (which would be in this case 500 and
2
5×100 = 100 5 = 223.61), but the mean of each of the component exponential
distributions and the number of such distributions.
• The “1” in the GOON node (labelled N1) indicates that the entity which arrives
there (at the time of the failure of the primary unit of device A) must leave
node N1 via a single activity only.
• The two activities leaving the GOON node N1 represent (1) the lifetime of the
standby unit of device A, which receives the entity with 99% probability, and
(2) the failure of the switch, requiring time = 0, which receives the entity with
probability 1%.
• See the note in problem 1 about the values of the parameters FR and SR of the
ACCUMULATE nodes.
• See the note in problem 1 about the FIRST statistics collected by the COLCT node.
b. Enter the network into the computer, and simulate the system 1000 times,
collecting statistics on the time of system failure. Request that a histogram be
printed. Specify about 15-20 cells, with HLOW and HWID parameters which will give
you a "nice" histogram with the mean approximately in the center and with small
tails. (This may require a second simulation, with the histogram parameters selected
after observing the results of a preliminary simulation.)
Note: Be sure to specify on the GEN statement that you do NOT want intermediate
results, and that the SUMMARY report is to be printed only after the 1000th run. Also
specify on the INITIALIZE statement that the statistical arrays should not be cleared
between runs. The following should work:
GEN,yourname,RELIABILITY,10/16/96,1000,,N,,N,Y/1000,72;
LIM,,,8;
INIT,,,NO;
NETWORK;
1 GEN,Hansuk Sohn,Reliability,10/9/1996,1000,,N,,N,Y/1000,72;
2 LIM,,,8;
3 INIT,,,NO;
4 NETWORK;
5 CREATE;
6 ACT/1,ERLNG(100,5),,Na; Component A
7 ACT/2,EXPON(200),,Nb; Component B
8 ACT/3,EXPON(200),,Nb; Component B
9 ACT/4,EXPON(300),,Nc; Component C
10 ACT/5,EXPON(300),,Nc; Component C
11 ACT/6,EXPON(300),,Nc; Component C
12 Na GOON,1;
13 ACT,ERLNG(100,5),0.95,FAIL;
14 ACT,0,0.05,FAIL;
15 Nb ACCUM,2; Node "b" will be released when both Bs fail.
16 ACT,,,FAIL;
17 Nc ACCUM,2; Node "c" will be released when 2 out of 3 Cs fail.
18 ACT,,,FAIL;
19 FAIL COLCT,FIRST,TIME_OF_FAILURE,20/0/20;
20 TERM,1;
21 END;
22 FIN;
S L A M I I S U M M A R Y R E P O R T
c. What is your estimate of the average lifetime of this system, based upon the simulation
results?
Sol’n: 174 days ( from SLAM output )
d. Suppose that the system is required to survive for a 100-day mission. What is the
estimated reliability of the system, i.e., the probability that the system survives 100 days?
Sol’n: From the histogram above, we see that 308 (the sum of the first six cells) failures
occurred during the first 100 days (and 1000-308=692 survived at least 100 days). Hence,
308
R(100) = 1- = 0.692
1000
e. Suppose your company will offer a warranty on this system, specifying the length of
the warranty period such that 98% of the systems will survive past the warranty period.
What should be the length of the warranty?
Sol’n: The above histogram doesn’t provide sufficient detail at the low end to allow an
accurate estimate, but if we use a linear interpolation we would estimate that the 20th
failure occurred at time 20(20/22) = 18.2 days, leaving at that time 980 survivors (98% of
the systems simulated.) Therefore, according to this estimate, 18.2 days should be the
length of the warranty (which undoubtedly would be rounded to 18 days for the sake of
convenience). Interpolating again to find the reliability of the system for an 18-day
lifetime, we would estimate that 22(18/20) = 19.8 systems, or 1.98% of the total, failed
during the first 18 days, leaving 98.02% surviving.
FAIL COLCT,FIRST,TIME_OF_FAILURE,30/0/1;
which would give 30 cells, each of length 1 day.
J I
H G
2. Complete the AOA & the corresponding SLAM networks below by inserting any
"dummy" activities which are necessary, and labeling the nodes.
3. Give numerical values (0, 1, 2, 3, 4, or ∞ ) for parameters "a" - "i" and a statistic
type for “j” on the SLAM network below which would simulate the project and
collect statistics on the completion time. (You needn’t insert the probability
distributions for the durations!)
a b c d e f g h i j
1 1 1 3 2 1 3 1 1 FIRST
5. Complete the ETs (earliest times) & LTs (latest times) in the network below, using
the expected activity durations, as indicated. Don't forget any "dummy" activities
which you entered above!
11 16
9 14 15 21
14
6. What are the critical activities?
Soln : B - A - H - G - I
Activity i j µ σ2
B 0 1 4 1
A 1 2 5 22
H 2 5 4 1
G 5 7 5 1
I 7 8 3 1
sum 21 8
σT = 8 = 2.8284
begin end
F G M
B
Q
A E
L
P
C D I K O
G M Q
F
P
E H N
B
D L O
A
I
C K
J
c. Label the nodes of the AOA network, so that i<j if there is an activity with node i
as its start and node j as its end node.
G M Q
5 8 10 14 15
F
P
E H N
2 4 6 11 13
B
D L O
A
0 1
I
C K
J
3 7 9 12
d. Perform the forward pass through the AOA network to obtain for each node i,
ET(i) = earliest possible time for event i.
I
C K
J
3 7 9 12
298 759 874 1420
e. What is the earliest completion time for this project? 1519 days
f. Perform the backward pass through the AOA network to obtain, for each node i,
LT(i) = latest possible time for event i (assuming the project is to be completed in
the time which you have specified in (e).)
978 1047 1047 1494 1519
M Q
5 G 8 10 14 15
F
P
391 616 759 1317 1467
E H N
2 4 6 11 13
B
0 137 D L O
A
0 1
I
C K
J
3 7 9 12
298 759 874 1420
g. For each activity, compute and record below:
ES = earliest start time
LS = latest start time
EF = earliest finish time
LF = latest finish time
TF = total float (slack)
Sol’n:
h. Which activities are "critical", i.e., have zero float? (Circle the labels A-Q of the
critical activities above.) Indicate the critical path in your AOA network in part
(b).
Soln : A - C - D - E - H - J - K - O - P - Q
M Q
5 G 8 10 14 15
F
P
E H N
2 4 6 11 13
B
D L O
A
0 1
I
C K
J
3 7 9 12
i. Schedule this project by entering the AON network into the MacProject PRO
software Specify that the start time for the project will be November 1, 1996.
What is the earliest completion date for the project? August 28, 2002
(Note that
• stated to the left and right of each node, i.e., acitivity, are the earliest start and
latest finish dates, respectively.
• MacProject PRO assumes 5-day work weeks by default, so that the time between
beginning & completion date isn’t the same as your answer in (e).)
ES EF
ES : Earliest Start Time
EF : Earliest Finish Time
B G Q
10/29/99 7/16/01
3/15/99 7/23/99 M
F
11/1/96 5/12/97
A
9/27/01 4/24/02
N
3/15/99 9/29/99
3/9/00 9/26/01
5/4/98 3/12/99 L
9/30/99 3/8/00
5/13/97 12/23/97 6/18/02 7/24/02
J
C P
I O
D K
(This is the same data as given in Homework #8, except that the durations are now
given as intervals centered around the originally-given duration.)
The AOA network representing this project is shown on the next page.
a. Use SLAM to simulate the project 1000 times, with a triangular distribution for the
activity durations, e.g., TRIAG(125,137,149) for activity A. (Note that the mean
value for each duration is the central value which was used in Homework #8, e.g.,
137 days for activity A.)
Solutions :
l-ecn015% rslam 1a-1
S L A M I I S U M M A R Y R E P O R T
c. According to PERT, the critical path which you found in Homework #8, assuming
the durations to be equal to their expected values, namely
[A - C - D - E - H - J - K - O - P - Q],
is always the critical path. Determine whether that is true for the 1000
simulations you have performed. (Because of the relatively large “float” of the
noncritical activities found in Homework #8, it might be true. If necessary,
modify your SLAM model to determine this!) If not true, in how many simulations
was this path not the critical path?
G M Q
5 8 10 14 15
F
P
E H N
2 4 6 11 13
B
D L O
A
0 1
I
C K
J
3 7 9 12
Soln: For the 1000 simulations performed 'A-C-D-E-H-J-K-O-P-Q' is “nearly always” the critical
path. This was determined by making the adjustments below to the previous SLAM II model.
36 N10 ACCUM,2,,LAST;
37 ACT/17,447,,N14; Activity M
38 A11 ASSIGN,ATRIB(1)=0;
39 N11 ACCUM,2,,LAST;
40 ACT/18,150,,N13; Activity N
41 N12 GOON;
42 ACT/19,47,,N13; Activity O
43 N13 ACCUM,2,,LAST;
44 ACT/20,27,,N14; Activity P
45 N14 ACCUM,2,,LAST;
46 ACT/21,25,,CHECK; Activity Q
47 CHECK COLCT,ATRIB(1),Number_Same_CP
48 EFT COLCT,FIRST,Earliest_Finish_Time
49 TERM,1;
50 END;
51 FIN;
S L A M I I S U M M A R Y R E P O R T
A new COLCT node was inserted to collect statistics on the value of ATTRIBUTE #1,
which is equal to 1 if the path of interest [A - C - D - E - H - J - K - O - P - Q] is
critical, and zero otherwise. We see that the minimum value and maximum value of
attribute #1 are both equal to 1, indicating that the path was always the longest
path in the network. Warning: this isn’t true in general! In this particular
example, all noncritical activities had rather large values of slack (“float”), as
found in the previous homework assignment!
Based upon your simulation, if you wish to set a deadline for completion of the project
so that you are 90% certain of meeting this deadline, what should this deadline be?
By summing the counts of the cells, we find that at time=1549 days, 875 (i.e., 87.5%) of
the simulated projects had been completed, while at time=1552 days, 904 (i.e. 90.4%) of
the projects had been completed. Using a linear interpolation, we estimate that 90% of
the simulated projects should be completed at time= 1549+ 3(25/29) = 1551.6 days.
• change the specifications for the histogram so as to get a count of failures each
day, e.g.,
EFT COLCT,FIRST,Earliest_Finish_Time,50/1545/0.05
which would give 50 cells, each of length 0.05 days.
and re-run the simulation. In the new histogram, we find that at time=1548 days 895
projects had been completed, and at time=1551, 918 projects had been completed:
Using linear interpolation as before, we estimate that 900 projects would be complete at
time = 1548 + 3(5/23) = 1548.7 days (2.9 days earlier than estimated in part (d).)
Solution: To reduce the computational burden somewhat, the below table was
computed with each interval of 6 days length, rather than the 3 days in the SLAM
histogram. Using normal distribution tables with mean µ = 1520 and standard
deviation σ = 19, we compute the probability pi that one of the 1000 observations
falls into cell #i, and then multiply this by 1000 to get Ei , the expected number of
observations in cell #i:
# Interval Oi Ei Pi Oi - Ei 2
Ei
1 1470 - 1475 2 4.682 0.004682 1.53633575
2 1475 - 1480 3 8.648 0.008648 3.68870305
3 1480 - 1485 3 14.980 0.014980 9.58080107
4 1485 - 1490 12 24.354 0.024354 6.26678640
5 1490 - 1495 25 37.068 0.037068 3.92890428
6 1495 - 1500 55 52.590 0.052590 0.11044115
7 1500 - 1505 59 69.306 0.069306 1.53253161
8 1505 - 1510 68 84.775 0.084775 3.31938219
9 1510 - 1515 92 96.525 0.096525 0.21212769
10 1515 - 1520 84 102.802 0.102802 3.43879695
The system is modeled as a Markov chain, with the state defined as the number of
units on the shelf at the end of each day. The probability transition matrix is:
a. Explain the derivation of the values P19, P 35, P 51, P 83 above. (Note that
state 1=inventory level 0, etc.)
State Definition
1 SOH = 0
2 SOH = 1
3 SOH = 2
4 SOH = 3
5 SOH = 4
6 SOH = 5
7 SOH = 6
8 SOH = 7
9 SOH = 8
b. Write two of the equations which define this steady-state distribution. How
many equations must be solved to yield the solution above?
c. What is the average number on the shelf at the end of each day?
d. If the shelf is full Monday morning, what is the expected number of days
until the shelf is first emptied ("stockout")?
Solution: m 91 = 15.4523 (days)
e. What is the expected time between stockouts?
Solution: m 00 = 15.4523 (days)
f. How frequently will the shelf be restocked? (i.e. what is the average
number of days between restocking?)
Solution: Since the shelf is restocked whenever the state of the system is
1,2,3, or 4, the steadystate probability that the shelf is restocked on a day is
4
∑ π = 0.4076 = 1/2.4534,
i=1
i.e., we expect the shelf to restocked with frequency once each 2.4534 days.
For example, machine #1 requires 0.5 hrs, at $20/hr., and has a 10% scrap rate. Those
parts completing this operation are inspected, requiring 0.1 hr. at $15/hr. The
inspector scraps 10%, and sends 5% back to machine #1 for rework (after which it
is again inspected, etc.)
The Markov chain model of a part moving through this system has transition
probability matrix:
a. Draw the diagram for this Markov chain and describe each state.
Solution:
c. Explain how matrix E was computed. Explain how matrix A was computed,
given E.
Solution:
0 0.9 0 0 0 0 0 0.1
0.05 0 0.85 0 0 0 0 0.1
0 0 0 0.95 0 0 0 0.05 Q R
0 0 0.03 0 0.87 0 0 0.1 =
0 0 0 0 0 0.98 0 0.02 0 I
0 0 0 0 0.02 0 0.93 0.05
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
respectively.
d. What percent of the parts which are started are successfully completed?
Solution: A1,OK = 0.6335 = 63.35 %
e. What is the expected number of blanks which should be required to fill an
order for 100 completed parts?
100 100
Solution: = = 157.8532
A1,OK 0.6335
f. What percent of the parts arriving at machine #2 will be successfully
completed?
Solution: A 3,OK = 0.7909 = 79.09 %
g. What is the expected total number of inspections which entering parts will
undergo?
Solution: E12 + E14 + E16 = 2.4069
h. Explain the meaning of the number appearing in row 3, column 2 of the A
matrix.
Solution: A 32 = .2091 indicates that parts arriving at machine 2 have a
20.91 % probability of being failed.
i. Explain the meaning of the number appearing in row 3, column 3 of the E
matrix.
Solution: E 33 =1.029 indicates the expected number of times that parts
arriving at machine 2 returns to machine 2 before successfully finished or
failed.
j. To fill the order for 100 completed parts, what is the expected man-hour
requirement for each machine? for each inspection station?
Solution:
Operation state Man-hour / 100 completed part
Total = 284.12
k. What are the expected direct costs (row materials + operating costs - scrap
value of rejected parts) per completed part?
Solution:
Each completed part requires an expected 1/0.6335, i.e., 1.5785 entering
parts.
Materials : $ 50 × 1.5785 = $ 78.925
Scrap value of rejected parts : $ 10 × 1.5785 × 0.3665 = $ 5.785
Estimated Man-hour requirements per completed part
Total = 2.8412
Operation cost :
Operation state Hourly Rate × Man-Hours
Total = $ 52.5005
Total Direct Cost = row material + operating costs - Scrap value of rejected
parts
= $ 78.925 + $ 52.5005 - $ 5.785
= 125.6405
3. A city's water supply comes from a reservoir. Careful study of this reservoir over
the past 20 years has shown that, if the reservoir was full at the beginning of the
summer, then the probability it would be full at the beginning of the following
summer is 80%. On the other hand, if the reservoir was not full at the beginning of
one summer, the probability it would be full at the beginning of the following
summer is only 25%.
a. Defining the states to be "full" and "not full", draw a transition diagram for a
Markov chain model of this reservoir.
Solution:
0.80 0.75
state definition 0.20
1 full 1 2
2 not full 0.25
b. Write the transition probability matrix.
Solution:
0.80 0.20
P=
0.25 0.75
c. If the reservoir was full at the beginning of summer 1996, what is the
probability that it will be full at the beginning of summer 1998?
0.6900 0.3100
Solution: P112 = 0.69 from P2 =
0.3875 0.6125
d. Write equations which determine the steadystate probability distribution for
this Markov chain, and solve them.
Solution:
π1 = 0.80π 1 + 0.25π 2 π 2 = 0.20π 1 + 0.75π 2
or
π1 + π 2 = 1 π1 + π 2 = 1
5 4
∴π 1 = , π2 =
9 9
e. Over a long period of time, in what percent of the years would we expect the
reservoir be full at the beginning of the summer, according to this model?
5
Solution: π1 = = 55.56 %
9