Answers: Practice Problems - Probability II
Math Prefresher 2013
August 23, 2013
Problem 1
Suppose we have a PMF with the following characteristics:
P (X = −2) =
P (X = −1) =
P (X = 0) =
P (X = 1) =
P (X = 2) =
1
5
1
6
1
5
1
15
11
30
1. Draw the PMF and CDF of X.
2. Define the random variable Y = X 2 . Derive the PMF of Y and prove that it is a PMF.
P (Y = 0) = P (X = 0) =
1
5
P (Y = 1) = P (X = 1 ∪ X = −1) =
P (Y = 4) = P (X = 2 ∪ X = −2) =
This is a PMF because 0 <
1 7 17
5 , 30 , 30
1
15
11
30
+
+
< 1,
1
6 =
1
5 =
1
5 +
7
30
17
30
7
30
+
17
30
3. Calculate the expected value of X.
1
E[X] = −2( 15 ) + −1( 16 ) + 0( 15 ) + 1( 15
) + 2( 11
30 ) =
1
7
30
= 1, and the events are disjoint.
4. Calculate the expected value of Y.
7
E[Y ] = 0( 15 ) + 1( 30
) + 4( 17
30 ) =
5
2
5. Calculate the variance of X.
V [X] = E[X 2 ] − E[X]2 = E[Y ] − E[X]2 =
5
2
−
7 2
30
≈ 2.45
Problem 2
Given the following PMF:
f (x) =
3!
1 3
x!(3−x)! ( 2 )
0
x = 0, 1, 2, 3
otherwise,
1. Prove that this is in fact a PMF.
f (0) =
f (1) =
f (2) =
f (3) =
3!
1
1
0!3! × 8 = 8
3!
1
3
1!2! × 8 = 8
3!
1
3
2!1! × 8 = 8
3!
1
1
3!0! × 8 = 8
So f (x) ≤ 1
∀
x and
P
x
f (x) = 1.
2. Find the expected value of x.
E[x] = 0 ×
1
8
+1×
3
8
+2×
3
8
+3×
1
8
= 32 .
3. Find the variance of x.
Since there is a 1 to 1 mapping from x to x2 : E[x2 ] = 0 ×
2
2
V [x] = E[x ] − E[x] = 3 −
32
2
=
3
4.
4. Derive the CDF.
F (0) =
F (1) =
F (2) =
1
8
1
2
7
8
F (3) = 1
2
1
8
+1×
3
8
+4×
3
8
+9×
1
8
=
3
2
=3
Problem 3
The Los Angeles Times reported that a typical customer of the 7-Eleven convenience stores spends $3.24.
Suppose that the average amount spent by customers of 7-Eleven stores is the reported value of $3.24 and
that the standard deviation for the amount of sale is $8.88.
1. What is the level of measurement for these data?
Ratio
2. Do you think the distribution of the variable amount of sale could be symmetric in shape? Why or
why not?
No because there is a truncation point at 0 on one side and that is well within the first standard deviation.
Problem 4
Suppose that X and Y have a discrete joint distribution for which the joint PMF is defined as follows:
f (x, y) =
c|x + y| x = −2, −1, 0, 1, 2; y = −2, −1, 0, 1, 2
0
otherwise,
1. What is the value of the constant c?
1
40
If you sum f(x,y) over the 25 possible pairs of values, we obstain 40c. Since this sum must be equal to
1, it follows that c is 1/40.
2. What is P (X = 0, Y = −2)?
1
20
f (0, −2) =
1
40
×2=
1
20
3. What is P (X = 1)?
7
40
P (X = 1) =
P2
y=−2
f (1, y) =
7
40
3
4. What is P (|X − Y | ≤ 1)?
.7
The answer is found by summing f(x,y) iver the following pairs: (-2,-2), (-2,-1), (-1,-2),(-1,-1),(-1,0),(0,0),(0,1),(1,0),(1,
Problem 5
Suppose that X and Y have a continuous joint distribution for which the joint PDF is defined as follows:
3 2
2y
f (x, y) =
0
0 ≤ x ≤ 2, 0 ≤ y ≤ 1
otherwise,
1. Determine the marginal PDFs of X and Y.
f (x) =
f (y) =
R
y
R
x
f (x, y)dy =
f (x, y)dx =
R1
3 2
y dy
0 2
R2
3 2
y dx
0 2
=
1
1 3
2y =
1
2
02
= 32 y 2 x = 3y 2
0
The support is the same for the marginals as in the joint.
2. Are X and Y independent?
Yes because f (x, y) = f (x)f (y)
∀
− ∞ < x < ∞, −∞ < y < ∞.
3. Are the event {X < 1} and the event {Y ≥ 1/2} independent?
Yes.
Since the distributions are independent, the occurrence of these events will also be independent.
Problem 6
Suppose that X and Y are independently and identically distributed with the following CDFs:
F (x) = 1 − e−λx
F (y) = 1 − e−λy .
What is the distribution (CDF) of Z= min(X, Y )?
P (Z ≤ z) = 1 − P (Z > z)
= 1 − P (X > z, Y > z)
= 1 − P (X > z)P (Y > z)
4
= 1 − (1 − P (X ≤ z))(1 − P (Y ≤ z))
= 1 − (1 − (1 − e−λx ))(1 − (1 − e−λx ))
= 1 − e−λ(x+y) .
Problem 7: R Practice
1. Create a 10 × 3 (10 rows, 3 columns) matrix where each element of every row corresponds to the row
number.
2. Create another matrix, 50 × 3 (50 rows, 3 columns), where the first column contains 4’s, the second
5’s, and third 7’s
3. Combine the two matrices
4. Name each column of your matrix G1, G2, and G3
5. Create a new dataset where all observations in column 3, G3, are less than or equal to 6
6. Write this new smaller dataset as a separate file into your working directory in any format (i.e. .csv,
.dta, .txt)
7. Store the large dataset and the new smaller dataset in a list with appropriate names
1 5 8
8. Create the following matrix. 3 2 7
4
9
20
9. Transpose this matrix and then multiply it by 7.
10. Find the inverse of this matrix.
11. Multiply this matrix by the matrix from number 1.
ans.1 <- matrix(1:10, nrow=10, ncol=3)
ans.2<- matrix(c(4,5,3), nrow=50, ncol=3, byrow=T)
ans.3 <- rbind(ans.1, ans.2)
colnames(ans.3) <- c("G1", "G2", "G3")
ans.5 <- ans.3[ans.3[,3] <= 6,]
write.csv(ans.5, file = "ans6.csv")
ans.7 <- list(large = ans.3, small = ans.5)
ans.8 <- matrix(c(1,5, 8, 3, 2,7,4,9,20), nrow=3, ncol=3, byrow=T)
ans.9 <- t(ans.8)*7
ans.10 <- solve(ans.9)
ans.11 <- ans.1%*%ans.8
5
© Copyright 2026 Paperzz