0% found this document useful (0 votes)
9 views11 pages

ExerciseSet2 Updated Solutions

Uploaded by

edwardliu422
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views11 pages

ExerciseSet2 Updated Solutions

Uploaded by

edwardliu422
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Exercise Set 2 for Quiz 1: Fall 2024 - Stats -

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

(a) Mean and Standard Deviation


The formula for the mean is:
n
1X
x̄ = xi
n i=1

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

Substituting the values:


r
1
s= [(10 20)2 + (20 20)2 + (25 20)2 + (25 20)2 + (20 20)2 + (20 20)2 ]
5
r r
1 150 p
s= [100 + 0 + 25 + 25 + 0 + 0] = = 30 ⇡ 5.48
5 5
Thus, the standard deviation is approximately 5.48 C.

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.

The first quartile Q1 is found using the formula:


Q1 = x n+1
4

For n = 6:
Q1 = x 6+1 = x 74 = x1.75
4

To interpolate, we use the formula:


Q1 = (1 0.75) ⇥ x1 + 0.75 ⇥ x2 = (0.25) ⇥ 10 + (0.75) ⇥ 20 = 2.5 + 15 = 17.5
Thus, Q1 = 17.5 C.

The third quartile Q3 is found using the formula:


Q3 = x 3(n+1)
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 (163.5 + 164)


Position = = 5.75 ) Q1 = = 163.75
4 2
Position of Q3:

(n + 1) · 3 (179 + 180)
Position = = 17.25 ) Q3 = = 179.25
4 2
Interquartile Range (IQR):

IQR = Q3 Q1 = 179.25 163.75 = 15.50

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:

P (H [ G) = P (H) + P (G) P (H \ G) = 0.50 + 0.10 0.05 = 0.55

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,

P (B|T B) ⇡ 0.958 ⇡ 0.96

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

The answer is $3.6 million.

(b) Calculate the standard deviation X of the gross re-


turns.
SOLUTION: X
2
X = pi (xi E(X))2
i
2
X = [0.1(( 2.6) )] + [0.5(( 1.6)2 )] + [0.3((1.4)2 )] + [0.1((6.4)2 )]
2

2
X = 0.68 + 1.28 + 0.59 + 4.10
2
X = 6.65
X = 2.58
The answer is $2.58 million.

(c) Let Z be the random variable that describes the net


returns of the investment. How is Z related to X? What is
the expected net return and the standard deviation of the
net returns?
SOLUTION: Z is a linear transformation of X. The expected net return on
Z is
E( 0.2 + 0.8X) = 0.2 + 0.8(3.6) = 2.68

5
The expected net return on Z is $2,680,000. For the standard deviation, we’ll
start from the rules on variance.

Var( 0.2 + 0.8X) = (0.82 ) 2


X = (0.64)(6.65) = 4.25

So,
Z ⇡ 2.06 million, or rather $2, 060, 000.

(d) What is the total net return on the two investments?


SOLUTION:

E(Z + Y ) = 2, 680, 000 + 3, 000, 000 = 5, 680, 000

(e) What is the standard deviation on the total net returns


from the two investments?
SOLUTION: We’ll again start from the rules for variance
2 2
Var(Z + Y ) = Z + Y + 2⇢ Z Y = 4.25 + 4 + (2(0.15)(2.06)(2)) ⇡ 9.49 million.

So the standard deviation is approximately $3.08 million.

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

The standard deviation:


qX p p
x = (xi µx )2 pi = (20 16)2 ⇥ 0.6 + (10 16)2 ⇥ 0.4 = 24 = 4.90

(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:

µy = 0.87 ⇥ µx = 0.87 ⇥ 16 = 13.92

Standard deviation in Euros:

y = 0.87 ⇥ x = 0.87 ⇥ 4.90 = 4.26

(d) Define the conditional probabilities associated with each po-


tential outcome. (5 points)

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 (0.6) Not Leaving (0.4)

R (0.75) L (0.25) R (0.25) L (0.75)


Venn Diagram:

Leaving R

(f ) Calculate the probability that candidate R wins the election.


(5 points)

P (R) = P (R | leaving)P (leaving)+P (R | not leaving)P (not leaving) = 0.75⇥0.6+0.25⇥0.4 = 0.55


(g) Calculate the probability that country E leaves the trade agree-
ment if candidate R wins the election. (5 points)

P (R and leaving) 0.75 ⇥ 0.6


P (leaving | R) = = = 0.82
P (R) 0.55

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!

For P (X = 2), where n = 12 and p = 0.1:


12!
P (X = 2) = (0.1)2 (1 0.1)12 2
(12 2)!2!
Simplifying:
12 ⇥ 11
P (X = 2) = (0.01)(0.35)
2
P (X = 2) = 0.23

(b) Instead of calculating the probability for X = 3, 4, . . . , 12, we calculate the


probability that the number of complaints is not 0, 1, or 2. We already
know P (X = 2), so now calculate P (X = 0) and P (X = 1):
For P (X = 0):
12!
P (X = 0) = (0.1)0 (1 0.1)12 0
(12 0)!0!
Simplifying:
12
P (X = 0) = (1)(0.28) = 0.28
12
For P (X = 1):
12!
P (X = 1) = (0.1)1 (1 0.1)12 1
(12 1)!1!
Simplifying:
12
P (X = 1) = (0.1)(0.31) = 0.37
1
The probability that three or more customers complained is:

P (X 3) = 1 P (X = 0) P (X = 1) P (X = 2)

P (X 3) = 1 0.28 0.37 0.23 = 0.12

9
(c) The expected value of X is given by:

E(X) = µX = np = 12 ⇥ 0.1 = 1.2

Problem 9: Poisson Distribution


The number of aphids on a shoot of a Mexican butterfly weed follows a
Poisson distribution with mean µ = 5.4 aphids.

(a) The probability of observing exactly 7 aphids on a shoot is given by the


Poisson probability mass function:

µ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

Calculating each term:

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

So, the probability of observing 5 or fewer aphids is approximately 0.4457.

Problem 10: Bernoulli vs. Binomial Distribution


The drug has a probability p = 0.7 of successfully treating a patient. The
treatment outcomes for each patient follow a Bernoulli distribution.

(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:

P (failure) = 1 p=1 0.7 = 0.3

(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

Var(X) = p(1 p) = 0.7(1 0.7) = 0.7 ⇥ 0.3 = 0.21


So, the expected value is 0.7, and the variance is 0.21.
(d) If 10 patients are treated with this drug, the probability that exactly 7
patients are successfully treated follows a binomial distribution:
✓ ◆
10 7
P (X = 7) = p (1 p)10 7
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

You might also like