Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Math 302, Assignment 2 Solutions University of British Columbia MATH 302

Rating
-
Sold
-
Pages
7
Grade
A+
Uploaded on
03-02-2023
Written in
2022/2023

Math 302, Assignment 2 Solutions 1. In a small town, there are three bakeries. Each of the bakeries bakes twelve cakes per day. Bakery 1 has two different types of cake, bakery 2 three different types, and bakery 3 four different types. Every bakery bakes equal amounts of cakes of each type. You randomly walk into one of the bakeries, and then randomly buy two cakes. (a) What is the probability that you will buy two cakes of the same type? (b) Suppose you have bought two different types of cake. Given this, what is the probability that you went to bakery 2? Solution: (a) Define the events Fi = {choose bakery i}, and E = {buy different cakes}. Then P(Fi) = 1 3 , and we compute the conditional probabilities P(E|F1) = 6 1 2 12 2  = 6 11 P(E|F2) = 3 · 4 1 2 12 2  = 8 11 P(E|F3) = 6 · 3 1 2 12 2  = 9 11 By the law of total probability, P(E) = 1 3  6 11 + 8 11 + 9 11  = 23 33 . Therefore P(buy same type) = 10 33 . (b) By Bayes, P(F2|E) = P(E|F2) P(F2) P(E) = 8 23 2. An assembly line produces a large number of products, of which 1% are faulty in average. A quality control test correctly identifies 98% of the faulty products, and 95% of the flawless products. For every product that is identified as faulty, the test is run a second time, independently. (a) Suppose that a product was identified as faulty in both tests. What is the probability that it is, indeed, faulty? (b) What if the quality control test is only performed once? Solution: Let F = the event that a product is faulty, E1 = the event that the first test result is “faulty” E2 = the event that the second test result is “faulty” Then, P(F) = 1% and, since the second test is independent of the first, P(E1 ∩ E2|F) = P(E1|F)P(E2|F) = 0.982 P(

Show more Read less
Institution
Course

Content preview

Math 302, Assignment 2 Solutions



1. In a small town, there are three bakeries. Each of the bakeries bakes twelve cakes per day. Bakery 1
has two different types of cake, bakery 2 three different types, and bakery 3 four different types. Every
bakery bakes equal amounts of cakes of each type.
You randomly walk into one of the bakeries, and then randomly buy two cakes.
(a) What is the probability that you will buy two cakes of the same type?
(b) Suppose you have bought two different types of cake. Given this, what is the probability that you
went to bakery 2?

Solution: (a) Define the events Fi = {choose bakery i}, and E = {buy different cakes}. Then P(Fi ) = 13 ,
and we compute the conditional probabilities
6 2

6
P(E|F1 ) = 112 =
2
11
2
3 · 41 8
P(E|F2 ) = 12 =
2
11
3 2

6· 9
P(E|F3 ) = 121 =
2
11
By the law of total probability,
1 6 8 9  23
P(E) = + + = .
3 11 11 11 33
10
Therefore P(buy same type) = 33 .
(b) By Bayes,
P(F2 ) 8
P(F2 |E) = P(E|F2 ) =
P(E) 23



2. An assembly line produces a large number of products, of which 1% are faulty in average. A quality
control test correctly identifies 98% of the faulty products, and 95% of the flawless products. For every
product that is identified as faulty, the test is run a second time, independently.
(a) Suppose that a product was identified as faulty in both tests. What is the probability that it is,
indeed, faulty?
(b) What if the quality control test is only performed once?

Solution: Let
F = the event that a product is faulty,
E1 = the event that the first test result is “faulty”
E2 = the event that the second test result is “faulty”
Then, P(F ) = 1% and, since the second test is independent of the first,
P(E1 ∩ E2 |F ) = P(E1 |F )P(E2 |F ) = 0.982
P(E1 ∩ E2 |F c ) = P(E1 |F c )P(E2 |F c ) = 0.052




This study source was downloaded by 100000858936669 from CourseHero.com on 02-02-2023 23:44:43 GMT -06:00


https://www.coursehero.com/file/46056110/HW-2-Solutionpdf/

, By Bayes’ theorem,

P(E1 ∩ E2 |F )P(F )
P(F |E1 ∩ E2 ) =
P(E1 ∩ E2 |F )P(F ) + P(E1 ∩ E2 |F c )P(F c )
0.982 · 0.01
= ≈ 80%.
0.982 · 0.01 + 0.052 · 0.99
If that test had only be run once, we would get
0.98 · 0.01
P(F |E1 ) = ≈ 17%,
0.98 · 0.01 + 0.05 · 0.99
so even a very reliable test cannot identify a rare fault with satisfactory accuracy in a single try.


3. Let m be an integer chosen uniformly from {1, . . . , 100}. Decide whether the following events are inde-
pendent:
(a) E = {m is even} and F = {m is divisible by 5}
(b) E = {m is prime} and F = {at least one of the digits of m is a 2}
(c) Can you replace the number 100 by a different number, in such a way that your answer to (a) changes?
(E.g., if your answer was “dependent”, try to change the number 100 in such a way your answer becomes
“independent”).

Solution: (a) P(E)P(F ) = (1/2)(1/5) = 1/10 = P(E ∩ F ), so E and F are independent.
(b) P(E) = 25/100, P(F ) = 19/100, and P(E ∩ F ) = 3/100. The events E and F are not independent
since P(E ∩ F ) 6= P(E)P(F ).
50 20 10
(c) Already replacing it by 101 makes the events dependent: 101 · 101 6= 101 . The fact that E and F
of (a) were dependent was a pure coincidence, and had nothing to do with number theoretic properties
of divisibility by 2 and 5. Whether one could change the 100 in part (b) to make the events mentioned
there independent would be a much harder question!



4. Let X be a discrete random variable with values in N = {1, 2, . . .}. Prove that X is geometric with
parameter p = P(X = 1) if and only if the memoryless property

P(X = n + m | X > n) = P(X = m)

holds.
Hint: To show that the memoryless property implies that X is geometric, you need to prove that the
p.m.f. of X has to be P(X = k) = p(1 − p)k−1 . For this, use P(X = k) = P(X = k + 1|X > 1) repeatedly.

Solution: We first show that a geometric RV has the memoryless property: We learned that P(X =
m) = p(1 − p)m−1 and that P(X > m) = (1 − p)m , therefore by the definition of conditional probability
we obtain
P(X = n + m) p(1 − p)n+m−1
P(X = n + m | X > n) = =
P(X > n) (1 − p)n
= p(1 − p)m−1 = P(X = m)




2




This study source was downloaded by 100000858936669 from CourseHero.com on 02-02-2023 23:44:43 GMT -06:00


https://www.coursehero.com/file/46056110/HW-2-Solutionpdf/

Written for

Course

Document information

Uploaded on
February 3, 2023
Number of pages
7
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ExamsConnoisseur Self
Follow You need to be logged in order to follow users or courses
Sold
587
Member since
3 year
Number of followers
344
Documents
1492
Last sold
1 month ago

4.2

68 reviews

5
40
4
11
3
13
2
1
1
3

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions