程序代写案例-EECS 203

Exam 3
QUESTIONS PACKET
EECS 203
Practice Exam 2
Name (ALL CAPS):
Uniqname (ALL CAPS):
8-Digit UMID:
***MAKE SURE YOU HAVE PROBL
EMS 1 - 19 IN THIS BOOKLET.***
General Instructions
You have 120 minutes to complete this exam. You should have two exam packets.
• Questions Packet: Contains ALL of the questions for this exam, worth 100 points
total. There are 13 Multiple Choice questions (4 points each) and 6 Free Response
questions (8 points each). You may do scratch work on this part of the exam, but only
work in the Answers Packet will be graded.
• Answers Packet: Write all of your answers in the Answers Packet, including your
answers to multiple choice questions. For free response questions, you must show
your work! Answers alone will receive little or no credit.
• You may bring TWO 8.5” by 11” note sheet, front and back, created by you.
• You may NOT use any other sources of information, including but not limited to
electronic devices (including calculators), textbooks, or notes.
• After you complete the exam, sign the Honor Code Pledge on the front of the Answers
Packet.
• You must turn in both parts of this exam.
• You are not to discuss the exam until the solutions are published.
1
Part A1: Single Answer Multiple Choice
[Only one answer choice is correct in Part A1]
Problem 1. (4 points)
You play a game that involves rolling a 6-sided die and flipping a coin each round. If you
played 8 rounds of this game, how many possible outcomes are there?
(a) 8(6 · 2)
(b) 8(6 + 2)
(c) (6 + 2)8
(d) (6 · 2)8
(e) 62
Solution: (d) (6 · 2)8
Because each round you are rolling a 6-sided die AND flipping a coin, we will be using
the product rule to get the total number of possible outcomes per round. This gives us
6 · 2 outcomes per round. Next, since we want the outcomes of all 8 rounds combined,
we apply the product rule again to get (6 · 2)8
Problem 2. (4 points)
6 green balls, 8 blue balls, and 3 red balls are placed in a bag. You are asked to select 3 balls
from the bag without replacement. If the first ball you pick is green, what is the probability
that after all three picks, you end up with at least two green balls?
(a) 6·5
17·16
(b) 6·5·4
17·16·15
(c) 1− 11·10
17·16
(d) 1− 11·10
16·15
2
(e) 5
16
Solution: (d)
We are looking for the probability of drawing at least 1 green ball on your last two draws.
To find this, we can find the probability you pick no green balls on your last two draws,
and subtract that from 1. Because we are drawing without replacement, there are 16
total balls in the 16 bag on draw 2. The probability you don’t pick a green ball on your
second draw is the same as the probability of drawing a blue or red ball on your second
draw, which is 11/16 . Similarly, we find the probability for not drawing a green ball on
draw 3 to be 10/15. Multiplying these two probabilities and subtracting from 1 gives us
answer d.
3
Problem 3. (4 points)
Let G = T1∪T2, where T1 and T2 are each spanning trees with 8 and 12 vertices, respectively,
and T1 and T2 share no vertices. What is the sum of the degrees of each vertex in G?
(a) 40
(b) 20
(c) 18
(d) 36
(e) 64
Solution: (d)
Note that Trees are planar graphs, and thus, we can apply Euler’s Polyhedral formula
(v + f − e− c = 1) on each T1 and T2 to solve for the number of edges.
For T1:
v = 8 (given)
f = 1 (trees have 1 face)
e = unknown
c = 1 (trees are connected).
This gives us 8 + 1− e− 1 = 1 =⇒ e = 7 for T1.
For T2:
v = 12 (given)
f = 1 (trees have 1 face)
e = unknown
c = 1 (trees are connected).
This gives us 12 + 1− e− 1 = 1 =⇒ e = 11 for T2.
This means that G has 7 + 11 = 18 edges in total. By handshake theorem, the
sum of the degrees of all vertices is 2|E| = 2(18) = 36.
Problem 4. (4 points)
How many edges are in Kn ∪Km if they share exactly j vertices?
4
(a) mnj
(m−1)(n−1)(j−1)
(b)
(
n
2
)
+
(
m
2
)− (j
2
)
(c) m+ n− j
(d)
(
n
2
)
+
(
m
2
)
+
(
j
2
)
(e)
(
m+n−j
2
)
Solution: b
By Inclusion-Exclusion, we know that the number of edges in Kn ∪Km = the number of
edges in Kn + the number of edges in Km - the number of edges in Kn ∩Km.
Kn ∩ Km must be a complete graph with j vertices. So since there are
(
x
2
)
edges in a
complete graph with x vertices, there are
(
n
2
)
+
(
m
2
)− (j
2
)
edges in Kn ∪Km.
5
Problem 5. (4 points)
Hao has a bag of 14 identical cat treats. How many ways are there to give out all of Hao’s
treats to 5 differently colored cats with each cat receiving at least two treats?
(a)
(
14
5
)
5!
(b)
(
8
3
)
(c)
(
14
5
)
25
(d)
(
9
5
)
(e)
(
8
4
)
Solution: (e)
This is a balls ’n bars problem. The indistinguishable cat treats are the 14 balls and the
5 distinguishable cats mean 5-1=4 bars. Since each cat has to have at least 2 treats we
end up with 14− 2 · 5 = 4 balls left. 4 balls and 4 bars gives us (8
4
)
Problem 6. (4 points)
If p(E) = 0.8 and p(F ) = 0.4, what is the minimum possible value of p(E ∩ F )?
(a) 0
(b) 0.16
(c) 0.20
(d) 0.32
(e) 0.40
Solution: (c)
Using p(E ∪ F ) = p(E) + p(F ) − p(E ∩ F ). Rearranging, we get p(E ∩ F ) = p(E) +
p(F ) − p(E ∪ F ). We can plug in the values we know, getting 0.8 + 0.4 − p(E ∪ F ). If
we want to minimize this value, we want to subtract as much as possible. The largest
p(E ∪ F ) could be is 1 (since 0.8+0.4 is at least 1, but it should still be a probability)
This means the smallest p(E ∩ F ) can be is 0.8 + 0.4− 1 = 0.2
6
Problem 7. (4 points)
What is the tightest big-O bound on the runtime of this algorithm?
procedure happyfinal(n):
happyfinal(n/8)
happyfinal(n/8)
k = 1
for i := 1 to n:
for j := 1 to n:
k = k * 2
happyfinal(n/8)
happyfinal(n/8)
return
(a) O(

n)
(b) O(n log n)
(c) O(n2)
(d) O(n2/3)
(e) O(n2 log n)
Solution: (c)
The runtime for this algorithm, T (n), can be described as
T (n) = 4T (n/8) + n2
a = 4 because the function happyfinal is called 4 times, b = 8 because happyfinal is called
with input size ⌊n/8⌋, and d = 2 because the nested for loops run in n2 time (notice k
has nothing to do with the runtime of these loops). Applying the master theorem, we
observe that 4
82
< 1, so T (n) = O(nd) = O(n2).
Problem 8. (4 points)
What is the coefficient for the y18 term in the expansion of (5x5y2 + 8
x3
)24?
7
(a) 0
(b)
(
24
15
)
518 · 86
(c)
(
24
6
)
56 · 818
(d)
(
24
24
)
524 · 80
(e)
(
24
9
)
59 · 815
Solution: e
The binomial theorem tells us that
(5x5y2 +
8
x3
)24 =
24∑
k=0
(
24
k
)
(5x5y2)k(
8
x3
)24−k
We can simplify this to get
=
24∑
k=0
(
24
k
)
5k824−kx5k−3(24−k)y2k =
24∑
k=0
(
24
k
)
5k824−kx8k−72y2k
We want our term to have y18, so we need 2k = 18, so k = 9. Plugging this in, we get(
24
9
)
59824−9x8·9−72y2·9 =
(
24
9
)
59815x0y18 =
(
24
9
)
59815y18
8
Problem 9. (4 points)
Reminders: A standard deck has 52 cards with 4 suits (♡,♢,♣,♠) and 13 ranks (2, 3, . . . ,
10, Jack (J), Queen (Q), King (K), Ace (A)).
How many unique five-card hands have exactly 2 Queens and exactly 1 Heart? (The heart
is allowed to be one of the queens.)
(a)
(
4
2
)(
13
1
)(
36
2
)
(b)
(
4
2
)(
13
1
)(
36
2
)
+
(
4
1
)(
13
2
)(
36
2
)
(c)
(
4
2
)(
36
3
)
+
(
3
2
)(
13
1
)(
36
2
)
(d)
(
3
1
)(
36
3
)
+
(
3
2
)(
12
1
)(
36
2
)
Solution: (d)
If we have the Q♡ as our one heart then we need to choose one other queen and 3 other
non-heart and non-queen cards, so
(
3
1
)(
36
3
)
.
If don’t have the Q♡ then we need two queens of non-heart suits, one heart that is not
a queen, and 2 other cards, so
(
3
2
)(
12
1
)(
36
2
)
.
We have to add these two distinct cases, so our final answer is
(
3
1
)(
36
3
)
+
(
3
2
)(
12
1
)(
36
2
)
.
9
Part A2: Multiple Answer Multiple Choice
In this section, select ALL of the answers that are correct for each question.
Each question may have 0, 1, 2, 3, 4, or 5 correct answers.
Problem 10. (4 points)
Consider flipping a coin seven times. Which of the following are independent of the first two
flips coming up heads?
(a) At least one of the last 3 flips comes up heads
(b) Having exactly three heads
(c) Having the third flip turn up as heads
(d) Having at least one head
(e) Having exactly five tails
Solution: (a), (c)
(a) Since each flip are independent to each other, the first two does not have any effect
on the outcome of the last three flips.
(b) If the first two came up heads, we will only need 1 head in the remaining 5 flips.
However, if the first two didnt come up as both heads, then we will need 2 or 3 more
heads in the remaining 5 flips. Since these probabilities are different, they are not
independent.
(c) The third flip is independent to all the other flips including the first two flips.
(d) This is not independent. If the first two came up heads, the probability of having at
least one head is 1. However, if none of the two came up heads, the probability will
not be 1.
(e) Having exactly 5 tails can also be thought of as having exactly 2 heads. By a similar
reason to (b), this is also not independent.
Problem 11. (4 points)
10
Given f(n) = (n log n+ 3n)(2n3 + 5n2), which of the following are true?
a) f is O(n2 log n)
b) f is O(n!)
c) f is O(3n)
d) f is O(n4 log(log n))
e) f is O(n5)
Solution: b, c, e
We can find the tightest big-O estimate by ignoring leading coefficients and lower-order
terms to get (n log n)(n3) = n4 log n. Since big-O refers to an upper bound on runtime,
then f(n) will be big-O of any runtime larger or equal to n4 log n.
(a) f(n) /∈ O(n2 log n) since n2 log n < n4 log n
(b) f(n) ∈ O(n!) since n! ≥ n4 log n
(c) f(n) ∈ O(3n) since 3n ≥ n4 log n
(d) f(n) /∈ O(n4 log log n) since n4 log log n < n4 log n
(e) f(n) ∈ O(n5) since n5 ≥ n4 log n
11
Problem 12. (4 points)
Ashu has 100 cars. There are 30 that are painted red and there are 10 Fords. Suppose Ashu
selects one of the cars to give you uniformly at random. Let p(R) be the probability the car
Ashu selects is painted Red and let p(F ) be the probability the car Ashu selects is a Ford.
Which of the following could be true?
(a) p(F ∪R) = 0.35
(b) p(F ∩R) = 0.35
(c) p(F | R) = 0.5
(d) p(R | F ) = 1
(e) p(R | F ) = 0
Solution: (a), (d), (e)
(a) Possible
If 5 Fords are red and 5 are not. Then, 35 cars in total are Fords or Red. Then the
probability Ashu selected a Ford or Red car is 0.35
(b) Impossible
For this to be the case, you’d need 35 cars to be both Red and Ford. However, only
10 are Ford, so this is impossible with any overlap.
(c) Impossible
Even if all Ford cars are red, the maximum value for p(F | R) is = 10
30
= 1
3
, less than
0.5.
(d) Possible
If all 10 Fords are also Red, then the p(R | F ) = 10
10
= 1
(e) Possible
Ashu could not own any red Ford.
Problem 13. (4 points)
Which of the following are scenarios are counted with
(
8
4
)
?
(a) Number of binary strings of 8 bits, 4 of which are 1’s.
12
(b) Number of ways to give 1st through 4th awards to 8 racers
(c) Number of ways to pick four donuts out of five flavors
(d) Number of ways to pick five donuts out of four flavors
(e) Number of ways to put eight distinct balls into two identical boxes
Solution: (a), (c)
(a) we pick which 4 of the 8 bits are 1s. Picking the 3rd bit and then the 4th bit is the
same as picking the 4th bit and then the 3rd bit, so we don’t care about the order
of these 4 choices.
(b) Here, while we are picking 4 of 8 things, the order of our choices matters, as medals
for 1st and 2nd place are different.
(c) This is a balls and bars problem. The donuts are the balls, and the flavors are the
categories, so we need 4 bars between the 5 flavors. 4 balls and 4 bars has a count
of
(
8
4
)
as desired.
(d) This is also balls and bars, but now, we have 4 categories, so we only need 3 bars
between them. In this case, we have 5 balls and 3 bars, so there are
(
8
3
)
ways to do
this, which is not equal to
(
8
4
)
.
(e) This allows us to put the balls in unevenly if we wanted. For example, we might put
7 of them in the first box and the other ball in the second box. If we required that
the boxes each have 4 balls in them, it would still be off by a factor of 2 because the
boxes are identical.
13
Part B: Free Response
Problem 14. (8 points) You find an unfair six-sided die. The probabilities of rolling
each of the numbers 1 through 5 are identical and given by p. The expected value of a
single roll is exactly 5. What is the probability of rolling a 6?
Note: Your answer must not be in terms of p.
Solution:
Let S = {1, 2, 3, 4, 5, 6} and X(s) = s for all s ∈ S.
Probability of rolling a 6: Let q = 1− 5p be the probability of rolling a 6. Then
E(X) = pX(1) + pX(2) + pX(3) + pX(4) + pX(5) + qX(6)
= p+ 2p+ 3p+ 4p+ 5p+ 6q
= p · (1 + 2 + 3 + 4 + 5) + 6q
= p · (1 + 2 + 3 + 4 + 5) + 6(1− 5p)
= 15p+ 6− 30p
= −15p+ 6 = 5
This means that −15p = −1, so p = 1
15
. Therefore, q = 1− 5
15
= 10
15
= 2
3
.
Common Mistakes
• Using the expectation formulas for a geometric distribution.
Problem 15. (8 points)
Every day, Rafael buys exactly one of four products: toilet paper, chicken, eggs, or bread.
However, due to COVID-19, there are two restrictions from the supermarket. Firstly, he
cannot buy toilet paper two days in a row. Secondly, if he buys chicken on one day, he must
buy eggs on the next day.
(a) Find the recurrence relation for a(n), the number of choices he has to buy things over n
days.
(b) What are the initial conditions for the recurrence relation from Part (a)? To get full
credit, you must use the fewest initial conditions necessary for your recurrence.
14
Solution:
Let TP be toilet paper, C chicken, E eggs, and B bread.
Consider what Rafael buys on the first day
• Case 1: Rafael buys eggs or bread on the first day. There are no restrictions for
the second day, so there are 2a(n− 1) ways.
• Case 2: Rafael buys chicken on the first day. Then he must buy eggs on the second
day. After that there are no restrictions, so there are a(n− 2) ways.
• Case 3: Rafael buys TP on the first day, and not chicken on the second. That
means on the second day he buys either eggs or bread. After that there are no
restrictions, so there are 2a(n− 2) ways.
• Case 4: Rafael buys TP on the first day, chicken on the second. Then he must buy
eggs the next day, so there are a(n− 3) ways.
Taking the sum of these cases, the relation is
a(n) = 2a(n− 1) + 3a(n− 2) + a(n− 3)
.
The relevant initial conditions are:
1. a(0) = 1
2. a(1) = 4
3. a(2) = 12 = [TP, C/B/E] + [C, E] + [B/E, all]= 3 + 1 + 2(4)
OR
1. a(1) = 4
2. a(2) = 12
3. a(3) = 37
Common mistakes for the above method:
1. Not considering that Case 4, which starts with with (TP, Chicken), must have Eggs
as the third item. This led to students combining Case 3 and Case 4 and counting
that as 3a(n− 2)
2. Counting Case 1 as a(n− 1) instead of 2a(n− 1)
3. Incorrect base cases (see General common mistakes section)
15
Consider what Rafael does on the nth day :
First note these details of this problem:
• Chicken does not have to be in front of Eggs. We can have (Bread, Eggs) or (TP,
Eggs) or (Eggs, Eggs) as well. This is because the implication only promises that
if we have Chicken, then we have Eggs on the next day.
• Chicken can be bought on the last day. After this point, if (when?) he goes
shopping on day n+1, he would have to buy eggs, though.
• (Chicken, Bread) or (Chicken, TP) or (Chicken, Chicken) are invalid because Eggs
must follow after Chicken.
So, the case that ends with Eggs in the nth position is the same as the number of valid
strings of length n− 1 (so there are a(n− 1) ways).
But the case that ends with Bread on the nth day is not equal to a(n− 1).
This is because some strings have Chicken in the n − 1 position. With Bread in
the nth position this would count cases ending with (Chicken, Bread). (We encounter
the same problem when trying to count the number of strings that end in TP or Chicken).
There is no reasonable solution to this issue that is within the scope of this class.
We did not intend for this approach to be so difficult and have adjusted our grading to
be very generous.
However, full points could not be given to students who did not understand the rules
specified in this problem. Many students made incorrect assumptions or counted invalid
cases.
Common mistakes for this method:
• Assuming that Chicken always comes before Eggs.
– This was most often counted by saying that there are a(n − 2) ways to end
with Eggs in the nth position (thinking that we must have had Chicken in the
n− 1 position).
• Assuming that Chicken was not allowed to be in the nth position
• Including invalid cases where Chicken could come before an item other than Eggs.
– A common example of this was saying that there are a(n− 1) cases that end
with Chicken. This incorrectly counts cases that end with (Chicken, Chicken)
16
– Some students did account for this for the n − 1 position but then did not
recognize that we face this issue again for the n−2 position. For example, a(n−
2) does not count the number of strings that end in (Bread, Chicken) because
that includes counting invalid strings that have (Chicken, Bread, Chicken).
– Ugh, yes, this is such a mess!
General other common mistakes
• Not including the correct number of base cases for the student’s recurrence relation
given. (If an answer had an incorrect recurrence relation like a(n) = 2a(n − 1) +
a(n− 2), providing 3 bases is incorrect).
• Having an incorrect value for a(2) = 12. (Note simply writing out each possible
case is probably the easiest way to find this).
• Not realizing that we are allowed to start with base case a(0). This question did
not require students to use a(0) as a base case. But a(3) is difficult to find and
answers were often incorrect
• Saying that a(0) = 0. There is actually one way for Rafael to buy zero items, so
a(0) = 1
Problem 16. (8 points)
Paul Prime
Paul has quit his IA job to work for Amazon. Paul commutes to work either by car or by
jetpack. Paul drives his car 35% of the time and flies his jetpack 65% of the time.
• When he drives his car, he has a 10% chance of being late.
• When he flies his jetpack, he has a 1% chance of being late.
Paul arrives late today. What is the probability he drove his car to work?
Solution:
We’re going to use events C to mean Paul drives his car and J to mean Paul flies his
jetpack, and L to mean Paul arrives late.
17
P (C) = 0.35
P (J) = 0.65
Given probabilities
P (L | C) = 0.1
P (L | J) = 0.01
To find the conditional probability,
p(C | L) = p(L | C)p(C)
p(L)
=
0.1 · 0.35
(0.1 · 0.35 + 0.01 · 0.65) ≈ 0.8434
We get p(L) by
p(L) = p(L ∩ C) + p(L ∩ C)
= p(L | J)p(J) + p(L | C)p(C)
Common Mistakes
• Saying that p(L | J) = 0.1 instead of 0.01 (misreading the given information)
18
Problem 17. (8 points) Suppose G is a connected graph with n vertices and n
edges. Prove that it contains exactly one cycle (no more, no less).
Hint: You may use the fact that in a spanning tree every pair of vertices has a unique path
between them.
Solution: Let G be a connected graph with n vertices and edges. Because G is
connected, it contains at least one spanning tree, T , which spans all n vertices with
n− 1 edges. This means that the spanning tree has all but 1 of the n edges in G.
Let e be this missing edge which is in G, but not in T. (That is, when you add e to T ,
we get G). Let vertices u, v be the endpoints of e. There exists exactly 1 unique path, p1
between u and v, by definition of a spanning tree, which means that when you add e to
t to get G, you get at least one unique cycle containing e, c1, which comprises of p1 and e.
Now, to prove that this is the only cycle in G, suppose there is some other cy-
cle, c2. If c2 does not contain e, then it must be in T , which is a contradiction,
because a spanning tree cannot have any cycles. If c2 contains e, then it must con-
tain e as well as some path p2 from u to v. However, because spanning trees have a
unique path between any 2 vertices, p1 = p2, which means c1 is the same exact cycle as c2.
Thus, G has exactly 1 cycle.
Problem 18. (8 points)
Poker hands
You are dealt a 5 card poker hand from a standard deck. What is the probability that your
poker hand will have four kings given that it has at least two kings?
Note: A standard 52-card deck that comprises 13 ranks with four suits each.
Solution:
Let E be the event that we have 4 kings in our hand and F be the event that we have
at least 2 kings in our hand. We are looking for p(E|F ). By the definition of conditional
probability, p(E|F ) = p(E∩F )
p(F )
= |E∩F ||F | (because the sample space we use has equally likely
outcomes).
To find |F |, we can break it into 3 cases:
19
(1) Exactly two kings:
(
4
2
)(
48
3
)
(2) Exactly three kings:
(
4
3
)(
48
2
)
(3) Exactly four kings:
(
4
4
)(
48
1
)
|F | = Case 1 + Case 2 + Case 3 = (4
2
)(
48
3
)
+ 4
(
48
2
)
+
(
48
1
)
|E ∩ F | = |E| = (4
4
)(
48
1
)
p(E|F ) = |E ∩ F ||F | =
(
48
1
)(
4
2
)(
48
3
)
+ 4
(
48
2
)
+
(
48
1
)
Alternate Solution:
Instead of directly counting the hands with 2, 3, or 4 kings, we can count the hands
that don’t. The total number of ways we can have at least 2 kings is the total number
of hands with no restrictions, with hands with 0 and 1 king subtracted out. This gives(
52
5
)− (48
5
)− (4
1
)(
48
4
)
. The number of hands with 4 kings and at least 2 kings is still
(
48
1
)
.
Thus,
p(E|F ) =
(
48
1
)(
52
5
)− (48
5
)− (4
1
)(
48
4
)
Common Mistakes:
• Assuming we were given a hand with exactly 2 kings, not at least 2 kings
• Not accounting for hands with 0 kings (alternate solution)
• Dealing with ordered hands and unordered hands together (either could work, but
you need to be consistent)
• Including
(
13
1
)
to select a rank (for the kings). If we are counting hands with
specified numbers of Kings (a fixed rank), there’s only 1 way to pick that fixed
rank: King.
• In some problems, you can compute conditional probability by assuming the con-
dition has happened and finding the probability (see problem 16 first solution for
an example), but sadly that doesn’t work for this problem. The trouble is that we
aren’t given which cards are kings, combined with the possibility that we have more
than just 2. If we are imagining ordered cards, then this undercounts the cases with
only 2 kings, as if your hand starts with nonkings, but then has 2 kings later, it
is still a hand with at least 2 kings, but you didn’t count it. If we are imagining
unordered cards, this overcounts the cases with 4 kings, as it counts them multiple
times, once for each way we can pick the 2 “special” ones we started with. Either
20
way, this will make our conditional probability higher than it should be. To see
some other simpler examples of this, Problem 8 on this exam and HW8 problem
6. Additionally, you can enumerate the outcomes of a tiny example such as “flip 2
coins, what is the probability that they are both heads given that at least one is?”
Problem 19. (8 points)
In a best-of-three series between the Milwaukee Brewers and Chicago Cubs, the Cubs are
favored such that for each game played, the probability the Cubs win is 2
3
and the probability
the Brewers win is 1
3
. As soon as one team has won 2 games, the series is over and no more
games are played.
(a) What is the probability that the series ends in 2 games? Express your answer as a single,
fully simplified number.
(b) What is the expected number of games played in the series? Express your answer as a
single, fully simplified number.
Solution:
(a) The series ends in 2 games if the Milwaukee Brewers win the first 2 games or if the
Chicago Cubs win the first 2 games. Thus the probability would be
p(Brewers win in 2) + p(Cubs win in 2) =
(
1
3
)2
+
(
2
3
)2
= 1
9
+ 4
9
= 5
9
(b) In this series, either 2 or 3 will be played in total, these two events are disjoint. Let
X represent the total number of games played.
p(X = 2) = 5
9
from part a
p(X = 3) = 1− p(X = 2) = 1− 5
9
= 4
9
Alternatively, for one team to win in 3 games, they must have won the last
game. We have to decide which of the first 2 games the other team won using the
binomial distribution. Thus we have
p(X = 3) = p(Brewers win in 3) + p(Cubs win in 3)=
((
2
1
) · 1
3
· 2
3
)· 1
3
+
((
2
1
) · 1
3
· 2
3
)· 2
3
=
21
4
27
+ 8
27
= 12
27
= 4
9
Finally, the expected value would be
E(X) =
5
9
· 2 + 4
9
· 3 = 10
9
+
12
9
=
22
9
22
This page intentionally left blank. Scratch work only! This page will not be graded.
23
This page intentionally left blank. Scratch work only! This page will not be graded.
24
This page intentionally left blank. Scratch work only! This page will not be graded.
25

欢迎咨询51作业君
51作业君 51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: ITCSdaixie