Download stdin (ditroff) - Purdue College of Engineering

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Homework #4. Solution
Spring 2001
IE 230
Textbook: D.C. Montgomery and G.C. Runger, Applied Statistics and Probability for Engineers, John
Wiley & Sons, New York, 1999. Sections 3.6-3.7. Much of the Concise Notes’ page 5.
Throughout, use the step-by-step approach whenever possible.
1. (From M&R, Problem 3-73.) In a test of a printed circuit board using a random test pattern, each
bit in an array of ten bits is equally likely to be a zero or a one. Assume that the bits are
independent. Let Zi denote the event that the i th bit is a zero, i = 1, 2,..., 10.
(a) Describe the experiment and a sample space S so that the events Z 1, Z 2, . . . , Z 10 are
meaningful.
---------------------------------------------------------------------------Experiment: Randomly choose one printed circuit board.
Sample space: The set of all available printed circuit boards.
The events Zi are the circuit boards in S for which
bit i is zero.
---------------------------------------------------------------------------(b) Write the event "all ten bits are zero".
---------------------------------------------------------------------------10
Z 1 ∩ Z 2 ∩ . . . ∩ Z 10 or equivalently ∩ Zi
i =1
---------------------------------------------------------------------------(c) Determine the probability of the event in Part (b).
---------------------------------------------------------------------------10
P( ∩ Zi )
i =1
10
= Π P(Zi )
since independent
= (1 / 2)
since P(Zi ) = 1 / 2
i =1
10
= 0.000977
simplify
---------------------------------------------------------------------------(d) Show that the probability of "alternating bits" (that is, a zero always following a one and a
one always following a zero) is twice as likely as all bits being zero.
---------------------------------------------------------------------------P( alternating bits )
= P[(Z 1 ∩ Z 2′ ∩ Z 3 ∩ . . . ∩ Z 10′)
∪ (Z 1′ ∩ Z 2 ∩ Z 3′ ∩ . . . ∩ Z 10)]
same event
= P(Z 1 ∩ Z 2′ ∩ Z 3 ∩ . . . ∩Z 10′)
+ P(Z 1′ ∩ Z 2 ∩ Z 3′ ∩ . . . ∩Z 10)
mut. excl.
= P(Z 1) (Z 2′) P(Z 3) . . . P(Z 10′))
+ P(Z 1′) P(Z 2) P(Z 3′) . . . P(Z 10)
= (1 / 2)
10
+ (1 / 2)
10
independence
P(Zi ) = 1 / 2
10
= 2 P( ∩ Zi )
i =1
from Part (b)
----------------------------------------------------------------------------
- 1 of 6 -
Schmeiser
Homework #4. Solution
Spring 2001
IE 230
2. (From M&R, Example 3-28) A random circuit, composed of a network of n devices, operates if
and only if there is a path from beginning to end. The path cannot pass through a device that is
not working. (Think of electricity flowing.) Let Di denote the event that device i works,
i = 1, 2,..., n . Assume that these events are jointly independent.
Consider the network of n = 6 devices illustrated in the textbook. For the network to operate, at
least one of the first three devices must work, at least one of the fourth and fifth devices must
work, and the sixth device must work.
(a) Using Di event notation, write the six device probabilities given in the textbook.
---------------------------------------------------------------------------P(D 1) = P(D 2) = P(D 3) = 0.9
P(D 4) = P(D 5) = 0.95
P(D 6) = 0.99
---------------------------------------------------------------------------(b) Write, in set notation, the event that the network operates.
---------------------------------------------------------------------------(D 1 ∪ D 2 ∪ D 3) ∩ (D 4 ∪ D 5) ∩ D 6
---------------------------------------------------------------------------(c) Compute the probability of the event in Part (b).
---------------------------------------------------------------------------P(D 1 ∪ D 2 ∪ D 3) ∩ (D 4 ∪ D 5) ∩ D 6
= P(D 1 ∪ D 2 ∪ D 3) P(D 4 ∪ D 5) P(D 6)
independence
= [1 − P((D 1 ∪ D 2 ∪ D 3)′)] [1 − P((D 4 ∪ D 5)′)] P(D 6)
complements
= [1 − P(D 1′ ∩ D 2′ ∩ D 3′)] [1 − P(D 4′ ∩ D 5′)] P(D 6)
DeMorgan’s Law
= [1 − P(D 1′) P(D 2′) P(D 3′)] [1 − P(D 4′) P(D 5′)] P(D 6)
independence
= [1 − (1 − P(D 1)) (1 − P(D 2)) (1 − P(D 3)]
[1 − (1 − P(D 4)) (1 − P(D 5))] P(D 6)
= [1 − (1 − 0.90) (1 − 0.90) (1 − 0.90)]
[1 − (1 − 0.95) (1 − 0.95)] (0.99)
complements
substitute information
from Part (b)
= (1 − 0.1 ) (1 − 0.05 ) (0.99)
simplify
= 0.987
simplify
3
2
----------------------------------------------------------------------------
- 2 of 6 -
Schmeiser
Homework #4. Solution
Spring 2001
IE 230
3. An unknown person has won the $1,000,000 lottery. To avoid greedy acquaintances, the person
tries to claim the prize in secret, but with only partial success. Only four people have been seen
entering the lottery office: a short man named Sam, a tall man named Ted, a short woman name
Sue, and a tall woman named Tia; one is the winner. Having no other information, assume that
each is equally likely to have won.
We begin an investigation. Let M denote the event that the winner is a man. Let T denote the
event that the winner is tall. Let U denote the event that the winner is either a tall woman or a
short man.
(a) Show that M and T are independent.
---------------------------------------------------------------------------M andT are independent if and only if P(M ∩ T ) = P(M ) P(T ).
All four people are equally likely, so all three probabilities are
the fraction of the four people in the event. Therefore
P(M ∩ T ) = P("Ted" ) = 1 / 4.
P(M) = P("Ted" or "Sam" ) = 2 / 4.
P(T) = P("Ted" or "Tia" ) = 2 / 4.
Therefore M and T are independent.
---------------------------------------------------------------------------(b) Show that three events M , T , and U are pairwise independent.
---------------------------------------------------------------------------Three events are pairwise independent if each of all three pairs of events
are independent. From Part (a) M and T are independent.
Similarly,
P(M ∩ U ) = P("Sam" ) = 1 / 4.
P(M) = P("Ted" or "Sam" ) = 2 / 4.
P(U) = P("Tia" or "Sam" ) = 2 / 4.
implies that M and U are independent.
Similarly,
P(T ∩ U ) = P("Tia" ) = 1 / 4.
P(T) = P("Ted" or "Tia" ) = 2 / 4.
P(U) = P("Tia" or "Sam" ) = 2 / 4.
implies that T and U are independent.
---------------------------------------------------------------------------(c) Use the definition to show that the three events M , T , and U are not jointly independent.
---------------------------------------------------------------------------To be jointly independent, the three events M , T , and U must be
pairwise independent and P(M ∩ T ∩ U ) = P(M ) P(T ) P(U )
Again because all four people are equally likely to have won, the
probabilities are the fraction of people in the event.
Therefore, P(M ∩ T ∩ U ) = P(∅) = 0,
3
which is not equal to P(M ) P(T ) P(U) = 1 / 2 ,
which implies that M , T , and U are not jointly independent.
---------------------------------------------------------------------------- 3 of 6 -
Schmeiser
Homework #4. Solution
Spring 2001
IE 230
(d) Suppose that a lottery guard knows that the winner is a man and that a lottery clerk knows
that the winner is tall. Compute P(U | M ∩ T ). Explain in words why your answer makes
sense.
---------------------------------------------------------------------------P(U | M ∩ T )
P(U ∩(M ∩ T ))
= hhhhhhhhhhhhhhh
P(M ∩ T )
definition of cond. probability
= 0 / (1 / 4)
substituting from Parts (c) and (c)
= 0
simplifying
---------------------------------------------------------------------------(e) Roughly, event independence means that knowing whether an event occurs is not useful for
predicting whether another event occurs (in the same replication of the experiment).
Therefore, because of pairwise independence, M helps to predict neither T nor U . Because
the three events are not jointly independent, something can be predicted. What?
---------------------------------------------------------------------------As shown in Part (d), knowing that the winner is a tall man (i.e. T ∩ M )
is sufficient information to eliminate Tia and Sam (i.e., U ).
This one example is enough to demonstrate that the events are not
jointly independent.
Other examples are easy to find.
---------------------------------------------------------------------------Comment. Compare this problem to Problem 2 from Fall 2000.
4. Result: If the events A and B are independent, then A ′ and B ′ are independent. Provide the reason
for each step of the proof.
P(A′ ∩ B′ )
= P((A ∪ B )′)
__ < DeMorgan’s Law > __
= 1 − P(A ∪ B )
__ < complement > __
= 1 − [P(A ) + P(B ) − P(A ∩ B )]
__ < maybe not m.e. > __
= 1 − [P(A ) + P(B ) − P(A ) P(B )]
__< independence > __
= [1 − P(A )] [1 − P(B )]
__ < algebra > __
= P(A ′) P(B ′)
__< complements > __
- 4 of 6 -
Schmeiser
Homework #4. Solution
Spring 2001
IE 230
5. In a trial by jury, a mistake can occur in two ways. First, the jury can convict an innocent
defendant. Second, the jury can free a guilty defendant. Let G denote the event that the
defendant is guilty. Let F denote the event that the jury frees the defendant.
Consider this situation. A robbery victim views a line up of seven suspects, one of whom is
guilty. The victim, embarrassed by not recognizing the guilty person, randomly chooses one of
the seven, who is then tried. Assume that a jury convicts a guilty defendant 95% of the time and
frees an innocent defendant 99% of the time.
(a) Write the given information as probabilities of events.
---------------------------------------------------------------------------P(G ) = 1 / 7 since equally likely
P(F′ | G ) = 0.95
P(F | G′ ) = 0.99
---------------------------------------------------------------------------(b) Are events G and F independent? Why or why not?
---------------------------------------------------------------------------G and F are not independent. If freedom were not dependent
upon guilt, the court system would be worthless.
One way to show the dependence is to notice that 5% of guilty
defendants are freed (P(F | G ) = 1 − P(F′ | G ) = 1 − 0.95 = 0.05).
The corresponding probability for innocent defendants is P(F | G′ ) = 0.99.
Because the probability of F depends upon G , they are not independent.
---------------------------------------------------------------------------(c) Conditional that the defendant is convicted, what is the probability that he or she is innocent?
---------------------------------------------------------------------------P(G′ | F′ )
P(F′ | G ′) P(G ′)
= hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
P(F′ | G ′) P(G ′) + P(F′ | G ) P(G )
Bayes’s Theorem
[1 − P(F | G ′)] [1 − P(G )]
= hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
[1 − P(F | G ′)] [1 − P(G )] + P(F′ | G ) P(G )
complements
[1 − (0.99)] [1 − (1 / 7)]
= hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
[1 − (0.99)] [1 − (1 / 7)] + (0.95) (1 / 7)
complements
(0.01) (6 / 7)
= hhhhhhhhhhhhhhhhhhhhhhh
(0.01) (6 / 7) + (0.95) (1 / 7)
from Part (a)
0.00857
= hhhhhhhhhhhhhh
0.00857 + 0.136
simplify
= 0.059
simplify
----------------------------------------------------------------------------
- 5 of 6 -
Schmeiser
Homework #4. Solution
Spring 2001
IE 230
6. Spread sheet. (Email your spreadsheet to "[email protected]". The results from Part (g)
should be handwritten and submitted with your solutions to Problems 1-5.)
We will perform a Monte Carlo simulation, at first with one-hundred independent replications, to
estimate the probability that the network of Problem 2 operates. One purpose of such a
simulation is to check your answer. For more-complicated networks, however, the simulation
might be the only way to analyze the network.
(a) At the top of the sheet, place your name, class, homework number, and problem number.
Leave four or five blank rows.
(b) In Column A place the heading "Trial #". Beneath the heading place the integers 1 through
100. (You can "drag" the integers; you should not enter the numbers manually.)
(c) In Columns B-G place the headings U1, U2,..., U6. Beneath each of these headings, place
100 random numbers. (Use the "rand" command.)
(d) In Columns H-M place the headings D1, D2,..., D6. Above each of these heading place the
corresponding given probability of the device operating. Beneath each of these six
headings, place 100 binary numbers, 1 if Di occurred (that is, if device i worked) and 0 if
Di did not occur (that is, if device i did not work). (Use the "if" command, just like
flipping a biased coin. The results for Column H should use the random numbers in
Column B, I from C, etc.)
(e) In Column N place the heading "Operates?" Beneath this heading compute the 100 binary
numbers that indicate whether the network operated on each replication. As before, let 1
indicate that the event occurred and 0 that it did not occur. (You can use the "if" function.
But it is easier to use the expression [1 − (1−H 6)(1−I 6)(1−J 6)] [1 − (1−K 6)(1−L 6)] M 6 for
the trial in row 6. )
(f) Above the Column N heading, compute the relative frequency that the network operated.
(Use the "average" command.) Label this cell.
(g) Hit F9 enough times to convince yourself that the results match your answer from Problem
2(c). If the results do not match, check your work. When they do match, write the relative
frequencies obtained from hitting F9 ten times.
---------------------------------------------------------------------------See the MSExcel spreadsheet for the solution to Problem #6.
----------------------------------------------------------------------------
- 6 of 6 -
Schmeiser