Due date: Tuesday 9/9, 11:59pm
Conditional probability
01
05
Conditional probability - algebra games
Assume that
, , and partition the sample space, and assume this data:
Find these values:
Link to originalSolution
01
(1) Use the Law of Total Probability to find
.
(2) Use Bayes’ Theorem to find
.
(3) Use Bayes’ Theorem to find
.
(4) Use Bayes’ Theorem to find
. Link to original
02
09
Syntax errors vs. logic errors A
A computer program may contain a syntax error or a logic error or both types of errors. The probability that a program has both types of error is 0.16. The probability that a program has a syntax error given that it has a logic error is 0.4. The probability that a program has a logic error given that it has a syntax error is 0.5.
Find the probability that a particular program has at least one type of error.
Link to originalSolution
03
Let A be a syntax error and B a logic error.
Link to original
Bayes’ Theorem
03
01
Bayes’ Theorem - Stolen computer
Someone in a coffee shop “promises” to watch your computer while you’re in the bathroom.
If she does watch it, the probability that it gets stolen is 10%. If she doesn’t watch it, the probability that it gets stolen is 70%. You think there’s a 90% chance she is honest enough to watch it, having promised.
When you come back from the bathroom, the computer is gone. What is the probability that she witnessed the theft?
Link to originalSolution
04
(1) Define events.
Let
be the event that she watches it. Let
be the event that the computer is stolen. We are given the probabilities
, , . We are asked to compute
.
(2) Set up formula
using Bayes’ Theorem.
(3) Plug in values.
Link to original
Independence
04
01
Independence puzzle
Assume
, , and are mutually independent. Compute in terms of , , and . Link to originalSolution
07
(1) Use inclusion-exclusion principle.
(2) Use the fact that they are mutually independent.
Link to original
05
02
Pairwise independent, not mutually independent: three coin flips
Flip a coin three times in sequence. Label events like this:
- exactly one heads among first and second flips - exactly one heads among second and third flips - exactly one heads among first and third flips Verify that
are pairwise independent but not actually mutually independent. Link to originalSolution
08
(1) Find probabilities for individual events.
.
(2) Compute pairwise probabilities.
The only way
and happen is when the second flip is heads and the first and third flip are tails, and when the first and third are heads and when the second is heads. So, . The only way
and happen is when only the third flip is heads or when only the first and second flip are heads. So, . The only way
and happen is when only the first flip is heads or when only the second and third flip are heads. So, .
(3) Disprove mutual independence.
Link to original
, , and cannot happen simultaneously, so .
Tree diagrams
06
01
Bin of marbles
A bin contains 5 red marbles, 7 blue marbles, and 3 white marbles.
We draw a random marble. If it’s red, we put it back, if it’s not red, we keep it. We do this three times.
(a) What is the probability of getting red then white then blue?
(b) Suppose the last draw was blue. What is the probability that the first was red?
Link to originalSolution
09
(a)
(1) Define events.
We define the sample space as
.
is the first ball drawn, the second, and the third.
represents the event in which a red ball is drawn, represents the event in which a white ball is drawn, represents the event in which a blue ball is drawn.
(2) Compute
.
(b)
(1) We are asked to compute
. Use Bayes’ Theorem to set up formula for .
(2) Find probabilities for all relevant combinations.
(3) Plug in values.
Link to original
Counting
07
08
Counting license plates
A license plate must consist of 3 letters followed by 4 digits. Assuming we choose from 26 letters, A-Z, and 10 digits, 0-9, how many different license plates could be created if:
(a) Letters and numbers cannot be repeated.
(b) Letters and numbers can be repeated except that there must be exactly two 9’s.
Link to originalSolution
06
(a) Letters in
ways Digits in ways For each 3 letter arrangement, there are 5040 digit arrangements. Total number of ways (b) Letters in
ways Decide the spots for the two 9’s first: Remaining 2 digits in ways Total number of ways: Link to original
08
01
Counting outcomes - permutations and combinations
In a lottery, five distinct numbers are picked at random from
. How many possible outcomes are there: (a) If we care about the order of numbers.
(b) If the order does not matter.
Link to originalSolution
10
(a)
If the order matters, then we are dealing with a permutation. We want
distinct numbers, so
(b)
If the order matters, then we are dealing with a combination. We want
distinct numbers, so Link to original