Solutions to Assignment 4 File

Probability and Statistics
MTH202
Assignment 4
28 January, 2017
Solutions to Assignment 4
1. A standard (6-sided) dice is rolled two times. Let Xi denote the value obtained on the
i-th roll. Is this a random variable? What about S = X1 − X2 , the difference of the
values rolled? What are the distributions of each of these random variables?
Solution: Yes, each Xi is a random variable and S = X1 − X2 is also a random
variable. The distribution of each Xi is given by P (Xi = j) = 1/6 for j = 1, . . . , 6.
The distribution for S is a bit more complicated to calculate. The events X1 = j
and X2 = k are independent so:
P (S = −5) = P (X1 = 1 ∧ X2 = 6)
P (S = −4) = P ((X1 = 1 ∧ X2 = 5) ∨ (X1 = 2 ∧ X2 = 6))
P (S = −3) = P (∨3k=1 (X1 = k ∧ X2 = 3 + k))
P (S = −2) = P (∨4k=1 (X1 = k ∧ X2 = 2 + k))
P (S = −1) = P (∨5k=1 (X1 = k ∧ X2 = 1 + k))
P (S = 0) = P (∨6k=1 (X1 = k ∧ X2 = k))
= 1/36
= 2/36
= 3/36
= 4/36
= 5/36
= 6/36
By symmetry we see that P (S = k) = P (S = −k) since the values on first and
second dice have to be interchanged in this case.
2. A player has a fair coin, and a standard 4-sided dice and a standard 6-sided dice. The
player flips the coin, if it shows head, then the 4-sided dice is rolled and its value noted;
else if the coin shows tail then the 6-sided dice is rolled and it value noted. Is the result
X, a random variable? What are the values of P (X = i)?
Solution: Yes, X is a random variable. Let H denote the event that the coin shows
head. Let F be the random variable that is the value on the 4-sided dice and S the
the random varialbe that is the value on the 6-sided dice. All three are independent
so:
P (X = 1) = P ((H ∧ F = 1) ∨ (H c ∧ S = 1))
P (X = 6) = P (T ∧ S = 6)
= (1/2)(1/4 + 1/6) = 5/24
= (1/2)(1/6) = 1/12
The cases P (X = i) for i = 2, 3, 4 are similar to P (X = 1) and the case P (X = 5)
is similar to P (X = 6).
3. Hostel 5 has 40 students from the class, Hostel 7 has 90 students from the class, Hostel
8 has 50 students from the class and Hostel 6 has 20 students from the class. We choose
MTH202
Assignment 4
Page 1 of 4
students as follows: we roll a 4-sided fair dice to decide which Hostel to pick (the hostel
picked has number 4 more than the number rolled); we then pick students (of the class) at
random from that hostel, with each student being equally likely. What is the probability
that a specific student A who stays in Hostel 7 is picked? What is the probability that we
pick a student not from Hostel 8? Answer the same questions for a different experiment
where it is equally likely for any student out of the 40 + 90 + 50 + 20 = 200 students to
be picked.
Solution: The probability is 1/4 of any hostel being picked; let H be the random
variable that denotes the hostel chosen. The probability of a specific student A from
the chosen hostel i being picked out of the students in that hostel is 1/N where N is
the number of students in the hostel. If S denotes the random variable that denotes
the chosen student then this is given by P (S = A|H = i).
Thus, the probability P (S = A) = P (S = A|H = 7)P (H = 7) = (1/90)(1/4) is the
probability that A is picked.
The probability that we pick a student not from Hostel 8 is the same as the probability
P (H 6= 8) = 3/4.
Now suppose that it is equally likely that any student is picked. In that case the
there is a new random variable X (it is a different experiment!) which takes values
among the 200 students and P (X = A) = 1/200 since all values are equally likely.
In this case, the probability that the student is picked from the given hostel is
the union of the events of picking a specific student from that hostel and so is
given by the count of the students from that hostel. If Y denotes this random
variable then P (Y = 7) = 90/200, P (Y = 5) = 40/200, P (Y = 8) = 50/200 and
P (Y = 6) = 20/200.
Thus, the answer to the first question is P (X = A) = 1/200 and the answer to the
second question is P (Y 6= 8) = 150/200.
4. A bus starts with 12 passengers and makes 6 stops and there are no passengers left.
What is the probability that (a) all passengers got off at the same stop (b) that the
same number of passengers got off at each stop.
Solution: We make the assumption (based on lack of information!) that it is equally
likely for a passenger to choose any particular stop out of the 6 stops. Putting Ti
for the random variable that denotes the stop picked by the i-th passenger, P (Ti =
j) = 1/6 for each i and each j. Moreover, we also assume that the choices made by
the passengers are independent of each other.
So this is like rolling 12 dice.
The probability of all dice showing the same number is 6 · (1/6)12 = (1/6)11 .
MTH202
Assignment 4
Page 2 of 4
The probability that the same number of passengers got off each each stop means
that 2 passengers got off at each stop. This is The same as the probability that
the numbers on the dice appear in pairs. We can calculate using the multinomial
distribution that the probability is
12
(1/6)12
2, 2, 2, 2, 2, 2
5. A multiple choice paper has 10 questions. Each question has 4 choices. The correct
answer gets 3 marks and a wrong answer gets −1 mark. A student throws a 4-sided
unbiased die to answer each question (the different throws are independent). Let X be
the random variable that denotes the score of the student in the examination.
1. Calculate the value of X for which the probability is the highest.
2. What is the smallest s so that P (X ≤ s) ≥ 1/2?
Solution: If there are r correct answers, there are 10 − r wrong answers and the
score is 3r − (10 − r) = 4r − 10. The probability of a correct answer is 1/4 and
the probability of a wrong answer is 3/4. Hence, by the binomial distribution, the
probability of r correct answers is
10 10−r 10
3
/4
r
The table of probabilities is (this may require a calculator!):
r
410 ∗ p
cumulative
0
59049
59049
1
196830
255879
2
295245
551124
3
262440
813564
4
153090
966654
5
61236
1027890
6
17010
1044900
7
3240
1048140
We note that to get at least 50% of the population we can take r ≤ 2. Since the
score is then 4r − 10 ≤ −2 it means that more than 50% of the time you will get a
negative score! The highest probability is for r = 2 which is also a negative score!
6. A die is rolled repeated until we get a 6. The number of rolls is recorded. Let X denote
the random variable that denotes the number of rolls.
1. Calculate the value of X for which the probability is the highest.
2. What is the smallest s so that P (X ≤ s) ≥ 1/2?
MTH202
Assignment 4
Page 3 of 4
8
405
1048545
Solution: We have seen that P (X = n) = (5/6)n−1 (1/6). Clearly this is largest for
n = 1!
P
n−1
To get the median, we need to use the formula N
= 1 − (1 − t)N . This
n=1 t(1 − t)
gives us
N
X
(1/6)(5/6)n−1 = 1 − (5/6)N
n=1
In order for this to be at least half, we need (5/6)N ≤ 1/2. Taking log of both sides
gives N log(5/6) ≤ − log(2). Thus, we need N ≥ log(2)/ log(6/5) = 3.80 or N ≥ 4.
MTH202
Assignment 4
Page 4 of 4