2023 Midterm Exam Solutions
2023 Midterm Exam Solutions
Midterm Exam
Pellumb Reshidi
Friday February 17, 8:30am - 9:45am
During this exam, you may use one double-sided “cheat sheet” of notes and a calculator.
Instructions:
• Write your name and sign the Honor Pledge below.
• Write your name legibly at the top of each page.
• Place your student ID on the desk in front of you for the duration of the exam.
• You must show your work; simply writing the correct final number will not count as an answer.
Duke University is a community dedicated to scholarship, leadership, and service and to the principles
of honesty, fairness, respect, and accountability. Citizens of this community commit to reflect upon and
uphold these principles in all academic and nonacademic endeavors, and to protect and promote a culture
of integrity.
https://trinity.duke.edu/undergraduate/academic-policies/community-standard-student-conduct
Duke Honor Pledge: I have not given, used, or received any unauthorized assistance on this assignment.
Signature:
Student ID:
ii. (5 points) B ∩ C C
B ∩ {{0, 1, 3}, {0, 2, 3}, {1, 1, 3}, {1, 2, 3}} = {{0, 2, 3}, {1, 1, 3}}
iii. (5 points) A ∩ B ∩ C
A ∩ B ∩ C=Ø
1
First and Last Name:
(b) (5 points) We want to form one group of 4 economists (the order of group members doesn’t
matter). In how many ways can this be done?
15 15!
= = 1365
4 4!(15 − 4)!
(c) (5 points) If 5 workers are randomly selected to receive a bonus, with each worker having an equal
probability of being selected, what is the probability that all 5 workers are economists?
15
5
20
= 0.193692
5
(d) (5 points) If 2 workers are randomly selected, with each worker having an equal probability of
being selected, what is the probability that one is an economist, and one is a programmer?
15
5
1 · 1
20
= 0.394737
2
(e) (5 points) For an end-of-the-year event the company decides to organize sports activities. If
the workers are randomly split into two equal groups of 10, what’s the probability that all 5
programmers end up in the same group?
We can think of this question as what’s the probability that 10 economists end up in the same
(15)
group? The probability that 10 economists end up in the first group is 10 = 0.0162539. The
(20
10)
probability that 10 economists end up in the second group is the same as above. Thus the total
probability that 10 economists end up in the same group is:
15
10
20
· 2 = 0.0325077
10
Alternative way: The total number of ways to split 20 workers into two groups of 10 is 20
10 . If 5
programmers are in the first group, we need to choose 5 economists to fill in the rest of the group.
There are 155 ways to do this. If 5 programmers are in the second group, we need to choose 5
economists to fill in the rest of the group. Again, there are 15
5 ways to do this. Leading to:
15 15
5 + 5 3003 + 3003
20
= = 0.0325077
10
184, 756
2
First and Last Name:
B
1 2 3
1 0 0.15 0.20
A
2 0.25 0.15 0.25
(a) (4 points) Graph/plot the marginal pmf of B (marginal distribution of B), and the corresponding
CDF.
First, we calculate the marginal pmf of B:
p(b) F(b)
B
0.45
0.30
0.55
0.25
0.25
b b
0 1 2 3 4 0 1 2 3 4
pA (1) = pAB (1, 1) + pAB (1, 2) + pAB (1, 3) = 0 + 0.15 + 0.20 = 0.35
pA (2) = pAB (2, 1) + pAB (2, 2) + pAB (2, 3) = 0.25 + 0.15 + 0.25 = 0.65
3
First and Last Name:
B
1 2 3
1 0 0.15 0.20
A
2 0.25 0.15 0.25
E(Y ) = pAB (1, 1)12 · 1 + pAB (1, 2)12 · 2 + pAB (1, 3)12 · 3
+ pAB (2, 1)22 · 1 + pAB (2, 2)22 · 2 + pAB (2, 3)22 · 3
= 0 · 1 + 0.15 · 2 + 0.20 · 3 + 0.25 · 4 + 0.15 · 8 + 0.25 · 12 = 6.1
4
First and Last Name:
4. (12 points) Random variable X has the following Cumulative Distribution Function CDF.
0 if x<0
F (X) = x3
if 0≤x≤3
27
1 if x>3
Calculate E(X).
R3
We know that E(X) = 0 xf (x)dx. First, we find f (x) by differentiating the CDF
dF (x) x2
= f (x) = ,
dx 9
then we simply plug this value in the expected value formula and integrate
Z 3 Z 3 3
x2 x x4 3 34 − 04 81 9
E(X) = x · dx = dx = = = = = 2.25
0 9 0 9 36 0 36 36 4