1 (3 points)

Kurskod: TAMS11
Provkod: TENB
21 March 2015, 14:00-18:00
Examiner: Xiangfeng Yang (Tel: 070 2234765). Please answer in ENGLISH if you can.
a. You are allowed to use:
• a calculator;
• formel -och tabellsamling i matematisk statistik (from MAI);
• TAMS 11: Notations and Formulae (by Xiangfeng Yang),
• a dictionary.
b. Scores rating: 8-11 points giving rate 3; 11.5-14.5 points giving rate 4; 15-18 points giving rate 5.
English Version (no Swedish Version)
1
(3 points)
At a certain gas station, 40% of the customers use regular gas, 35% use plus gas, and 25% use premium. Of those
customers using regular gas, only 30% fill their tanks. Of those customers using plus gas, 60% fill their tanks, whereas
of those using premium, 50% fill their tanks.
(1.1). (1p) What is the probability that the next customer will request plus gas and fill the tank ?
(1.2). (1p) What is the probability that the next customer fills the tank ?
(1.3). (1p) If one knows that the next customer fills the tank, what is the probability that regular gas is requested ?
Solution. What we can get from the problem is the following:
P (regular) = 40%,
P (plus) = 35%,
P (f ill|regular) = 30%,
P (premium) = 25%,
P (f ill|plus) = 60%,
P (f ill|premium) = 50%.
(1.1).
P (plus and f ill) = P (plus) × P (f ill|plus) = 35% × 60% = 21%.
(1.2).
P (f ill) = P (f ill|regular) × P (regular) + P (f ill|plus) × P (plus) + P (f ill|premium) × P (premium)
= 30% × 40% + 60% × 35% + 50% × 25% = 45.5%.
(1.3).
P (regular and f ill)
P (f ill)
P (f ill|regular) × P (regular)
30% × 40%
=
=
= 12/45.5 = 26.37%.
P (f ill)
45.5%
P (regular|f ill) =
2
(3 points)
Annie and Alvie have agreed to meet between 5:00 pm and 6:00 pm for dinner at a local health-food restaurant. Let
X = Annie’s arrival time and Y = Alvie’s arrival time. Suppose that the joint probability density function (joint pdf)
for the two-dimension random variable (X, Y ) is
f (x, y) = 1,
if 5 ≤ x ≤ 6 and 5 ≤ y ≤ 6.
(2.1). (1p) Find the marginal pdf fX (x) of X and the marginal pdf fY (y) of Y.
(2.2). (1p) What is the probability that they both arrive between 5:15 pm and 5:45 pm ?
(2.3). (1p) If the first one to arrive will wait only 10 minutes before leaving to eat elsewhere, what is the probability
that they have dinner at the local health-food restaurant ? (Hint: the event of interest is A = {(x, y) : |x − y| ≤ 16 }.)
Page 1/5
Solution. (2.1)
Z
∞
fX (x) =
Z
6
1 dy = 1, 5 ≤ x ≤ 6.
f (x, y)dy =
−∞
5
Similarly,
Z
∞
Z
−∞
6
1 dx = 1, 5 ≤ y ≤ 6.
f (x, y)dx =
fY (y) =
5
(2.2)
P (both 5 : 15 − 5 : 45) = P (5.25 ≤ X ≤ 5.75 and 5.25 ≤ Y ≤ 5.75)
Z 5.75 Z 5.75
f (x, y)dxdy = 0.25.
=
5.25
5.25
(2.3) The probability is
Z Z
P (A) =
f (x, y)dxdy = 11/36 = 0.3056.
(draw the graph, then you will see clearly).
A
3
(3 points)
A binary communication channel transmits a sequence of “bits” (0s and 1s). Suppose that for any particular bit
transmitted, there is a 10% chance of a transmission error (a 0 becoming a 1, or a 1 becoming a 0). Assume that bit
errors occur independently of one another. Now we consider transmitting 1000 bits, What is the probability that at
most 125 transmission errors occur ?
Solution. We have two different methods to solve the problem. The first method is the usual one: CLT.
Let Xi record the possible error of the i-th bit, so
Xi
p(x)
0
0.9
1
0.1
So we can easily get µ = E(Xi ) = 0.1 and σ 2 = V (Xi ) = 0.09. Thus the probability is
P (at most 125 transmission errors occur) = P (X1 + X2 + . . . + X1000 ≤ 125)
125
X1 + X2 + . . . + X1000
¯ ≤ 0.125)
≤
) = P (X
= P(
1000
1000
¯ −µ
X
0.125 − 0.1
√
= P( √ ≤ √
) = P (N (0, 1) < 2.64) = 0.9959.
σ/ n
0.09/ 1000
The second method is ‘Normal approximation to a Binomial random variable’. If we use X = total number of errors,
then X ∼ Bin(1000, 0.1). Thus
P (at most 125 transmission errors occur) = P (X ≤ 125)
= P (N (1000 · 0.1, 1000 · 0.1 · 0.9) ≤ 125) = P (N (100, 90) ≤ 125)
125 − 100
√
= P (N (0, 1) ≤
) = P (N (0, 1) < 2.64) = 0.9959.
90
Page 2/5
4
(3 points)
Let X denote the proportion of allotted time that a randomly selected student spends working on a certain test.
Suppose that the pdf of X is
f (x) = (θ + 1) · xθ ,
0 ≤ x ≤ 1,
where θ > −1 is an unknown parameter. A random sample of 3 students yields data: {0.71, 0.92, 0.83}.
(4.1). (1p) Find a point estimate θˆM M of θ using Method of Moments.
(4.2). (2p) Find a point estimate θˆM L of θ using Maximum-Likelihood method.
Solution. (4.1). For Method of Moments, the first equation is E(X) = x
¯. The mean E(X) can be calculated as
Z
1
E(X) =
x(θ + 1) · xθ dx = (θ + 1)/(θ + 2).
0
By solving E(X) = x
¯, we have θ = (2¯
x − 1)/(1 − x
¯) which yields θˆM M = (2¯
x − 1)/(1 − x
¯). From the data,
0.71+0.92+0.83
=
0.82,
thus
x
¯=
3
θˆM M = (2 · 0.82 − 1)/(1 − 0.82) = 0.64/0.18 = 3.56.
(4.2). For the Maximum-Likelihood method, we write the likelihood function as
L(θ) = f (x1 ) · f (x2 ) . . . f (xn ) = (θ + 1)n · (x1 . . . xn )θ .
Maximizing L(θ) is equivalent to maximize ln L(θ) where
ln L(θ) = n ln(θ + 1) + θ ln(x1 . . . xn ).
By
d ln L(θ)
dθ
= 0, we have
n
θ+1
+ ln(x1 . . . xn ) = 0, therefore
θˆM L = −
(The second derivative
5
d2 ln L(θ)
dθ 2
n
3
3
−1=−
−1=−
− 1 = 3.9.
ln(x1 . . . xn )
ln(0.542156)
−0.6122
< 0 which yields that θˆM L is indeed a maximal point)
(3 points)
One has measured the same physical quantity five independent times with Method A and four independent times with
Method B, and the results are:
Method A:
Method B:
x
¯ = 1.0635
y¯ = 1.0515
s2x = 3.7 · 10−6
s2y = 5.6 · 10−6
We assume that the sample for Method A is from N (µx , σ 2 ), and the sample for Method B is from from N (µy , σ 2 ).
(5.1). (1p) Construct a (two-sided) 95% confidence interval of µx .
(5.2). (1p) Do you think µx 6= µy ? Answer this using a (two-sided) 95% confidence interval of µx − µy .
(5.3). (1p) Construct an upper 95% confidence interval (one-sided) for σ in the form (0, b).
Solution. (5.1) Since σ is unknown, a 95% confidence interval of µx would be
sx
Iµx = (¯
x − tα/2 (n − 1) · √ ,
n
sx
x
¯ + tα/2 (n − 1) · √ )
n
√
√
3.7 · 10−6
3.7 · 10−6
√
√
= (1.0635 − t0.025 (5 − 1) ·
, 1.0635 + t0.025 (5 − 1) ·
)
5
5
= (1.0635 − 2.78 · 0.86 · 10−3 , 1.0635 + 2.78 · 0.86 · 10−3 )
= (1.0635 − 0.00239,
1.0635 + 0.00239) = (1.06111,
Page 3/5
1.06589).
(5.2) A 95% confidence interval of µx − µy is
r
Iµx −µy = ((¯
x − y¯) − tα/2 (n1 + n2 − 2) · s ·
1
1
+
,
n1
n2
r
(¯
x − y¯) + tα/2 (n1 + n2 − 2) · s ·
1
1
+
)
n1
n2
where
(¯
x − y¯) = 1.0635 − 1.0515 = 0.012;
tα/2 (n1 + n2 − 2) = t0.025 (5 + 4 − 2) = 2.36;
s
r
√
p
(n1 − 1)s2x + (n2 − 1)s2y
(5 − 1) · 3.7 · 10−6 + (4 − 1) · 5.6 · 10−6
2
=
= 31.6 · 10−6 /7 = 2.125 · 10−3
s= s =
n1 + n2 − 2
5+4−2
r
r
1
1
1 1
=
+
=
+ = 0.671.
n1
n2
5 4
Thus
Iµx −µy = (0.012 − 0.003365,
0.012 + 0.003365) = (0.008635,
0.015365).
Since 0 ∈
/ Iµx −µy , we think µx 6= µy .
(5.3) Since σ can be from Method A or Method B, we may solve this problem in three different ways and all are correct!
1st way: σ from Method A. One-sided confidence interval for σ 2 is
Iσ2 = (0,
(n1 − 1) · s2x
) = (0,
χ21−α (n1 − 1)
(5 − 1) · 3.7 · 10−6
) = (0,
χ21−0.05 (5 − 1)
14.8 · 10−6
) = (0,
0.71
20.845 · 10−6 ).
Thus one-sided confidence interval for σ is
√
Iσ = (0,
20.845 · 10−6 ) = (0,
0.0045656).
2nd way: σ from Method B. One-sided confidence interval for σ 2 is
Iσ2 = (0,
(n2 − 1) · s2y
) = (0,
χ21−α (n2 − 1)
(4 − 1) · 5.6 · 10−6
) = (0,
χ21−0.05 (4 − 1)
16.8 · 10−6
) = (0,
0.35
48 · 10−6 ).
Thus one-sided confidence interval for σ is
√
Iσ = (0,
48 · 10−6 ) = (0,
0.0069282).
3rd way: σ from both Method A and Method B (didn’t talk about this in the lectures, but include here just for your
reference). One-sided confidence interval for σ 2 is
Iσ2 = (0,
(n1 + n2 − 2) · s2
) = (0,
χ21−α (n1 + n2 − 2)
(5 + 4 − 2) · 4.514 · 10−6
) = (0,
χ21−0.05 (5 + 4 − 2)
31.6 · 10−6
) = (0,
2.17
14.56 · 10−6 ).
Thus one-sided confidence interval for σ is
√
Iσ = (0,
6
14.56 · 10−6 ) = (0,
0.003816).
(3 points)
The PCB-concentration is measured for 10 fish in a lake, and the results are:
11.5,
10.8,
11.6,
9.4,
12.4,
11.4,
12.2,
11.0,
10.6,
10.8
We assume that these observations are from a normal population N (µ, 0.81). Previous measurements show that the
average PCB-concentration for the fish is 10.8, but it is suspected that the concentration now becomes higher in the lake.
(6.1). (1p) Test the following hypotheses with a significance level α = 0.05 :
H0 : µ = 10.8
versus
Ha : µ > 10.8.
(6.2). (2p) For the test in (6.1), what is the power when the actual µ = 11.0 ?
Page 4/5
Solution. (6.1) Since the population variance is known σ 2 = 0.81, according to Ha the rejection region
C = (zα , +∞) = (z0.05 , +∞) = (1.65, +∞).
The test statistic is
TS =
11.17 − 10.8
x
¯ − µ0
√ = √
√
= 1.3.
σ/ n
0.81/ 10
Since T S ∈
/ C, we don’t reject H0 .
(6.2) The power is
h(11) = P (reject H0 when H0 is wrong and µ = 11)
¯ − µ0
X
√ > 1.65 when µ = 11)
= P(
σ/ n
¯ −µ
¯ −µ
¯ − µ0
X
X
X
√ to
√ since
√ ∼ N (0, 1))
(need to change
σ/ n
σ/ n
σ/ n
¯ − µ µ − µ0
X
√ > 1.65 when µ = 11)
= P( √ +
σ/ n
σ/ n
11 − 10.8
√ > 1.65)
= P (N (0, 1) + √
0.81/ 10
= P (N (0, 1) > 1.65 − 0.7027) = P (N (0, 1) > 0.95) = 1 − 0.8289 = 0.1711.
Page 5/5