HW 01 Solution: Probability and Conditional Probability

Solution

Due date

This assignment is due on Monday, September 1 at 11:59pm. To be considered on time, the following must be done by the due date:

  • Final .pdf file submitted on Gradescope

Introduction

This first homework is fully conceptual, where you will practice your skills in applying the concept of probability and conditional probability. The next homework might contain an applied exercise where you will practice using R code and Quarto.

Learning goals

In this assignment, you will…

  • apply the concept of event and sample space to compute probability
  • apply various concepts about event operation, such as union, intersection, disjoint, and complement.
  • use the axioms of probability and the additive rule to compute the probability of an event
  • apply the concept of conditional probability

Conceptual exercises

Instructions

The conceptual exercises focus on explaining concepts and showing results mathematically. Show your work for each question. These problems are from SDG’s exercises on page 21. While a solution manual may exist out there, I expect you not to skip any steps and carefully understand the thinking process when working on these exercises.

You may write the answers and associated work for conceptual exercises by hand or type them in your Quarto document.

Exercise 1 (6 points)

One ball is to be selected from a box containing red, white, blue, yellow, and green balls. If the probability that the selected ball will be red is 1/5 and the probability that it will be white is 2/5.

  1. Write down the sample spaces for this experiment (there are several ways to do this) (+1 points if you can come up with more than one way)

    Solution:

    Several ways to write the sample space

    \[ \{\text{selected ball is Red, selected ball is White, selected ball is Blue,}\] \[\text{selected ball is Yellow, selected ball is Green}\} \]

    \[ \{\text{selected ball is Red, selected ball is White, selected ball is either Blue Yellow or Green}\} \]

    and many more.

  2. What is the probability that it will be red or white?

    Solution:

    Let’s define the sample space as \(S=\{\text{Red, White, Either Blue Yellow or Green}\}\).

    \[P(Red \cup White)=\underbrace{P(Red)}_{1/5}+\underbrace{P(White)}_{2/5}-\underbrace{P(Red \cap White)}_{0, \text{this will never happen as we only select one ball}}=3/5.\]

  3. What is the probability that it will be blue, yellow, or green?

    Solution:

    Note that \(P(\text{Either Blue Yellow or Green})=P(\{Red \cup White\}^c)\\=1-P(Red \cup White)=1-3/5=2/5.\)

Exercise 2 (2 points)

A student selected from a class will be either a boy or a girl. If the probability that a boy will be selected is 0.3. What is the probability that a girl will be selected?

Solution:

Let \(B\) be the event that a boy is selected and \(G\) be the event that a girl is selected. We are told that \(B\cup G=S\), so we know \(G=B^c\), and consequently \(P(G)=1-P(B)=1-0.3=0.7\).

Exercise 3 (7 points)

Consider two events \(A\) and \(B\) such that \(Pr(A)=1/3\) and \(Pr(B)=1/2\). Determine the value of \(Pr(A\cap B^c)\) for the following conditions:

  1. If \(A\) and \(B\) are disjoint

    Solution: It might be easier to answer questions 1 through 3 using Venn Diagrams.

    Recall that \[P(A\cap B^c)=P(A)+P(B^c)-P(A\cup B^c)\]

    We know \(P(A)=1/3,P(B^c)=1-1/2=1/2\). When \(A\) and \(B\) are disjoint, it means that \(A\subset B^c\), thus \(P(A\cup B^c)=P(B^c)=1/2\). Now we get \(P(A\cap B^c)=1/3+1/2-1/2=1/3.\)

  2. If \(A\subset B\)

    Solution:

    When \(A\subset B\), it means that \(A\cap B^c=\emptyset\) (read: No element of A is not in B), thus \(P(A\cap B^c)=0\).

  3. If \(Pr(A\cap B)=1/8\)

    Solution:

    Using the law of total probability :

    \[ P(A)=P(A\cap B)+P(A\cap B^c)\Leftrightarrow P(A\cap B^c)=P(A)-P(A\cap B)=1/3-1/8=5/24. \]

