Professional Documents
Culture Documents
Exercises 1 On Probability, With Answers
Exercises 1 On Probability, With Answers
Finding a Supplier
Actually, only two of the eight firms make satisfactory components. How likely is
it that she will have to visit precisely two firms (i.e., that the first visited will
offer an unsatisfactory component, and the second a satisfactory one)?
Via simulation:
before visit good left bad left good found? first good first good is found
1 2 6 0 0 on visit
2 2 5 1 2 2
3 1 5 0 0
4 1 4 0 0
5 1 3 0 0 Is the first good
6 1 2 1 0 found on visit 2?
7 0 2 0 0 1
8 0 1 0 0
$H$28 monitored cell
21.60% mean
0.411491 sample standard deviation
0 minimum
1 maximum
50,000 number of simulation runs
Page 1
Supplier search
Extension 1:
2 good firms
6 bad firms Spreadsheet notes: In order to make the formulas a bit
easier to read, I've given names to the "good firms"
k Pr( first good firm on visit k ) and "bad firms" parameters. Click on cell B41 to see
1 25.00% 25.00% its name, "good_firms", appear at the upper-lefthand
2 21.43% 21.43% corner of the screen.
3 17.86% 17.86%
4 14.29% 14.29% Double-click on cell D46 to see the formula with
5 10.71% 10.71% the cell names color-coded to the named cells.
6 7.14% 7.14%
7 3.57% 3.57% The "F5" key displays a list of all the named cells
8 - - in a workbook. Double-clicking on any displayed
total 100.00% 100.00% name will take you to that cell.
The middle column above builds the answer step-by-step, using the decomposition:
Pr( first good item on visit k ) = Pr( no good items on first k-1 visits AND good item on visit k )
= Pr( no good items on first k-1 visits )Pr( good item on visit k | no good items on first k-1 visits )
= [1 - sum of previous entries] ( 2 / (8 - (k-1)) )
where g and b are the total numbers of good and bad suppliers, respectively.
This approach is used in the last column above.
Extension 2:
The second method of breaking the problem down also allows us to also handle the case where,
for purposes of supply reliability, she seeks more than one acceptable supplier:
Page 2
Supplier search
Pr( rth good item on visit k ) = Pr( r-1 good items on first k-1 visits and good item on visit k )
= Pr( r-1 good items on first k-1 visits )Pr( good item on visit k | r-1 good items on first k-1 visits )
= [formula below]( ( 2 - (r-1) ) / (8 - (k-1)) )
The table below solves this more-general problem: Any of the blue-colored cells
can be changed to explore various cases.
Page 3
Sick agents
Sick Agents
A real estate sales office has found (from past experience) that each of its five
sales agents has (independently) a 25% chance of calling in sick after a
three-day weekend. What is the probability that two agents will call in sick
immediately after the (3-day) Labor Day weekend?
If the agents are Andy, Bill, Chuck, Dave, and Ed, then the two who call in sick
could be Andy and Bill, or Andy and Chuck, or Dave and Ed. There are
COMBIN(5,2) = 10 ways to select the two who call in sick.
For any of these ways, the chance that those two call in sick is (0.25) 2, and the
chance that the other three show up for work is (0.75) 3. Therefore, the chance that
precisely two call in sick is
26.37% =COMBIN(5,2)*(0.25)^2*(0.75)^3
5 number of agents
25.00% Pr( an individual agent calls in sick )
Via simulation:
sick?
0 Andy $B$42 monitored cell
0 Bill 26.43% mean
0 Chuck 0.440964 sample standard deviation
0 Dave 0 minimum
1 Ed 1 maximum
1 total 50,000 number of simulation runs
0.39% margin of error (95% confidence)
0 Is total = 2?
Page 4
Fords
10%
Ford
"not Ford"
is called a Ford
2%
20%
80%
24%
"Ford"
not Ford
30%
70%
"not Ford"
56%
Page 5
Fords
Page 6
Ace of Spades
A two-card hand is dealt from a small deck containing only the four aces and
four deuces. What is the probability of getting at least one ace? What is the
probability of getting the Ace of Spades? What is the probability that a hand
contains two aces, given that it contains at least one? What is the probability
that a hand contains two aces, given that it contains the Ace of Spades?
8 cards in deck
4 aces in deck
2 cards in hand
28 hands
6 hands with no aces
22 hands with at least one ace
16 hands with exactly one ace
6 hands with at least two aces
Consider a couple with two children, and assume that each child is
(independently) equally likely to be a boy or a girl.
What's the probability that both children are boys? Clearly, 25%.
Assume you're told that there is at least one boy. Now, what is the chance
that both are boys? Well, there were originally four equally-likely possibilities:
The first-born is a boy and the second-born is a girl, the first-born is a girl and
the other a boy, both are boys, or both are girls. The last case has been ruled
out, so the answer is 1/3 = 33.33%.
But what if, instead, you're told that the first-born (the oldest) is a boy? The
other is equally likely to be a boy or a girl, so the chance that they're both
boys is 50%. (If you're told only that the second-born is a boy, the chance
that both are boys is again 50%.)
This is very similar to what you'll see if you're considering a two-card hand 200 cards in deck
dealt from a deck of 200 cards, where 100 are aces (and precisely one is th 100 aces in deck
Page 7
Ace of Spades
If you're told that the first-dealt card is the Ace of Spades, then there's a 19,900 hands
nearly-50% chance that the second is an ace. Similarly, if you're told that the 4,950 hands with no aces
second-dealt card is the Ace of Spades, again the chance of the other being 14,950 hands with at least one ace
an ace is nearly 50%. 10,000 hands with exactly one ace
4,950 hands with at least two aces
Therefore, obviously, if you're told that one of the two cards is the Ace of
Spades, the chance that both are aces is nearly 50%. 33.11% Pr(hand contains at least 2 aces | it c
The "Ace of Spades" designation is irrelevant! If you're told "the first-dealt 199 hands with the Ace of Spades
is an ace," or "the second-dealt is an ace," again, the chance of two aces 100 hands with the Ace of Spades, and no
is nearly 50%. 99 hands with the Ace of Spades, and at
But if all you're told is that at least one of the cards is an ace, then, of the fo 49.75% Pr(hand contains at least 2 aces | it c
roughly-equally-likely chances that the deal went "ace-other", "other-ace",
"ace-ace", or "other-other," only the last case has been ruled out, and
therefore, the chance that both are aces is only roughly 1/3.
Page 8
Ace of Spades
Page 9
Promotion awareness
What is the probability that a person will make a purchase, given that he or she
is aware of the price promotion?
Are the events "made a purchase" and "aware of the price promotion" independent?
Why or why not?
20% aware and bought Yes, awareness and buying behavior are independent,
80% aware since Pr(aware AND bought) = Pr(aware)Pr(bought) .
25% bought The promotion appears to be completely ineffective.
Page 10
Learning in stages
(a) After the machine starts a production run, what is the probability that a defect
is observed when one part is tested?
(b) Suppose that one part selected by an inspector is found to be defective. What
is the probability that the machine is incorrectly adjusted?
(c) Before your recommendation is followed, a second part is tested and found to good
be good. Using your revised probabilities from (b) as the most recent prior
probabilities, compute the revised probability of an incorrect adjustment given that the
correct
second part is good. defectiv
90%
90.00% Pr( setup is correct )
10.00% Pr( setup is incorrect )
10%
5.00% Pr(defective | setup correct ) 4.75% Pr( defective, then good | setup correct ) good
incorrect
75.00% Pr(defective | setup incorrect ) 18.75% Pr( defective, then good | setup incorrect )
37.50% Pr( setup correct | defective ) 69.51% Pr( setup correct | defective, then good )
62.50% Pr( setup incorrect | defective ) 30.49% Pr( setup incorrect | defective, then good )
10%
The two sections below are set up to show how the computations above can be def,gd
extended to cases where more than just two items are tested. incorrect
Page 11
Learning in stages
Page 12
Learning in stages
0.90.95 0.3750.95
good good
95% 95%
5% 5%
correct correct
defective defective
0.90.05 0.3750.05
90% 37.5%
10% 62.5%
0.10.25 0.6250.25
good good
incorrect incorrect
25% 25%
75% 75%
defective defective
0.10.75 0.6250.75
else
correct
else
else
90%
10%
0.10.750.25
def,gd
incorrect
75%25%
else
else
else
Page 13
Dry holes
A Bayesian approach can be used to revise probabilities that a prospect field will
produce oil (Oil & Gas Journal, January 11, 1988). In one case, geological
assessment indicates a 25% chance that the field will produce oil. Further, there is
an 80% chance that a particular well will strike oil, given that oil is present in the
prospect field.
Suppose that one well is drilled on the field and comes up dry. What is the
probability that the prospect field will produce oil?
If two wells come up dry, what is the probability that the field will produce oil?
The oil company would like to keep looking as long as the chances of finding oil
are greater than 1%. How many dry wells must be drilled before the field will be
abandoned?
1.316% In the box to the left is an Excel "data table". Data tables
0 provide a quick way to see how a speadsheet result varies as
1 some parameter of the problem is varied.
2
3 I wanted to tabulate values that would appear in cell B30 as
4 the number entered in cell B20 took different values.
Page 14
Dry holes
I clicked in "Column input cell", then clicked cell B20 and "OK."
This formula instructs Excel, each time it recalculates my In Excel 2007, select Data, (Da
spreadsheet, to successively put each value in the first Data Table to get here.
column of the table into cell B20, and record the resulting value
from C33 (really, from B30) in the second column of the table.
Notes:
The table is "live." This means that you can change any of
the first-column inputs and the table will update itself
automatically: Try putting a "4" in cell B34, for example.
If you want a horizontal table, just click on the "Row input cell"
box instead. 1.316%
And finally, if you want to track the changes in a single cell as 1.316%
the values in two other cells are varied, put the formula to be 0
tabulated in the upper-lefthand corner of the "table rectangle", 1
and give both row (B18) and column (B20) inputs: The table to 2
the right shows how our hopes of finding oil vary with both our 3
initial beliefs and our exploratory-well experiences. 4
Page 15
Dry holes
se
y
75%
%
This example explains the use of data tables in Excel 2007 and earlier.
The use via the command ribbon in Excel 2010 and 2013
is explained in this week's "Mad Cow" example.
1.316%
0
1
2
3
4
Page 16
Dry holes
multi-column table
1.316% 2 5
1
2
5
10
17
horizontal table
0 1 2 3 4
two-dimensional table
5% 20% 25% 80%
Page 17