Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Student Number
Queen’s University
Department of Mathematics and Statistics
STAT 353
Midterm Examination February 12, 2009
• Total points = 30. Duration = 58 minutes.
• This is a closed book exam.
• One 8.5 by 11 inch sheet of notes, written on both sides, is permitted.
• A simple calculator is permitted.
• Write the answers in the space provided, continue on the backs of pages if needed.
• SHOW YOUR WORK CLEARLY. Correct answers without clear work showing
how you got there will not receive full marks.
• Marks per part question are shown in brackets at the right margin.
• The last page contains formulas you may find useful. Please check this page first.
Marks: Please do not write in the space below.
Problem 1 [10]
Problem 2 [10]
Problem 3 [10]
Total: [30]
STAT 353 -- Midterm Exam, 2009
Page 2 of 5
1. Let S(x, y) denote the square on the plane which has side length 2 and is centered at the
point (x, y). Let (X1 , Y1 ) be a point chosen uniformly at random from the square S(1, 1)
and let (X2 , Y2 ) be a point chosen uniformly at random from the square S(−1, −1). Find
P ((X2 , Y2 ) ∈ S(X1 , Y1 )) (i.e., the probability that the point (X2 , Y2 ) is inside the square
of side length 2 centered at (X1 , Y1 ).
[10]
Solution: The joint pdf of (X1 , Y1 , X2 , Y2 ) is
(
1
for (x1 , y1 ) ∈ S(1, 1) and (x2 , y2 ) ∈ S(−1, −1)
16
f (x1 , y1 , x2 , y2 ) =
0 otherwise.
The point (X2 , Y2 ) is inside the square S(X1 , Y1 ) if and only if X2 ≥ X1 − 1 (X1 − 1 is
the left edge of S(X1 , Y1 )) and Y2 ≥ Y1 − 1 (Y1 − 1 is the bottom edge of S(X1 , Y1 )). The
relevant integral is
P ((X2 , Y2 ) ∈ S(X1 , Y1 )) = P (X2 ≥ X1 − 1, Y2 ≥ Y1 − 1)
Z 1Z 1Z 0 Z 0
1
dy2 dx2 dy1 dx1
=
0
0
x1 −1 y1 −1 16
Z 1Z 1Z 0
1
=
(1 − y1 )dx2 dy1 dx1
16 0 0 x1 −1
Z 1Z 1
1
=
(1 − y1 )(1 − x1 )dy1 dx1
16 0 0
Z 1
1
1
=
(1 − x1 )dx1
16 0 2
1
1
1
=
× = .
32 2
64
STAT 353 -- Midterm Exam, 2009
Page 3 of 5
2. Let X1 , . . . , Xn be a sequence of independent random variables uniformly distributed on
the interval (0, 1), and let X(1) , . . . , X(n) denote their order statistics. For fixed k let gn (x)
denote the probability density function of nX(k) . Find gn (x) and show that
( k−1
x
e−x for x ≥ 0
(k−1)!
lim gn (x) =
n→∞
0
for x < 0
which is the Gamma(k,1) density.
Solution: The pdf of X(k) is
(
fk (xk ) =
[10]
n!
xk−1 (1
(k−1)!(n−k)! k
− xk )n−k for 0 < xk < 1
0
otherwise.
Let X = nX(k) . Then the set of possible values of X (the sample space of X) is {x : 0 <
x < n}. So for x ∈ (0, n), by the (1-dimensional) change of variable formula the pdf of X
is given by
x k−1 1
x n−k
(n − 1)!
gn (x) = fk (x/n) =
1−
n
(k − 1)!(n − k)! n
n
and gn (x) = 0 for x ∈
/ (0, n). Now fix x > 0 and let n > x. Then
x k−1 (n − 1)!
x n−k
1−
(k − 1)!(n − k)! n
n
(n − 1) × . . . × (n − k + 1)
x −k
1
x n
k−1
=
1
−
x
1
−
nk−1
n
(k − 1)!
n
1
→
xk−1 e−x ,
(k − 1)!
gn (x) =
as desired, since
(n − 1) × . . . × (n − k + 1)
nk−1
n−1
n−k+1
=
× ... ×
n
n
→ 1 × . . . × 1 = 1,
(1 − x/n)−k clearly converges to 1 as n → ∞ (for fixed k), and (1 − x/n)n → e−x as
n → ∞ (from calculus). Since gn (x) = 0 for x < 0 it is obvious that gn (x) → 0 as n → ∞
if x < 0.
STAT 353 -- Midterm Exam, 2009
Page 4 of 5
3. Suppose we take an ordinary deck of 52 cards, randomly shuffled, and flip all 52 cards
over, one at a time. Let X be the number of times we flip a card that has the same face
value as the previously flipped card. Find E[X].
[10]
Solution: Let Xi , i = 2, . . . , 52 be defined by
(
1 if the ith card flipped has the same face value as the previously flipped card
Xi =
0 otherwise.
Then X = X2 + . . . + X52 and so E[X] = E[X2 ] + . . . + E[X52 ], where
E[Xi ] = P (ith and (i − 1)st cards flipped have the same face value).
The above probability can be computed by counting all sequences of 52 cards in which
the cards in positions i − 1 and i have the same face value, then dividing this number by
52!, the total number of sequences. Since the number of sequences in which the cards in
positions i − 1 and i both have face value j is the same as the number of sequences in
which the cards in positions i − 1 and i both have face value k, for any j 6= k, and there
are 13 possible face values, we can write
# of sequences in which the cards in positions i − 1 and i have the same face value
= 13 × # of sequences in which the cards in positions i − 1 and i have face value 2
The number of sequences in which the cards in positions i − 1 and i have face value 2 can
be determined as follows. There are 4 cards with face value 2. Choose 2 of them; there
are 42 = 6 ways to do that. Now order them; there are 2 ways to do that. Now put the
ordered pair into positions i − 1 and i, then place the other 50 cards into the remaining
50 positions; there are 50! ways to do that. So the total number of ways to put the 52
cards into the 52 positions so that positions i − 1 and i both have a 2 is 6 × 2 × 50!. Then
the total number of ways to put the 52 cards into the 52 positions so that positions i − 1
and i have the same face value is 13 × 6 × 2 × 50!. Therefore,
13 × 6 × 2 × 50!
52!
3
1
=
= .
51
17
P (ith and (i − 1)st cards flipped have the same face value) =
Note that this is independent of i, which should be intuitively obvious. Finally,
E[X] =
51
= 3.
17
STAT 353 -- Midterm Exam, 2009
Formulas:
Uniform distribution on the interval (0, 1) has pdf:
1 if 0 < x < 1
f (x) =
0 otherwise,
Page 5 of 5