Exercise 4 (7 points)

If the probability that student \(A\) will fail a certain statistics examination is 0.5, the probability that student \(B\) will fail the examination is 0.2, and the probability that both student \(A\) and student \(B\) will fail the examination is 0.1.

  1. What is the probability that at least one of these two students will fail the examination?

    Solution:

    Let’s first define \(A\) as the event student A fails, and \(B\) as the event student B fails. We are interested in \(P(A\cup B)=P(A)+P(B)-P(A\cap B)=0.5+0.2-0.1=0.6\).

  2. Can you compute the probability that both students will pass the exam? If yes, please find the probability; if not, why?

    Solution:

    We are interested in \(P(A^c\cap B^c)\). Note that \(A^c\cap B^c=(A\cup B)^c\). Thus, \(P(A^c\cap B^c)=P((A\cup B)^c)=1-P(A\cup B)=1-0.6=0.4\).

  3. What is the probability that exactly one student will fail the exam?

    Solution:

    Two events that should be included here: (i) student A fails and student B succeeds, and (ii) student A succeeds and student B fails, which are two completely disjoint events. Thus the probability we’re interested is:

    \[ P((A\cap B^c)\cup (A^c\cap B))=P(A\cap B^c)+P(A^c\cap B) \]

    Let’s evaluate the two probabilities. Using law of of total probability, we have

    \[ P(A^c\cap B)=P(B)-P(A\cap B)=0.2-0.1=0.1, \]

    \[ P(A\cap B^c)=P(A)-P(A\cap B)=0.5-0.1=0.4. \]

    Finally, we have \(P((A\cap B^c)\cup (A^c\cap B))=0.1+0.4=0.5.\)

Exercise 5 (6 points)

Consider two events A and B with \(Pr(A) = 0.4\) and \(Pr(B) = 0.7\). Determine the maximum and minimum possible values of \(Pr(A\cap B)\) and the conditions under which each of these values is attained.

Solution:

Recall that

\[ P(A\cap B)=P(A)+P(B)-P(A\cup B)=0.4+0.7-P(A\cup B)=1.1-P(A\cup B). \]

So \(P(A\cap B)\) is the largest when \(P(A\cup B)\) is the smallest and vice versa.

Now let’s consider the case when \(P(A\cup B)\) is the smallest. This happens if \(A\subset B\) , which means \(P(A\cup B)=P(B)=0.7\), thus the largest possible value of \(P(A\cap B)\) is \(1.1-0.7=0.4\).

Let’s consider the case when \(P(A\cup B)\) is the largest. The maximum value of this probability is 1, and that happen if \(A\cup B=S\), which means \(P(A\cup B)=1\), thus the smallest possible value of \(P(A\cap B)\) is \(1.1-1=0.1\).

Exercise 6 (7 points)

Solve the following problem to practice the concept of conditional probability.

  1. If \(A\subset B\) with \(Pr(B) > 0\), what is the value of \(Pr(A|B)\)?

    Solution:

    If \(A\subset B\) , then \(A\cap B=A\) and \(P(A\cap B)=P(A)\) . Applying multiplication rule yields

    \[ P(A\mid B)=P(A\cap B)/P(B)=P(A)/P(B). \]

  2. If \(A\) and \(B\) are disjoint events and \(Pr(B) > 0\), what is the value of \(Pr(A|B)\) ?

    Solution:

    If \(A\) and \(B\) are disjoint then \(A\cap B=\emptyset\) , thus \(P(A\cap B)=0\) . Applying multiplication rule yields

    \[ P(A\mid B)=P(A\cap B)/P(B)=0. \]

  3. If \(S\) is the sample space of an experiment and \(A\) is any event in that space, what is the value of \(Pr(A|S)\)?

    Solution:

    Since \(A=S\), it means that \(P(A\cap S)=A\) and we know \(P(S)=1\). Applying multiplication rule yields

    \[ P(A\mid S)=P(A\cap S)/P(S)=P(A). \]

Exercise 7 (7 points)

Each time a shopper purchases a tube of toothpaste, he chooses either brand \(A\) or brand \(B\). Suppose that for each purchase after the first, the probability is 1/3 that he will choose the same brand that he chose on his preceding purchase, and the probability is 2/3 that he will switch brands.

  1. Let \(A_i\) denote the event that the shopper purchases brand \(A\) on his \(i\)-th purchase, similarly for \(B_i\), for \(i=1,2,3,\ldots\). List the known probability stated above using this notation.

    Solution:

    Using some \(i\) as a counter example is fine, but the generalized notation for the known probabilities is:

    \[ P(A_{i+1}\mid A_i)=1/3, P(B_{i+1}\mid B_i)=1/3,\\ P(B_{i+1}\mid A_i)=2/3, P(A_{i+1}\mid B_i)=2/3, \]

    for all \(i\geq 1\). Listing the two probabilities yields full score on this problem [3 points]

  2. If he is equally likely to choose either brand \(A\) or brand \(B\) on his first purchase, what is the probability that both his first and second purchases will be brand \(A\) and both his third and fourth purchases will be brand \(B\)?

    Solution:

    The event we’re interested in is \(B_4\cap B_3\cap A_2 \cap A_1\). Now we have two additional known probabilities:

    \[ P(A_1)=P(B_1)=1/2. \]

    We apply the multiplicative rule of probability several times:

    \[ P(B_4\cap B_3\cap A_2 \cap A_1) =P(B_4\cap B_3\cap A_2 \mid A_1)P(A_1) \]

    where

    \[ P(B_4\cap B_3\cap A_2 \mid A_1)=P(B_4\cap B_3\mid A_2 \cap A_1)P(A_2 \mid A_1) \]

    similarly \[ P(B_4\cap B_3\mid A_2 \cap A_1)=P(B_4\mid B_3 \cap A_2 \cap A_1)P(B_3\mid A_2\cap A_1). \]

    Writing it altogether:

    \[ P(B_4\cap B_3\cap A_2 \cap A_1)=\underbrace{P(B_4\mid B_3 \cap A_2 \cap A_1)}_{1/3}\ \underbrace{P(B_3\mid A_2\cap A_1)}_{2/3}\ \underbrace{P(A_2 \mid A_1)}_{1/3}\ \underbrace{P(A_1)}_{1/2}=1/27. \]

Exercise 8 (7 points)

A box contains three cards. One card is red on both sides, one card is green on both sides, and one card is red on one side and green on the other. One card is selected from the box at random, and the color on one side is observed. If this side is green, what is the probability that the other side of the card is also green?

Solution:

Assume the probability of each card to be selected is equally likely. Let’s define some event:

\(A:\) The event that the selected card is green on both sides

\(B:\) The event that the observed side of the selected card is green.

The probability we are interested in is \(P(A\mid B)\). To compute this probability using the multiplication rule, we need to know \(P(A\cap B)\) and \(P(B)\). Note that \(A\subset B\) , it means that \(P(A\cap B)=P(A)=1/3\).

Now, let’s carefully think about event \(B\) and its sample space to compute \(P(B)\). Let say card 1 is red on both sides, card 2 is green on both sides, and card 3 is red on one sides and green on the other. I can write down

\[B=\{\text{1st Green side of card 2, 2nd Green side of card 2, Green side of card 3}\}\]

and the sample space is \[\{\text{1st Red side of card 2, 2nd Red side of card 2, 1st Green side of card 2,}\] \[\\\text{2nd Green side of card 2, Green side of card 3, Red side of card 3}\}\]

Now we know \(P(B)=1/2\), and we get that \(P(A\mid B)=(1/3)/(1/2)=2/3.\)

Grading (50 points)

Component Points
Ex 1 6
Ex 2 2
Ex 3 7
Ex 4 7
Ex 5 6
Ex 6 7
Ex 7 7
Ex 8 7
Formatting 1

“Formatting” grade is to assess whether or not you mark specific page of the pdf to a specific question to help the TA when grading.