STAB22 sections 4.1 and 4.2

STAB22 sections 4.1 and 4.2
4.3 I used the applet, since it’s much quicker than
using Table B. Change “probability of heads” to
0.9 (the chance of Diana making a free shot) and
change “toss 15 times” to “toss 100 times”. My
output is shown in Figure 1. My simulated Diana
made 87% of her 100 free throws; you can see
that the proportion of free throws made gets close
to 90%, though on my simulation it was never
higher than 90%, except after the very first one.
The graph doesn’t make it easy to see where the
misses are: look for it to turn downhill, and then
you have to decide whether that’s one miss or
more than one in a row. On my simulation, I got
misses on attempts (roughly) 2, 6, 12, 19, 20, 27,
59, 68, 74, 75, 78 and 95 (oops, I missed one).
There were a couple of instances of two misses
in a row, and there was an instance of over 30
free shots made in a row. Neither of these are
very likely on the face of it, but if you watch long
enough, some apparently surprising things will
happen. (Did you expect to see as long a run of
“makes” as that?)
Figure 1: Simulated free throws
If you use Table B, pick a row to start. Designate
one of the digits (say 0) to be a miss, and pick out
digits one at a time. Your simulation probably
won’t resemble mine much, but I imagine your Figure 2: Spreadsheet showing simulated free throws
longest runs will be longer than you might expect.
1
You can also use a spreadsheet for this (I used
probability of 0.75 (which is also the estimated
Gnumeric). In cell A1, put a random number usproportion of the time that the station is playing rand(), copy this, and paste it into rows 2–
ing music, as opposed to talk, commercials, news
100 of column A. My column B indicates whether
etc).
each simulated free throw was made (TRUE) or
missed (FALSE) according to whether the random 4.5 If you only wait 5 seconds, you are quite likely
to encounter the same song as you did last time
number was less or greater than 0.9. My for(whereas if you wait 10 minutes, the song you enmula for this was =A1<=0.9 in cell B1, which I
countered the first time will have finished, unless
then copy-and-pasted down to row 100. Column
it is something like Stairway to Heaven). From
C contains the current run length. This is a bit
a probability point of view, the events “music is
tricky. Cell C1 is 1, since the first free throw
playing now” and “music was playing 5 seconds
starts a new run (whether it’s made or missed).
ago” are not independent, whereas “music is playCell C2 says: if the result of this free throw was
ing now” and “music was playing 10 minutes ago”
the same as the previous one, add one to the run
are much closer to being independent — if you
length; otherwise, start again at 1. As a formula,
know about one, it doesn’t tell you much about
this is =if(B2=B1,C1+1,1). Copy-and-paste this
the other.
all the way down column C. Then scan down column C for the largest value, which will be (most 4.8 Follow the instructions and see what happens.
likely) the longest run of successes, and eyeball
My results are summarized in the table below:
the runs of FALSE values in column B to find
Tosses Heads Proportion Deviation from half tosses
the longest run of misses. (Or you could have
50
33
0.66
8
column C be the current run of successes and D
150
82
0.55
7
be the current run of misses, and find the maxi300
159
0.53
9
mum of each.) My longest run of successes was
500
252
0.50
2
28 and my longest run of misses was only 1. (You
My applet appeared to have a limit of 500 tosses,
might want to enlarge the spreadsheet to see it
so I stopped there. I happened to get a lot of
better.)
heads early on, but even so the graph showed the
proportion of heads inching towards 50%. The
4.4 Do it and see. You might encounter music playing
deviation between the number of heads and half
6 times out of 8, which would give an estimated
2
the number of tosses was not quite so clear in
its trend; I actually ended up very close to 50-50
heads and tails, surprisingly so in fact, so the deviation didn’t convincingly increase for me. (The
question says “it may take a long time”.)
3/51, which is not the same as the probability of
an ace the first time. If the events “ace on first
card” and “ace on second card” were independent, these two probabilities would be the same;
they are not, so the events are not independent.
(Compare this with what would happen if, after
you drew the first card, you put it back in the
deck and shuffled thoroughly; then the chance of
an ace on the second card would still be 4/52,
and the two events would be independent. It’s
the fact that, in the given situation, you do not
put the card back that makes the independence
fail.)
4.14 Complement (“not 1”), 1 − 0.301 = 0.699.
4.15 Just add them up: 0.301 + 0.222 = 0.523. Or
you could do it without Example 4.13 by taking the probabilities for 1 and for 6, 7, 8 and 9
and adding them all up. The first digit can only
be one thing at a time, so the events are indeed
disjoint, as required for the addition rule. (See
example 4.14 for what happens when the events
4.25 The probabilities have to add up to 1, so
are not disjoint.)
P (AB) = 1 − 0.42 − 0.11 − 0.44 = 0.03. (b)
P
(B or O) = 0.11 + 0.44 = 0.55. (Note the slip4.16 Make a table of the sample space (the possible
periness of the English language: the question
outcomes) and the probabilities, with equal probsaid “and”, but we want the probability of “eiabilities for each outcome (“perfect die”). There
ther B or O”, since a person has only one type of
are 6 outcomes, 1 through 6, so the probability
blood and either one will do.)
of each is 1/6:
Outcome
1
Probability 1/6
2
1/6
3
1/6
4
1/6
5
1/6
6
1/6
4.27 (b) and (c) are legitimate, since the probabilities
add up to 1. (If the die or cards are fair, we’d
expect the probabilities to be the same, but the
question says nothing about fairness.) (a) is no
good since the probabilities add up to 2, more
than 1. (a) would be all right if it said something
like “for females, the probability of being fulltime is 0.44” and similarly for the others.
4.17 Coin tosses are independent, so you can multiply: (1/2) × (1/2) = 1/4.
4.18 There are only 51 cards left, of which only 3 are
aces (because you know that you just drew one).
So the probability that the next card is an ace is
3
4.28 (a) 0.23, to make the probabilities add up to 4.30 2, 3, 4 and 5 still have probability 16 = 0.167.
1. (b) Either add up the probs for French,
The probabilities for all 6 faces have to add up to
Asian/Pacific and Other to get 0.41, or take one
1, so
minus the prob for English, 1 − 0.59 = 0.41.
1 1 1 1
P (1) + + + + + 0.21 = 1
Of course, these probabilities vary widely by the
6 6 6 6
part of the country you’re looking at: the chance
which means that probability of a 1 has to be
of being a French speaker in Vancouver or a
1 − 0.877 = 0.123.
speaker of an Asian language in the Maritimes
are very small. You might also think that the
4.32 (a) is just 1/38. For (b), there are 18 numbers
“Asian/Pacific” figure looks very small, but peocoloured red, so the probability of the small ball
ple of this ethnic background live overwhelmingly
landing in one of them is 18/38. (Note that this
in Canada’s big cities, and almost none live in
is a little less than 0.5, but you are paid, if you
smaller cities and rural areas. This kind of diswin, at even money, so the casino is expecting to
cussion concerns “conditional probability”, which
make a little money off you every time you bet on
we don’t do, but you can read about in §4.5 if you
red). In (c), there are 12 winning numbers (count
wish.
them), so your probability of winning is 12/38.
(You are paid, if you win, at 2 to 1 for this bet,
4.29 (a) If you look carefully, “Some education bewhich would be fair if your winning probability
yond high school but no bachelor’s degree” is
was 1/3. Since it is a bit less, again the casino
the one missing from the given list, so add up
expects to make a little money off you.)
the given probabilities and subtract from 1 to
get 1 − (0.12 + 0.31 + 0.29) = 0.28. (There’s a
gap between “completed high school” and “com- 4.33 (a) Any rearrangement of 491 will also win; the
possibilities are 149, 194, 419, 491, 914, 941, six in
pleted university”, which is “started university
6
=
number. So the probability of winning is 1000
but didn’t finish”.) (b) “At least high school”
0.006.
(b)
Now
the
only
way
you
can
win
is
if
means that the person didn’t fail to complete
the winning number is exactly 222. So now your
high school (think carefully!), so the probability
1
probability of winning is 1000
= 0.001.
is 1 − 0.12 = 0.88. Or add up the probabilities
So the moral of the story in this kind of lottery
except for the first one, and including the one you
is “pick three different digits”.
found in (a).
4
4.35 A useful hint for “at least” problems like this
is to think of the event not happening. For “at
least 2” this does not happen if you get 1 or less;
for “at least 1” this does not happen if you get 0.
probabilities. This gives:
• P (RGRRR) = ( 26 )4 ( 64 ) =
2
243
= 0.00823.
• P (RGRRRG) = ( 62 )4 ( 46 )2 =
• P (GRRRRR) = ( 26 )5 ( 46 ) =
So how likely are none of the 10 people to be
universal donors? This is (1 − 0.07)10 = 0.4840
(that is, the probability that any one person is not
a universal donor is 1−0.07 and you want all 10 of
them not to be. Thus the probability of getting at
least one universal donor is 1 − 0.4840 = 0.5160.
4
= 0.00549.
729
2
= 0.00274.
729
The highest probability goes to the first one. You
can reason this out by looking carefully: there
are 4 reds and a green. The second and third
possibilities have 4 reds and a green, along with
something else, something whose probability is
less than 1. So these probabilities must be smaller
— you’re multiplying by a number less than 1.
4.37 To multiply probabilities, the events in question
have to be independent. But here, if a person is
aged 75 or over, that person is more likely to be a
woman because women live longer, so the events 4.39 Increases or decreases in any year are independent of previous years, so use the multiplication
“at least 75” and “woman” are not independent.
rule: 0.65 × 0.65 × 0.65 = 0.275. If the portfolio
(Think of the old people you know about: most of
has risen the last two years, this doesn’t tell you
them are probably women.) Check independence
anything about whether it will rise or fall in the
of two general events A and B by asking yourself
3rd year (this is what independence means), so
“if I knew that A happened, would that affect
just 1 − 0.65 = 0.35. In (c), the portfolio could go
the chances of B happening?” Or, if it’s easier to
either up both years or down both years. Work
think about, “if I knew that B happened, would
out the probability of each of those first (using
that affect the chances of A happening?” In this
the multiplication rule) and then add the results
problem, you could also ask “if I knew that a pertogether (disjoint events). Letting U be “up” and
son was a woman, would that affect the chances
D be “down”, P (U U ) = 0.65×0.65 = 0.4225 and
of that person being over 75?”, and the answer is
P (DD) = 0.35 × 0.35 = 0.1225, so the probabil(perhaps more obviously) yes.
ity of moving the same direction both years is
4.38 For a single face, P (R) = 62 and P (G) = 46 .
0.4225 + 0.1225 = 0.5450, a slightly better than
The die rolls are independent, so we can multiply
even chance.
5
4.41 If you draw a Venn diagram, you will see that
not only are “A and B” and “A and B c ” disjoint,
but they together make up the whole of A, so
their probabilities add up to P (A). In words,
whenever A happens, then either B happens or
B does not happen (B c happens). Thus
P (A and B) + P (A and B c ) = P (A).
A (one A from each parent), or B and B (in the
same way), or alleles A and B (in two ways: an A
from Hannah and a B from Jacob, or vice versa).
The following table shows what could happen:
From Hannah
A
A
B
B
(1)
Now A and B are independent, so P (A and B) =
P (A)P (B). Put this in (1) to get
P (A)P (B) + P (A and B c ) = P (A).
Child’s alleles
A and A
A and B
A and B
B and B
Blood type
A
AB
AB
B
Each one of these four rows is equally likely, so
their next child’s blood type could be A with
probability 1/4, AB with probability 2/4, or B
with probability 1/4.
(2)
Move P (A)P (B) to the right to get
P (A and B c ) = P (A) − P (A)P (B).
From Jacob
A
B
A
B
(3) 4.43 This is like 4.42, but be careful with the translation from the child’s alleles to blood type!
Then take out a common factor P (A):
From Nancy
B
B
O
O
P (A and B c ) = P (A)(1 − P (B)) = P (A)P (B c ).
(4)
This is what we were trying to show: the multiplication rule works for A and B c , therefore A
and B c are independent as well.
From David
B
O
B
O
Child’s alleles
B and B
B and O
B and O
O and O
Blood type
B
B
B
O
This time, a child can only be of blood types B
or O, with P (B) = 3/4 and P (O) = 1/4.
4.42 Read the stuff in italics above 4.42 carefully, because if you have not seen this stuff before it’s 4.44 This one is tricker because the parents have different alleles from each other. But the idea is
not obvious how it works. Here, Hannah has an
A and a B, one of which gets passed on to each
the same: write down the combinations of allechild, and Jacob also has an A and a B, ditto.
les that the children could inherit, and the blood
types that these would lead to.
One of their children could receive alleles A and
6
From Jennifer
A
A
O
O
From José Child’s alleles
A
A and A
B
A and B
A
A and O
B and O
B
Blood type
A
AB
A
B
Here, a child could be type A with probability
2/4, or AB or B each with probability 1/4.
For two children, since alleles are inherited independently, you can use the multiplication rule:
prob. that both are A is (2/4) × (2/4) = 4/16 =
1/4. To get the probability that they both have
the same blood type, use the same idea as in
4.39(c): they could both be A, both be AB, or
both be B. Find the probabilities of each of these
three things using the multiplication rule (A we
just did), and then add up the results to get
(2/4) × (2/4) + (1/4) × (1/4) + (1/4) × (1/4) =
6/16 = 3/8. It is a less than even chance that
they will have the same blood type, but if they
do, it is probably because they are both type A.
(You can see that the child’s blood type is not
immediately predictable from the parents’ blood
type alleles; you have to write down all the possibilities and figure it out each time. What is even
more difficult is if you only know the parents’
blood types, not their blood type alleles: if the
parent is blood type O, they must have alleles O
and O, but if their blood type is B, they could
have alleles B and B or B and O.)
7