0% found this document useful (0 votes)
7 views5 pages

HW3 Probability

Uploaded by

nguyenvoducson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views5 pages

HW3 Probability

Uploaded by

nguyenvoducson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Homework 3: Probability

Nguyễn Võ Đức Sơn - 2312974 - L02

Section 7.2
Exercise 7
a. As the set has 4 elements, the sample space contains 24 permutations.
Moreover, since 1 has either to precede 4 or to follow it, so the number of
permutations that 1 precedes 4 must be the same as 4 precedes 1. So the
probability is 1/2.
b. This is the same as a, so the probability is 1/2 also.
c. Among three numbers 1, 2 and 4, each number is likely to appear before
the other two numbers. So by symmetric, the answer for 4 to appear before
1 and 2 is 1/3.
d. As in c, each number among four numbers in the set is likely to appear
before the other three numbers. So by symmetric, the answer is 1/4.
e. The probability of 4 precedes 3 and the probability of 2 precedes 1 both
are equal to 1/2 as in a. Also, the relative position of 4 and 3 is independent
of the relative position of 2 and 1. So the probability that both happen is
(1/2).(1/2) = 1/4.

Exercise 10
a. As the first 13 letters are in order, we just need to select a permutation
for the other 13 letters. So the answer is 1/13!
b. This condition means that we only need to change the 24 remaining let-
ters, so the answer is 24!/26! = 1/650.
c. There are two cases: az or za. So we will consider these two letters as one
element. So we just need to change 25 letters, and the answer is 2.25!/26! =
1/13.
d. By part c, the probability for a and b to be next to each other is 1/13, so

1
the probability for a and b not to be next to each other is 12/13.
e. There are six ways for this case: ax24 z, zx24 a, xax23 z, xzx23 a, ax23 zx, zx23 ax.
In each way there are 24! ways to permutate the letters. So there are 6.24!
ways in total. So the answer is (6.24!)/26! = 3/325.
f. As in Exercise 7, the answer is 1/3.

Exercise 11
It is clear that p(E ∪ F ) ≥ p(E) = 0.7. Also p(E ∪ F ) ≤ 1, and p(E ∪ F ) =
p(E) + p(F ) − p(E ∪ F ), so 0.7 + 0.5 − p(E ∪ F ) ≤ 1, so p(E ∪ F ) ≥ 0.2

Exercise 12
This is the same as Exercise 11, p(E ∪ F ) ≥ p(E) = 0.8, and p(E ∪ F ) ≥
0.8 + 0.6 − 1 = 0.4

Exercise 13
We have p(E ∪ F ) = p(E) + p(F ) − p(E ∩ F ), and p(E ∪ F ) ≤ 1, so p(E) +
p(F ) − p(E ∩ F ) ≤ 1, and p(E ∩ F ) ≥ p(E) + p(F ) − 1

Exercise 26
The answer is yes, because the parity of the number of 1’s is totally deter-
mined by 3 bits, not just only the first bit. Furthermore, we can see that
there are 8 bit strings of length 3, and 4 of them have the odd number of
1’s (001, 010, 100, 111), so p(E) = 4/8 = 1/2. Also, there are 4 bit strings
that start with a ’1’ (100, 101, 110, 111), so p(F) = 1/2. And there are 2 bit
strings that both start with a ’1’ and have the odd number of 1’s (100, 111),
so p(E ∩ F ) = 1/4 = p(E).p(F ), so both of them are independent.

Exercise 31
As the event of having a girl in each birth is independent:
a. As the probability of having a boy and a girl in each birth are equally
likely, the probability of having a girl in each birth is 0.5, so for 5 girls, the
probability is (1/2).(1/2).(1/2).(1/2).(1/2) = 1/32.
b. The probability of a boy is 0.51, so the probability of a girl is 0.49. Hence

2
the probability of 5 girls is 0,49.0,49.0,49.0,49.0,49 ≈ 0.028.
c. i is from 1, 5, with i is the ith child of the family, so that:
The probability of having a boy the first time is 0.50.
The second time is 0.49.
The third time is 0.48.
The fourth time is 0.47.
The fifth time is 0.46.
So the probability of having 5 girls is (1 − 0.5) · (1 − 0.49) · (1 − 0.48) · (1 −
0.47) · (1 − 0.46) ≈ 0.038

Section 7.3
Exercise 1
Using the basic version of Bayes’s Theorem, we have:
p(A|B) = p(A)·p(B|A)
p(B)
= (1/2)·(2/5)
1/3
= 3/5

Exercise 2
Using the basic version of Bayes’s Theorem, we have:
p(A|B) = p(A)·p(B|A)
p(B)
= (2/3)·(5/8)
3/4
= 5/9

