econ 2121b: methods of economic statistics spring 2012 · econ 2121b: methods of economic...
TRANSCRIPT
ECON 2121B: Methods of Economic Statistics
Spring 2012
Answer Key to Problem Set 1
Exercise 1 The scores of the final exam of 20 students in class X is {88, 91, 88, 85,82, 82, 94, 76, 71, 85, 86, 69, 72, 68, 67, 66, 61, 69, 63, 54}.
1. Calculate the mean, median, mode, variance, standard deviation, range,
and the inter-quartile range. Also calculate the z-score of the student with
score 82.
2. Make the stem-and-leaf plot. Also draw a histogram with a class width
of 10 and with the lowest value being 50. That is, 50-59 is a class, and
the next class is 60-69, and so on. Make a table of cumulative relative
frequency based on the histogram and draw a corresponding ogive.
3. Calculate the weighted mean using the histogram (or, in fact, the relative
frequeny table behind the histogram). Is this weighted mean the same as
the mean?
Solutions
1. (We treat the data set as population here.)
(population) mean µ = 75.85
median = (72 + 76)/2 = 74
mode = 69, 82, 85, 88
(population) variance σ2 = 121.6275
(population) standard deviation σ = 11.0285
range = 94− 54 = 40
inter-quartile range = 3rd quartile− 1st quartile = 85.5− 67.5 = 18
z-score of the student with score 82 = (82− µ)/σ = 0.5576
1
Figure 1: Histogram
2. steam-and-leaf plot:
5 | 4
6 | 1 3 6 7 8 9 9
7 | 1 2 6
8 | 2 2 5 5 6 8 8
9 | 1 4
Score Cumulative Relative Frequency
50-59 0.05
60-69 0.40
70-79 0.55
80-89 0.90
90-100 1.00
3. Weighted mean = 55×0.05+65×0.35+75×0.15+85×0.35+95×0.1 = 76
The weighted mean is NOT the same as the mean.
Exercise 2 Continued from the above, suppose you also know the scores of the
midterm. They are {107, 103, 107, 109, 103, 91, 108, 110, 95, 94, 105, 98, 101, 96,95, 95, 87, 85, 72, 69}. The sequence of the midterm and final scores are made
according the same roster. Use Excel to make a scatter diagram. Calculate the
covariance and correlation coefficient.
Solutions
covariance = 94.775
correlation coefficient = 0.7697
2
Figure 2: Scatter Diagram
Exercise 3 A ≡ {x|1 ≤ x ≤ 20 & x is an integer}?B ≡ {x|1 ≤ x ≤ 20 & x is an even number}?C ≡ {x|1 ≤ x ≤ 20 & x is an odd number}?D ≡ {x|1 ≤ x ≤ 10 & x is an integer}?E ≡ {x|10 ≤ x ≤ 20 & x is an integer}?F ≡ {x|1 ≤ x ≤ 20 & x is a multiple of 3}?G ≡ {x|1 ≤ x ≤ 20 & x is a multiple of 5}?Suppose A is the universal set.
1. Find B’(B’ for the complement of B)?
2. Find B∩
D and B∪D.
3. Find (B∩F )′ and B′ ∪F ′ and check if the two are equal?
4. Find (B∪F )′ and B′ ∩F ′ and check if the two are equal?
5. Find G∩(C
∪F ) and (G
∩C)
∪(G
∩F ) and check if the two are equal?
6. Find G∪(C
∩F ) and (G
∪C)
∩(G
∪F ) and check if the two are equal?
7. Describe a partition and give an example.
Solutions
1. B′ = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19} = C
3
2. B ∩D = {2, 4, 6, 8, 10}
B ∪D = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20}
3. B ∩ F = {6, 12, 18}
(B ∩ F )′ = {1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20}
B′ = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19}
F ′ = {1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20}
B′ ∪ F ′ = {1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20}
So (B ∩ F )′ = B′ ∪ F ′
4. B ∪ F = {2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20}
(B ∪ F )′ = {1, 5, 7, 11, 13, 17, 19}
B′ ∩ F ′ = {1, 5, 7, 11, 13, 17, 19}
So (B ∪ F )′ = B′ ∩ F ′
5. C ∪ F = {1, 3, 5, 6, 7, 9, 11, 12, 13, 15, 17, 18, 19}
G ∩ (C ∪ F ) = {5, 15}
G ∩ C = {5, 15}
G ∩ F = {15}
(G ∩ C) ∪ (G ∩ F ) = {5, 15}
So G ∩ (C ∪ F ) = (G ∩ C) ∪ (G ∩ F )
6. C ∩ F = {3, 9, 15}
G ∪ (C ∩ F ) = {3, 5, 9, 10, 15}
G ∪ C = {1, 3, 5, 7, 9, 10, 11, 13, 15, 17, 19, 20}
G ∪ F = {3, 5, 6, 9, 10, 12, 15, 18, 20}
(G ∪ C) ∩ (G ∪ F ) = {3, 5, 9, 10, 15, 20}
So G ∪ (C ∩ F ) = (G ∪ C) ∩ (G ∪ F )
7. A partition of a set X is a set of nonempty subsets of X such that (i) the
subsets are mutually exclusive, and (ii) the union of the subsets is equal
to X.
For example, a partition of A can be {B,C}, or {D,E}, or
{{1, 3, 15}, {2, 6, 8, 10, 11, 17}, {4}, {5, 7, 14, 20}, {9, 12, 13, 19}, {16, 18}}, etc.
4
Exercise 4 Toss two fair dice. Find the probability of the following event:
1. The sum of the two dice is 9.
2. The dice show the same number of dots.
3. The number shown by the second die is larger than the one shown by the
first.
Solutions
1. List out the 36 equally likely outcomes:
{(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 1), . . . , (2, 6),
(3, 1), . . . , (3, 6), (4, 1), . . . , (4, 6), (5, 1), . . . , (5, 6), (6, 1), . . . , (6, 6)}
Pr(sum = 9) = Pr((3, 6) ∪ (6, 3) ∪ (5, 4) ∪ (4, 5)) =4
36= 1/9
2. Pr(same number of dots) = Pr((1, 1) ∪ (2, 2) ∪ (3, 3) ∪ (4, 4) ∪ (5, 5) ∪(6, 6)) =
6
36= 1/6
3. Pr{second larger than first} = Pr{(1, 2)∪ (1, 3)∪ (1, 4)∪ (1, 5)∪ (1, 6)∪
(2, 3)∪ (2, 4)∪ (2, 5)∪ (2, 6)∪ (3, 4)∪ (3, 5)∪ (3, 6)∪ (4, 5)∪ (4, 6)∪ (5, 6)} =15
36= 5/12
Exercise 5 If the probability is 0.54 that Stock A will increase in value during
the next month and the probability is 0.68 that Stock B will increase in value
during the next month, what is the greatest possible value for the probability
that neither of these two events will occur?
Solutions
Let A = {Stock A increases in value}, B = {Stock B increases in value}Pr(A) = 0.54, Pr(B) = 0.68
Pr(neither of these events occurs) = Pr(A′ ∩B′) = Pr((A ∪B)′)
= 1− Pr(A ∪B)
= 1− (Pr(A) + Pr(B)− Pr(A ∩B))
= 1− (0.54 + 0.68− Pr(A ∩B))
= Pr(A ∩B)− 0.22
Note that Pr(A ∩B) ≤ min{Pr(A),Pr(B)} = 0.54
Therefore, Pr(neither of these events occurs) ≤ 0.54− 0.22 = 0.32. That is,
the greatest possible value for the probability that neither of these two events
will occur is 0.32.
5
Exercise 6 Questions on combination and permutation rules.
1. Five different books are on a shelf. In how many different ways could you
arrange them?
2. How many different arrangements are there of the letters of the word
“numbers”?
3. You have 5 shirts, but you will take with you only 3 for your vacation. In
how many different ways can you do this?
4. Given 6 letters {a, b, c, d, e, f}, how many different 4-letter words can be
formed from these 6 letters?
Solutions
1. P 55 =
5!
0!= 120
2. P 77 =
7!
0!= 5040
3. C35 =
5!
3!2!= 10
4. P 46 =
6!
2!= 360
Exercise 7 The Republican governor of a state is appointing a committee of
five members to consider changes in the income tax law. There are 15 state
representatives - seven Democrats and eight Republicans - available for ap-
pointment to the committee. Assume that the governor selects the committee
of five members randomly from the 15 representatives.
1. In how many different ways can the committee members be selected?
2. What is the probability that no Democrat is appointed to the committee?
3. What is the probability that the majority of the committee members are
Republican?
Solutions
1. C515 =
15!
5!10!= 3003
6
2. If we use R to indicate the member from Republicans and D to indicate
the member from Democrats, the probability is
P (D = 0) =C5
8C07
C515
=8
429≈ 0.0186
3.
P (Republican is majority) = P (R = 3) + P (R = 4) + P (R = 5)
=C5
8C07
C515
+C4
8C17
C515
+C3
8C27
C515
=246
429≈ 0.573
Exercise 8 Republicans have two potential candidates (A, B) for presidential
election, while the Democrats have three (1, 2, 3). Each party must select one
to represent the party. The probability of Republicans selecting A is 0.8. If the
Republicans choose A, then the probability of the Democrats choosing 1 is 0.5,
choosing 2 is 0.3, and choosing 3 is 0.2. If the Republicans choose B, then the
probability of the Democrats choosing 1 is 0.3, choosing 2 is 0.6, and choosing
3 is 0.1.
1. State the Bayes’ rule.
2. Draw a tree diagram, and calculate all the intersection probabilities, that
is, the probability each possible pair, e.g. P (A ∩ 1), P (A ∩ 2), etc.
3. Find the conditional probability of the Republicans choosing A, given that
the Democrats choose 2.
Solutions
1. Bayes’ rule is applied to find the posterior probability that event Ai will
occur given that event B has occured:
P (Ai|B) =P (Ai)P (B|Ai)
P (A1)P (B|A1) + P (A2)P (B|A2) + ...+ P (An)P (B|An)
where A1, A2, ..., An are mutually exclusive and P (A1) + P (A2) + ... +
P (An) = 1. (i.e. A1, A2, ..., An is a partition of the event space)
2. Intersection probabilities:
P (A ∩ 1) = P (A)× P (1|A) = 0.8× 0.5 = 0.4
P (A ∩ 2) = P (A)× P (2|A) = 0.8× 0.3 = 0.24
7
Figure 3: Tree Diagram
8
3. Employ the Bayes’ rule:
P (A|2) =P (A)P (2|A)
P (A)P (2|A) + P (B)P (2|B)
=0.24
0.24 + 0.12=
2
3
9