Due date: Tuesday 1/27, 11:59pm
Conditional probability
01
04
Link to originalMultiplication - drawing two hearts
Two cards are drawn from a standard deck (without replacement).
(a) What is the probability that both are hearts?
(b) What is the probability that both are 4?
Solution
Solutions - 5030-04
Let be the outcome of the first card, be the outcome of the second card, and denote “hearts.”
(a)
Apply the multiplication rule for sequential draws without replacement:
(b)
Apply the multiplication rule:
Link to original
02
09
Link to originalSyntax errors vs. logic errors, Part 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.
Solution
Solutions - 5030-09
Let = syntax error, = logic error.
(1) Solve for using :
(2) Solve for using :
(3) Apply inclusion-exclusion to find :
Link to original
Bayes’ Theorem
03
02
Link to originalBayes’ Theorem - Inferring die from roll
A bag contains one 4-sided die, one 6-sided die, and one 12-sided die. You draw a random die from the bag, roll it, and get a 4.
What is the probability that you drew the 6-sided die?
Solution
Solutions - 5040-02
(1) Define events:
Let , , = event of drawing each die.
, , , and .
(2) Apply Bayes’ Theorem:
Link to original
Independence
04
04
Link to originalSyntax errors vs. logic errors, Part B
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.
Are the events “program has a syntax error” and “program has a logic error” independent? Justify your answer.
Solution
Solutions - 5050-04
Let = syntax error, = logic error.
(1) Find and :
(2) Check the independence condition:
Link to original
05
02
Link to originalPairwise 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.
Solution
Solutions - 5050-02
(1) Compute individual probabilities:
, , .
(2) Verify pairwise independence:
occurs for , so
occurs for , so
occurs for , so
(3) Disprove mutual independence:
, , and cannot all occur simultaneously, so
Link to original
Tree diagrams
06
02
Link to originalHomework part errors
A homework problem has 10 different parts. You submit and are told that 4 of the 10 answers you provided are incorrect, but you are not told which parts are incorrect.
(a) What is the probability you will have gotten the first part correct and the second part incorrect? Draw a tree diagram.
(b) Suppose the 4 errors have occurred in the first 6 parts. In this case, how many possible arrangements are there for these 4 errors?
(c) What is the probability the 4 errors occurred in the first 6 parts?
Solution
Solutions - 5060-02
(a)
(b)
(c)
Link to original
Counting
07
09
Link to originalCounting passwords
Suppose a password must be created using 5 letters and 6 digits. (There are 26 letters, a-z, and 10 digits, 0-9.) No letter or digit may be repeated.
(a) How many unique passwords can be created if the letters must come first and the digits last?
(b) How many unique passwords can be created if the 5 letters and 6 digits can appear in any order?
Solution
Solutions - 5070-09
(a)
Apply the permutation formula (letters first, digits last):
(b)
Multiply by the number of ways to interleave 5 letter positions and 6 digit positions:
Link to original
08
03
Link to originalDrawing balls of distinct color
A bin contains 3 green and 4 yellow balls. Two balls are drawn out.
What is the probability that they are different colors?
Solution
Solutions - 5070-03
(1) Set up the counting argument:
Since order does not matter, the sample space has outcomes. For different colors, choose one of each.
(2) Evaluate:
Link to original
09
02
Link to originalWisconsin flag 2 of 3 days
A kindergarten class hangs a random state flag (50 flags) on the wall every day. What is the probability that two days out of three given days have Wisconsin’s flag?
Solution
Solutions - 5070-02
(1) Identify the binomial structure:
Each day has probability of showing Wisconsin’s flag, independently of the other days, and probability of showing a different state’s flag. There are ways to choose which 2 of the 3 days have the Wisconsin flag.
(2) Evaluate:
Link to original
Review problems
10
03
Link to originalInclusion-exclusion reasoning
Suppose and . Show that .
Solution
Solutions - 5020-03
(1) State the inclusion-exclusion principle:
(2) Derive the lower bound on :
Since :
(3) Derive the upper bound on :
Since , we have .
Link to original
