100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Math 302, Assignment 2 Solutions University of British Columbia MATH 302 $7.99   Add to cart

Exam (elaborations)

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

 136 views  0 purchase
  • Course
  • Institution

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. Yo...

[Show more]

Preview 2 out of 7  pages

  • February 3, 2023
  • 7
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
avatar-seller
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/

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller ExamsConnoisseur. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75057 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart