ExerciseSet2 Updated Solutions
ExerciseSet2 Updated Solutions
Solutions
Emir Hidovic
September 24, 2024
Problem 1 - Solution
Temperatures (in degrees Celsius):
10, 20, 25, 25, 20, 20
Ordered data:
10, 20, 20, 20, 25, 25
Where n = 6 and xi are the individual data points. Substituting the values:
10 + 20 + 25 + 25 + 20 + 20 120
x̄ = = = 20
6 6
Thus, the mean temperature is 20 C.
The formula for the sample standard deviation is:
v
u n
u 1 X
s=t (xi x̄)2
n 1 i=1
1
(b) Median, Q1, and Q3
Median: Since the data set contains n = 6 values (an even number), the median
is the average of the 3rd and 4th values. The formula is:
x n2 + x n2 +1
Median =
2
Substituting the values:
20 + 20
Median = = 20
2
Thus, the median is 20 C.
For n = 6:
Q1 = x 6+1 = x 74 = x1.75
4
For n = 6:
Q3 = x 3(6+1) = x 21
4
= x5.25
4
Interpolating:
Q3 = (1 0.25) ⇥ x5 + 0.25 ⇥ x6 = (0.75) ⇥ 25 + (0.25) ⇥ 25 = 18.75 + 6.25 = 25
Thus, Q3 = 25 C.
Problem 2 - Solution
(a) Interpretation of the histogram:
The histogram of the variable ”height” is unimodal, with a single peak and
appears to be symmetric, indicating that the distribution is approximately
normal. The majority of students have heights clustered around the center,
likely between 160 cm and 180 cm. The range of heights spans from 151 cm
to 192 cm, with no extreme outliers. Overall, the distribution shows a mod-
erate spread, with most students falling within a typical height range, and no
significant skewness is observed.
2
(b)
n
1X
x̄ = xi = 171.1818
n i=1
n
X
1
s2 = (xi x̄)2 = 107.78
n 1 i=1
v
u n
u 1 X
s=t (xi x̄)2 = 10.39
n 1 i=1
Position of Data
Data positions: 151, 154, 159, 163, 163, 164, 166, 166, 168, 169, 171, 171, 172, 174, 174, 176, 179, 181, 182, 185, 186, 1
Position of median:
n+1
Position = = 11.5 ) Median = 171
2
Position of Q1:
(n + 1) · 3 (179 + 180)
Position = = 17.25 ) Q3 = = 179.25
4 2
Interquartile Range (IQR):
Problem 3 - Solutions
a.
Let H be the event that the spectator you meet is wearing a hat and G be the
event that the spectator is wearing gloves. Are H and G disjoint events? What
is the probability that the spectator you meet is wearing a hat or gloves, i.e.,
what is P (H [ G)?
SOLUTION: No, these are not disjoint events, because there are some
spectators wearing both hats and gloves. That is, P (H \ G) = 0.05. The
probability that the spectator is wearing a hat or gloves is:
3
b.
The spectator you meet is wearing a hat. What is the probability that the
spectator is a woman?
SOLUTION: We know that the spectator is wearing a hat. That’s given.
Given that they are wearing a hat, we need to find the probability that the
spectator is a woman. Let W stand for woman and H stand for hat. First, we
need to find the probability that a particular spectator is both a woman and
wearing a hat.
P (H \ W ) P (H \ W )
P (H|W ) = =) 0.70 =
P (W ) 0.60
Thus,
P (H \ W ) = 0.42
Then,
P (H \ W ) 0.42
P (W |H) = = = 0.84
P (H) 0.50
c.
What is the probability that the spectator you meet is a woman who is wearing
a hat?
SOLUTION: We already found the solution to this while answering the
previous part. There is a probability of 0.42 that the spectator is a woman who
is wearing a hat.
d.
Are the events ”wearing a hat” and ”woman” independent?
SOLUTION: If the two events are independent, then P (H \ W ) = P (H) ⇥
P (W ). So,
P (H \ W ) = 0.50 ⇥ 0.60 = 0.30
But we just found that P (H \ W ) = 0.42 in the previous parts. This means
that the two events cannot be independent.
Problem 4 - Solutions
What is the probability that the taxi involved in the accident was Blue?
SOLUTION: This question requires the use of Bayes’ Rule. Let B stand
for ”the Blue company is responsible,” let G stand for ”the Green company
is responsible,” and let T B stand for ”the witness testified that it was Blue.”
Then, we have:
P (T B|B) · P (B)
P (B|T B) =
P (T B|B) · P (B) + P (T B|G) · P (G)
4
Substituting the values:
0.8 ⇥ 0.85
P (B|T B) =
(0.8 ⇥ 0.85) + (0.2 ⇥ 0.15)
Calculating further:
0.68
P (B|T B) =
0.68 + 0.03
Finally,
Problem 5 - Solutions
(a) Calculate the expected gross returns E(X) from the
investment.
SOLUTION:
X
E(X) = pi xi = (0.1 · 1) + (0.5 · 2) + (0.3 · 5) + (0.1 · 10) = 3.6
i
2
X = 0.68 + 1.28 + 0.59 + 4.10
2
X = 6.65
X = 2.58
The answer is $2.58 million.
5
The expected net return on Z is $2,680,000. For the standard deviation, we’ll
start from the rules on variance.
So,
Z ⇡ 2.06 million, or rather $2, 060, 000.
Problem 6 - Solutions
(a) Using the percentages given above, define the probabilities asso-
ciated with the outcomes of the referendum. (5 points)
P (leaving) = 0.6
P (not leaving) = 0.4
(b) What is the expected profit and the standard deviation of the
profit of the plant that your company owns in country E. (10 points)
The expected profit:
X
µx = xi pi = 0.6 ⇥ 20 + 0.4 ⇥ 10 = 16
(c) Calculate the expected profit and the standard deviation of the
profit in Euros. (10 points)
We use a linear transformation for conversion:
y = 0.87x
6
Expected profit in Euros:
P (R | leaving) = 0.75
P (L | leaving) = 0.25
P (R | not leaving) = 0.25
P (L | not leaving) = 0.75
(e) Tree diagram and Venn diagram representing the potential
outcomes of referendum and election results. (10 points)
Tree Diagram:
Referendum
Leaving R
7
(h) Calculate the expected profit in Dollars and the standard devi-
ation of the profits of the plant in E if candidate R wins the election.
(5 points)
Expected profit:
µx = 0.82 ⇥ 20 + 0.18 ⇥ 10 = 18.2
Standard deviation:
p
x = (20 18.2)2 ⇥ 0.82 + (10 18.2)2 ⇥ 0.18 = 3.84
Problem 7 - Solutions
(a) X = {0, 1, 2, 3, 4}
(b)
P (X = 0) = (0.9)(0.9)(0.9)(0.9) = 0.6561
P (X = 1) = 4(0.9)(0.9)(0.9)(0.1) = 0.2916
P (X = 2) = 6(0.9)(0.9)(0.1)(0.1) = 0.0486
P (X = 3) = 4(0.9)(0.1)(0.1)(0.1) = 0.0036
P (X = 4) = (0.1)(0.1)(0.1)(0.1) = 0.0001
(c)
P (X 3) = P (X = 3) + P (X = 4) = 0.0036 + 0.0001 = 0.0037
(d)
E(X) = µ = np = 4 ⇥ 0.1 = 0.4
(e)
2
X = np(1 p) = 4(0.1)(1 0.1) = 0.36
(f)
E(X) = µX = np = 20 ⇥ 0.1 = 2
(g)
2
X = np(1 p) = 20(0.1)(1 0.1) = 1.8
(h) 0 1
✓ ◆
X µX 0.05 0.1 A
P z < 0.05 ) P @ 1.645 q < 0.05
X 0.1⇥0.9
n
r
0.05 0.1 0.1 ⇥ 0.9
1.645 q ) 1.645 0.05
0.1⇥0.9 n
n
✓ ◆2
0.1 ⇥ 0.9 0.05 0.1 ⇥ 0.9
)n )n 97.41
n 1.645 0.05 2
1.645
Therefore, at least 98 projects are required.
8
OBS: For questions (d) and (e), you could have also used the general for-
mulas: X X
2
µX = xi pi and X = (xi µX )2 pi ,
but the calculations become more complicated
Problem 8 - Solutions
(a) The general formula for binomial probability:
n!
P (X = k) = pk (1 p)n k
(n k)!k!
P (X 3) = 1 P (X = 0) P (X = 1) P (X = 2)
9
(c) The expected value of X is given by:
µk e µ
P (X = k) =
k!
Substituting µ = 5.4 and k = 7:
5.47 e 5.4
P (X = 7) =
7!
Simplifying:
11593.96 ⇥ 0.0045
P (X = 7) ⇡ ⇡ 0.1038
5040
So, the probability of observing exactly 7 aphids is approximately 0.1038.
(b) The probability of observing 5 or fewer aphids is the sum of the probabil-
ities for X = 0, 1, 2, . . . , 5:
5
X 5.4k e 5.4
P (X 5) =
k!
k=0
5.40 e 5.4
5.41 e 5.4
5.45 e 5.4
P (X 5) = + + ··· +
0! 1! 5!
The result from summing these terms gives:
P (X 5) ⇡ 0.4457
(a) The probability that the drug successfully treats a patient is:
P (success) = p = 0.7
10
(b) The probability that the drug fails to treat a patient is:
(c) The expected value and variance of the treatment outcome for a single
patient are given by the following formulas for a Bernoulli distribution:
E(X) = p = 0.7
Substituting p = 0.7:
10!
P (X = 7) = (0.7)7 (0.3)3
7!(10 7)!
Simplifying:
10 ⇥ 9 ⇥ 8
P (X = 7) = (0.7)7 (0.3)3 ⇡ 120 ⇥ 0.0824 ⇥ 0.027 ⇡ 0.271
3!
So, the probability that exactly 7 patients are successfully treated is ap-
proximately 0.271.
11