Exercise 3
Call F as the event that Frida picks the first box. Then we know that
p(F ) = p(F ) = 1/2. Call B as the event that Frida picks the blue ball,
hence p(B|F ) = 3/5, as 3 of 5 balls in the first box are blue balls, and
p(B|F ) = 1/5, as only 1 of 5 balls in the second box are blue balls. Using
Bayes’s Theorem, we can calculate p(F |B):
p(B|F )p(F ) (3/5)(1/2)
p(F |B) = p(B|F )p(F )+p(B|F )p(F )
= (3/5)(1/2)+(1/5)(1/2) = 3/4

Exercise 11
Call S as the event that a product is successful, then we have p(S)=0.6 and
p(S) = 0.4. Call P as the event that a product is predicted to be successful,
then we have p(P |S) = 0.7 and p(P |S) = 0.4. We use Bayes’s Theorem:
p(P |S)p(S) (0.7)(0.6)
p(S|P ) = p(P |S)p(S)+p(P |S)p(S)
= (0.7)(0.6)+(0.4)(0.4) ≈ 0.724

3
Exercise 13
p(E|F1 )p(F1 )
Using the generalized Bayes’s Theorem, we have: p(F1 |E) = p(E|F1 )p(F1 )+p(E|F2 )p(F2 )+p(E|F3 )p(F3 )
=
(1/8)(1/4) 3
(1/8)(1/4)+(1/4)(1/4)+(1/6)(1/2)
= 17

Exercise 21
We compute p(enhancement) = 1500/10000 = 0.15 (this is the probabil-
ity of a message containing the word "enhancement" is spam), p(herbal) =
800/10000= 0.08, q(enhancement) = 20/5000 = 0.004(this is the probability
of a message containing the word "enhancement" is not spam), q(herbal) =
200/5000=0.04. So the sample space is "the number of messages containing
two words "enhancement" and "herbal" is either spam or not spam". And
the probability for the event "the number of messages containing two words
"enhancement" and "herbal" is spam" is:
p(enhancement)p(herbal) (0.15)(0.08)
r(enhancement, herbal) = p(enhancement)p(verbal)+q(enhancement)q(verbal) = (0.15)(0.08)+(0.004)(0.04) ≈
0.987.
as r(enhancement, herbal) is greater than 0.9, all the messages that contain
two words above will be rejected.

Section 7.4
Exercise 6
Let X be the amount of money that the purchaser win from the lottery, so
X can only take two values: 0 and 1000000. As there are C(50, 6) ways to
create six winning numbers, and only one of them is the winning number,
the probability to win 1000000 dollars is 1/C(50, 6), and the probability to
1
win 0 dollar is (1-1/C(50, 6)). So the expected value is: 1000000 · C(50,6) +0·
1
(1 − C(50,6) ) =≈ 0.63

Exercise 7
Let X be the random variable of the score on the true-false questions and
Y be the random variable of the score on the multiple choice questions. The
expected value of X is the expected value of successes when 50 Bernoulli
trials are performed with p=0.9, so the expected value of X is 50 · 0.9 = 45,

4
since each problem counts 2 points, the expected point is 45 · 2 = 90. For Y,
the expected value of success when 25 Bernoulli trials are performed with p
= 0.8 is 25 · 0.8 = 20, each problem counts 4 points, so the expected point is
20 · 4 = 80. Totally, her expected score on the exam is 90 + 80 = 170.

Exercise 9
The probability that a number x is in the list containing p integers is p(n+2)
+ (2n+2)(1-p). With p=2/3, we have:
2
3
· (n + 2) + (2n + 2) · 31 = 4n+6
3

Exercise 38
How much√the number of cans filled per day varies is the square root of the
variance: 1000 ≈ 31. So the number of cans filled per day can be no less
than or no more than 31 cans from 10000 cans. We have Markov’s Inequality:
p(X(s) ≥ a) ≤ E(x)/a.
a. We have E(x) = 10000, and a = 11000. So p(X ≥ 11000) = 10000 11000
= 10
11
.
b. We have Chebyshev’s Inequality: p(|X(s) − E(X)| ≥ r) ≤ V (x)/r2 . We
have r = 1000. The probability that the number of cans filled will differ
from the expectation of 10000 by at least 1000 is 1000/10002 = 0.001, so the
probability that the number of cans filled is between 9000 and 11000 cans is
0.999. But this is not a good estimate, since the number of cans filled per day
can be no less than or no more than 31 cans from 10000 cans, it is impossible
that the difference is 1000, which is 30 times more than the amount 31 - The
probability is much, much less than 1 in 1000.

You might also like