220 likes | 614 Views
Topics. Counting Techniques, CombinatoricsEqually Likely Counting N(A)/NPermutationsCombinationsConditional Probability. Probability Counting Techniques. Equally Likely Counting (
E N D
1. 1 NA387 Lecture 5: Combinatorics, Conditional Probability (Devore, Chapter 2,
Sections: 2.3 2.4)
2. Topics Counting Techniques, Combinatorics
Equally Likely Counting N(A)/N
Permutations
Combinations
Conditional Probability
3. Probability Counting Techniques Equally Likely Counting (# outcomes is small)
Product Rule for Ordered Pairs
Tree Diagrams
Permutations
Combinations
4. 4 Simple Counting Techniques When various outcomes are equally likely, then computing probabilities reduces to counting.
P(A) = N(A) / N
Lets define event A as: The Probability of rolling a Seven (sum of outcomes in rolling 2 fair dice);
N= 36 outcomes in sample space
Outcomes that yield a sum of 7: (1,6) , (6,1), (2,5) , (5,2) , (3,4) , (4,3)
N(A) = 6
N = 36 So, P(A) = 6/36 = 1/6
Note: Here N is relatively small
However, N may be quite large or outcomes may not be equally likely, so we need additional counting rules.
5. Product Rule for Ordered Pairs Ordered Pairs: Select Two Objects
Object 1 select n1 ways
Object 2 select n2 ways
Total Number of pairs: n1*n2
Examples:
Roll Two Dice (6 outcomes per die) ? total pairs: 36
Suppose every vehicle sold in a dealership has 1 engine and 1 transmission from the following options (outcomes):
Engine (Object A): 4-cyl, 6-cyl, 8-cyl
Transmission (Object B): Automatic, Manual
How may total pairs do you have?
6. Tree Diagrams- Example:
7. General Product Rule We may use the general product rule if we keep adding objects to form ordered collections of k-tuples (n1* n2*..nk ordered collections)
Ordered pair ~ 2-tuple
Three objects in collection ~ 3-tuple
Four objects in collection ~ 4-tuple,
Suppose each of our engine/transmission collections have either a 5-year or 7-year warranty.
How many ordered collections are possible (ways in which one object of each may be selected)?
(hint: draw tree diagram, then compare with product rule)
8. With or Without Replacement? An important question when identifying collections of objects is whether you select objects with or without replacement.
Prior examples assumed with replacement or with repetition, in other words, we assumed that we could pick as many objects as we wish without depleting the supply, say of the 4cyl transmissions
9. Permutations An ordered sequence of k objects are selected from a set of n distinct objects. (without replacement)
Total number of different permutations (arrangements) of n different objects = n!
Total number of permutations of n objects taken k at a time is:
(Note: m! ~ means m factorial) for instance: 4! = 4 x 3 x 2 x 1; 0! = 1
11. Ordered vs. Non-ordered Another distinction to be made is whether we consider order in classifying outcomes.
Example: Suppose you have 3 circuit board locations and each board will require two components.
How does the number of possibilities change if the order of the location matters vs. if it does not matter?
12. Combinations A combination is an unordered subset of size k that can be selected from a set of n distinct objects.
Number of combinations of size k is much smaller than the number of permutations, because when order is disregarded, a number of permutations correspond to the same combination
Consider the prior example of 3 circuit board locations and two components per board. What is the number of Combinations?
15. Combinations: Example Suppose a manufacturing bin of 50 parts contains 3 defective parts.
Samples of 6 parts are selected w/o replacement.
How many different ways are there to obtain samples that contain exactly 2 defects?
Is order important?
Note: This is (slightly) more challenging. Easier to break it into 5 steps as follows:
16. Defect Example Continued Five Step Solution:
Find combinations of subsets that will yield exactly 2 defects (Event A)
Find combinations of subsets for the remaining 4 parts selected.
Find total possible subsets for exactly two defects is the product rule (n1 * n2) where n1 is number of collections of 2 defects and n2 is the number of collections of 4 non-defects.
Find total number of subsets of sample size (e.g., samples of 6)
P (Exactly 2 defects) = N(A) / N
Where N(A) = # subset combinations containing 2 defects
N = # subset combinations
17. A Further Complication Suppose you want to determine the probability of finding at least 2 defects.
Hint:
At least 2 ? find 2 or 3 defects
Event A = exactly 2 defects, Event B = exactly 3 defects
P (A U B) = P (A) + P (B) P (A B)
Note: P (A B) = 0 because mutually exclusive events
P (exactly 2) + P (Exactly 3)
Repeat the 5-step process again for exactly 3 defects.
18. Conditional Probability Conditional probability is used when the outcome of an event may (or may not) change, given the outcome of a related event.
P(A|B) = Prob of A given B
19. Conditional Probability -- Interpretation How should we interpret P(B | A)?
If all outcomes of an experiment are equally likely and there are n total outcomes, then:
P(A) = (number of A outcomes) / n
P(A B) = (number of outcomes in A and B)/n
So, P(B|A) = outcomes of A and B / outcomes of A
So, P(B | A) represents the relative frequency of event B among the trials that produce an outcome in event A.
20. Conditional Probability Example P(A|B) = P(A B) / P(B)
Example:
Event A: 90% of Car Model X Have Air Conditioning
Event B: 10% of Car Model X Have Sunroof
Event (A and B) : 8% of Car Model X Have Both
Given the Car has a Sunroof, what is the probability that it has air conditioning?
21. Conditional Probability Conditional probability is often derived from tree diagrams or contingency tables.
Suppose you manufacture 100 piston shafts.
Event A: feature A is not defective
Event B: feature B is not defective
P(A Not Def | B Def)? = 6/86 = 0.07
P(A Not Def | B Not Def)? 5/14 = 0.36
P(A Not Def | B Def)? = 6/86 = 0.07
P(A Not Def | B Not Def)? 5/14 = 0.36
22. Solution to Defect Example (Slide 15) Step 1: 3! / (2! * 1!) = 3
Step 2: 47! / (4! * 43!) = 178,365 ways
Step 3: 3 x 178,365 = 535,095 ? N(A)
Step 4: 50! / (6! * 44!) = 15,890,700 ? N
Step 5: P (exactly 2) = N(A) / N
P (exactly 2) = 535,095 / 15,890,700 = 0.034
23. Solutions Shaft Defects example :
P(A Not Def | B Def)? = 6/86 = 0.07
P(A Not Def | B Not Def)? 5/14 = 0.36