Download presentation
Presentation is loading. Please wait.
Published bySheryl Stafford Modified over 8 years ago
1
The Basic Practice of Statistics Chapter 6: Introducing Probability
2
A random phenomenon is a situation in which we know what outcomes could happen, but we don’t know which particular outcome did or will happen. The probability of an event is its long-run relative frequency. While we may not be able to predict a particular individual outcome, we can talk about what will happen in the long run.
3
For any random phenomenon, each attempt, or trial, generates an outcome. Something happens on each trial, and we call whatever happens the outcome. These outcomes are individual possibilities, like the number we see on top when we roll a die.
4
This is the sample space of event A. Event A is rolling a total of five on a pair of dice. Always express sample space in brackets. An event is any set or collection of outcomes.
5
Sample Spaces Collection of all possible outcomes –e.g.: All six faces of a die: –e.g.: All 52 cards in a deck:
6
All the possible outcomes of rolling two dice
7
Events Simple event –Outcome from a sample space with one characteristic –e.g.: A red card from a deck of cards Joint event –Involves two outcomes simultaneously –e.g.: An ace that is also red from a deck of cards
8
Simple Events The Event of a Triangle 5 There are 5 triangles in this collection of 18 objects
9
The event of a triangle AND blue in color Joint Events Two triangles that are blue
10
Visualizing Events Contingency tables Tree diagrams Red 2 24 26 Black 2 24 26 Total 4 48 52 Ace Not Ace Total Full Deck of Cards Red Cards Black Cards Not an Ace Ace Not an Ace
11
Contingency Table A Deck of 52 Cards Ace Not an Ace Total Red Black Total 224 2 26 44852 Sample Space Red Ace
12
P(A 1 and B 2 )P(A 1 ) Total Event Joint Probability Using Contingency Table P(A 2 and B 1 ) P(A 1 and B 1 ) Event Total 1 Joint Probability Marginal (Simple) Probability A1A1 A2A2 B1B1 B2B2 P(B 1 ) P(B 2 ) P(A 2 and B 2 ) P(A 2 )
13
P(A 1 ) P(B 2 ) P(A 1 and B 1 ) Compound Probability (Addition Rule) P(A 1 or B 1 ) = P(A 1 ) + P(B 1 ) - P(A 1 and B 1 ) P(A 1 and B 2 ) Total Event P(A 2 and B 1 ) Event Total 1 A1A1 A2A2 B1B1 B2B2 P(B 1 ) P(A 2 and B 2 ) P(A 2 ) For Mutually Exclusive Events: P(A or B) = P(A) + P(B)
14
Conditional Probability Using Contingency Table Black Color Type Red Total Ace 224 Non-Ace 24 48 Total 26 52 Revised Sample Space
15
Full Deck of Cards Tree Diagram Event Possibilities Red Cards Black Cards Ace Not an Ace Ace Not an Ace
16
Tree Diagrams A tree diagram helps us think through conditional probabilities by showing sequences of events as paths that look like branches of a tree. Making a tree diagram for situations with conditional probabilities is consistent with our “make a picture” mantra.
17
Probability Trees A method for solving probability problems –Given probabilities for some events (perhaps union, intersection, or conditional) Find probabilities for other events –Record the basic information on the tree Usually three probability numbers are given –Perhaps two probability numbers if events are independent The tree helps guide your calculations –Each column of circled probabilities adds up to 1 –Circled prob times conditional prob gives next probability –For each group of branches Conditional probabilities add up to 1 Circled probabilities at end add up to probability at start
18
Probability Tree (continued) Shows probabilities and conditional probabilities P(A and B) P(A and “not B”) P(“not A” and B) P(“not A” and “not B”) P(A) P(not A) Yes No P(“not B” given A) P(B given A) P(B given “not A”) P(“not B” given “not A”) No Event B Yes No Event A
19
Example: Appliance Purchases First, record the basic information Prob(Washer) = 0.20, Prob(Dryer) = 0.25 Prob(Washer and Dryer) = 0.15 0.15 0.20 Yes No Dryer?Washer? These add up to P(Dryer) = 0.25
20
Example (continued) Next, subtract: 1–0.20 = 0.80, 0.25–0.15 = 0.10 0.15 0.10 0.20 0.80 Yes No Dryer?Washer? These add up to P(Dryer) = 0.25
21
Example (continued) Now subtract: 0.20–0.15 = 0.05, 0.80–0.10 = 0.70 0.15 0.05 0.10 0.70 0.20 0.80 Yes No Dryer?Washer?
22
Example (completed tree) Now divide to find conditional probabilities 0.15/0.20 = 0.75, 0.05/0.20 = 0.25 0.10/0.80 = 0.125, 0.70/0.80 = 0.875 0.15 0.05 0.10 0.70 0.20 0.80 Yes No 0.25 No 0.75 0.125 0.875 No Dryer?Washer?
23
Example (finding probabilities) Finding probabilities from the completed tree P(Washer) = 0.20 P(Dryer) = 0.15+0.10 = 0.25 P(Washer and Dryer) = 0.15 P(Washer or Dryer) = 0.15+0.05+0.10 = 0.30 P(Washer and not Dryer) = 0.05 P(Dryer given Washer) = 0.75 P(Dryer given not Washer) = 0.125 P(Washer given Dryer) = 0.15/0.25 = 0.60 (using the conditional probability formula) 0.15 0.05 0.10 0.70 0.20 0.80 Yes No 0.25 No 0.75 0.125 0.875 No Dryer?Washer?
24
Tree Diagrams Figure is a nice example of a tree diagram and shows how we multiply the probabilities of the branches together:
25
Probability tree
27
What is the probability that a car has a CD player, given that it has AC ? i.e., we want to find P(CD | AC) Conditional Probability Example Of the cars on a used car lot, 70% have air conditioning (AC) and 40% have a CD player (CD). 20% of the cars have both.
28
Using Decision Trees Has CD Does not have CD Has AC Does not have AC Has AC Does not have AC P(CD)= 0.4 P(CD’)= 0.6 P(CD and AC) = 0.2 P(CD and AC’) = 0.2 P(CD ’ and AC ’ ) = 0.1 P(CD ’ and AC) = 0.5 All Cars Given CD or no CD: (continued)
29
Using Decision Trees Has AC Does not have AC Has CD Does not have CD Has CD Does not have CD P(AC)= 0.7 P(AC’)= 0.3 P(AC and CD) = 0.2 P(AC and CD’) = 0.5 P(AC ’ and CD ’ ) = 0.1 P(AC ’ and CD) = 0.2 All Cars Given AC or no AC:
30
Probability trees Conditional probabilities can get complex and it is often a good strategy to build a probability tree that represents all possible outcomes graphically and assigns conditional probabilities to subsets of events. 0.47 Internet user Tree diagram for chat room habits for three adult age groups. P(chatting)= 0.136 + 0.099 + 0.017 = 0.252 About 25% of all adult Internet users visit chat rooms.
31
Breast cancer screening Cancer No cancer Mammography Positive Negative Positive Negative Disease incidence Diagnosis sensitivity Diagnosis specificity False negative False positive 0.0004 0.9996 0.8 0.2 0.1 0.9 Incidence of breast cancer among women ages 20–30 Mammography performance If a woman in her 20s gets screened for breast cancer and receives a positive test result, what is the probability that she has breast cancer? She could either have a positive test and have breast cancer, or have a positive test but not have cancer (false positive).
32
Cancer No cancer Mammography Positive Negative Positive Negative Disease incidence Diagnosis sensitivity Diagnosis specificity False negative False positive 0.0004 0.9996 0.8 0.2 0.1 0.9 Incidence of breast cancer among women ages 20–30 Mammography performance Possible outcomes given the positive diagnosis: positive test and breast cancer, or positive test but not cancer (false positive). This value is called the positive predictive value, or PV+. It is an important piece of information but, unfortunately, is rarely communicated to patients.
33
Events When outcomes are equally likely, probabilities for events are easy to find just by counting. When the k possible outcomes are equally likely, each has a probability of 1/k. For any event A that is made up of equally likely outcomes
34
(There are 2 ways to get one 6 and the other 4) e.g. P ( ) = 2/36 Computing Probabilities The probability of an event E: Each of the outcomes in the sample space is equally likely to occur
35
We can see this in the following example. If we flip a coin 500 times and it lands on heads 248 times, then the empirical probability is given by: Remember
36
The probability of drawing a king is given by: Remember
37
The probability of tossing a die and rolling a 7 is given by: The probability of tossing a die and rolling a number less than 7 is given by:
38
The probability of drawing a heart is given by: Remember
39
The probability of drawing a king is given by: Remember
40
Formal Probability Two requirements for a probability: A probability is a number between 0 and 1. For any event A, 0 ≤ P(A) ≤ 1.
41
Probability Probability is the numerical measure of the likelihood that an event will occur Value is between 0 and 1 Sum of the probabilities of all mutually exclusive and collectively exhaustive events is 1 Certain Impossible.5 1 0
42
Formal Probability “Something has to happen rule”: The probability of the set of all possible outcomes of a trial must be 1. P(S) = 1 (S represents the set of all possible outcomes.)
43
In this example, the trials are independent only when you put the coin back (“sampling with replacement”) each time. Two events are independent if the probability that one event occurs on any given trial of an experiment is not influenced in any way by the occurrence of the other event. Imagine coins spread out so that half were heads up, and half were tails up. Pick a coin at random. The probability that is was head-up is 0.5. But, if you don’t put it back, the probability of picking up another head-up coin is now less than 0.5. Without replacement, successive trials are not independent. Independent versus disjoint events
44
Two events are disjoint if they have no outcomes in common and can never happen together. If you flip a coin once, it may turn out head or tail. However, you cannot obtain both head and tail on the same flip. Head and tail are disjoint events. If a couple gets a child, the child could be a boy or a girl. The child cannot be both boy and girl. Boy and girl are disjoint events. Events A and B are disjoint. Events A and B are NOT disjoint.
46
General addition rule General addition rule for any two events A and B: The probability that A occurs, or B occurs, or both events occur is: P(A or B) = P(A) + P(B) – P(A and B) What is the probability of randomly drawing either an ace or a heart from a pack of 52 playing cards? There are 4 aces in the pack and 13 hearts. However, one card is both an ace and a heart. Thus: P(ace or heart)= P(ace) + P(heart) – P(ace and heart) = 4/52 + 13/52 - 1/52 = 16/52 ≈ 0.3
47
Mutually Exclusive Events Two events are Mutually Exclusive if they cannot both happen, that is, if Prob(A and B) = 0 No overlap in Venn diagram Examples –Profit and Loss (for a selected business division) –Green and Purple (for a manufactured product) –Country Squire and Urban Poor (marketing segments) Mutually exclusive events are dependent events AB
48
Formal Probability Complement Rule: The set of outcomes that are not in the event A is called the complement of A, denoted A C. The probability of an event occurring is 1 minus the probability that it doesn’t occur: P(A) = 1 – P(A C )
49
Since any event will either occur or it will not occur, by rule 4 previously discussed, we get: Remember Rule 4: the sum of the probabilities of all possible outcomes of an experiment is 1.
50
can also be stated as: So the probability of tossing a die and not rolling a 4 is:
51
Special Events Impossible event e.g.: Club & diamond on one card draw Complement of event –For event A, all events not in A –Denoted as A’ –e.g.: A: queen of diamonds A’: all cards in a deck that are not queen of diamonds Null Event
52
Formal Probability Addition Rule: Events that have no outcomes in common (and, thus, cannot occur together) are called disjoint (or mutually exclusive).
53
Special Events Mutually exclusive events –Two events cannot occur together –e.g. -- A: queen of diamonds; B: queen of clubs Events A and B are mutually exclusive Collectively exhaustive events –One of the events must occur –The set of events covers the whole sample space –e.g. -- A: all the aces; B: all the black cards; C: all the diamonds; D: all the hearts Events A, B, C and D are collectively exhaustive Events B, C and D are also collectively exhaustive
54
Formal Probability Addition Rule: –For two disjoint events A and B, the probability that one or the other occurs is the sum of the probabilities of the two events. –P(A or B) = P(A) + P(B), provided that A and B are disjoint.
55
So, out of the six numbers that can show up on top, we have four ways that we can roll either a 5 or an even number. The probability is given by: Probability of rolling a 5 Probability of rolling an even number
58
Example: Venn Diagram Venn diagram probabilities correspond to right-hand endpoints of probability tree WasherDryer 0.05 0.15 0.10 0.70 P(Washer and Dryer) P(Washer and “not Dryer”) P(“not Washer” and Dryer) P(“not Washer” and “not Dryer”)
59
Notice, if we want the probability of rolling a 5 or rolling a number greater than 3. There are three numbers greater than 3 on a die and one of them is the 5. We cannot count the 5 twice. The probability is given by: Probability of rolling a 5 Probability of rolling a number greater than 3 Probability of rolling the same 5
60
Stated mathematically the rule is given by: Thus, the probability of drawing a 3 or a club from a standard deck of cards is: Cards with a 3 Cards with clubs Card that is a 3 and a club
61
Computing Compound Probability Probability of a compound event, A or B:
62
In order to calculate the probability that we roll a Five given that we roll a pair of dice. You must add up all of the possible combinations of that occurring do not forget ORDER!!!!! Red die versus green die
63
What Can Go Wrong? Beware of probabilities that don’t add up to 1. To be a legitimate probability distribution, the sum of the probabilities for all possible outcomes must total 1. Don’t add probabilities of events if they’re not disjoint. Events must be disjoint to use the Addition Rule.
65
Sometimes we are interested in a combination of outcomes (e.g., a die is rolled and comes up even). A combination of outcomes is called an event. When thinking about what happens with combinations of outcomes, things are simplified if the individual trials are independent. Roughly speaking, this means that the outcome of one trial doesn’t influence or change the outcome of another. For example, coin flips are independent.
66
General multiplication rule The probability that any two events, A and B, both occur is: P(A and B) = P(A)P(B|A) This is the general multiplication rule. If A and B are independent then P(A and B) = P(A)P(B) (A and B are independent when they have no influence on each other’s occurrence.) What is the probability of randomly drawing either an ace or heart from a pack of 52 playing cards? There are four aces in the pack and thirteen hearts. P(heart|ace)= 1/4P(ace) = 4/52 P(ace and heart) = P(ace)* P(heart|ace) = (4/52)*(1/4) = 1/52 Notice that heart and ace are independent events.
67
Computing Joint Probability The probability of a joint event, A and B:
68
If the set of crayons consists only of red, yellow, and blue, the probability of picking red is. The probability of tossing a die and rolling a 5 is. But the probability of picking red and rolling a 5 is given by:
69
This can be illustrated using a “tree” diagram. Since there are three choices for the color and six choices for the die, there are eighteen different results. Out of these, only one gives a combination of red and 5. Therefore, the probability of picking a red crayon and rolling a 5 is given by:
70
The multiplication rule for independent events can be stated as: This rule can be extended for more than two independent events:
71
The Law of Large Numbers The Law of Large Numbers (LLN) says that the long-run relative frequency of repeated independent events gets closer and closer to the true relative frequency as the number of trials increases. For example, consider flipping a fair coin many, many times. The overall percentage of heads should settle down to about 50% as the number of outcomes increases.
72
You can flip a coin ten times and have heads come up seven times, but this does not mean that the probability is 0.7. The more times a coin is flipped, the more certainty we have to determine the probability of coming up heads.
73
Thanks to the LLN, we know that relative frequencies settle down in the long run, so we can officially give the name probability to that value. Probabilities must be between 0 and 1, inclusive. A probability of 0 indicates impossibility. A probability of 1 indicates certainty.
74
Formal Probability Multiplication Rule: For two independent events A and B, the probability that both A and B occur is the product of the probabilities of the two events. P(A and B) = P(A) x P(B), provided that A and B are independent.
75
Formal Probability Multiplication Rule: Two independent events A and B are not disjoint, provided the two events have probabilities greater than zero:
76
Formal Probability - Notation Notation alert: We use the notation P(A or B) and P(A and B). Or you might see the following: P(A B) instead of P(A or B) P(A B) instead of P(A and B)
77
What Can Go Wrong? (cont.) Don’t multiply probabilities of events if they’re not independent. The multiplication of probabilities of events that are not independent is one of the most common errors people make in dealing with probabilities. Don’t confuse disjoint and independent—disjoint events can’t be independent.
78
Multiplication Rule for Dependent Events Dependent events are events that are not independent. The occurrence of one event affects the probability of the occurrence of other events. An example of dependent events is picking a card from a standard deck then picking another card from the remaining cards in the deck.
79
For instance, what is the probability of picking two kings from a standard deck of cards? The probability of the first card being a king is. However, the probability of the second card depends on whether or not the the first card was a king.
80
If the first card was a king then the probability of the second card being a king is. If the first card was not a king, the probability of the second card being a king is. Therefore, the selection of the first card affects the probability of the second card.
81
When we are looking at probability for two dependent events we need to have notation to express the probability for an event to occur given that another event has already occurred.
82
If A and B are the two events, we can express the probability that B will occur if A has already occurred by using the notation: This notation is generally read as “the probability of B, given A.
83
The multiplication rule can now be expanded to include dependent events. The rule now reads: Of course, if A and B are independent, then:
84
As an example, in a group of 25 people 16 of them are married and 9 are single. What is the probability that if two people are randomly selected from the group, they are both married?
85
If A represents the first person chosen is married and B represents the second person chosen is married then: Here, is now the event of picking another married person from the remaining 15 married persons. The probability for the selection made in B is affected by the selection in A.
87
Conditional probability Conditional probabilities reflect how the probability of an event can change if we know that some other event has occurred/is occurring. –Example: The probability that a cloudy day will result in rain is different if you live in Los Angeles than if you live in Seattle. –Our brains effortlessly calculate conditional probabilities, updating our “degree of belief” with each new piece of evidence. The conditional probability of event B given event A is: (provided that P(A) ≠ 0) If A and B are independent, P(B | A) P(B).
88
Conditional Probability (continued) Example: appliance store purchases Prob(Washer) = 0.20 Prob(Dryer) = 0.25 Prob(Washer and Dryer) = 0.15 –Conditional probability of buying a Dryer given that they bought a Washer Prob(Dryer given Washer) = Prob(Washer and Dryer)/Prob(Washer) = 0.15/0.20 = 0.75 75% of those buying a washer also bought a dryer –Conditional probability of Washer given Dryer = Prob(Washer and Dryer)/Prob(Dryer) = 0.15/0.25 = 0.60 60% of those buying a dryer also bought a washer Watch the denominator!
89
Independent Events Two events are Independent if information about one does not change the likelihood of the other –Three equivalent ways to check independence Prob (A given B) = Prob (A) Prob (B given A) = Prob (B) Prob (A and B) = Prob (A) Prob (B) Two events are Dependent if not independent –e.g., Prob(Washer and Dryer) = 0.15 Prob (Washer) Prob (Dryer) = 0.20 0.25 = 0.05 – Washer and Dryer are not independent They are dependent If independent, all three are true. Use any one to check. Not equal
90
Permutations A permutation is an arrangement of objects where order is important. For instance the digits 1,2, and 3 can be arranged in six different orders --- 123, 132, 213, 231, 312, and 321. Hence, there are six permutations of the three digits. In fact there are six permutations of any three objects when all three objects are used.
91
In general the number of permutations can be derived from the Multiplication Principal. For three objects, there are three choices for selecting the first object. Then there are two choices for selecting the second object, and finally there is only one choice for the final object. This gives the number of permutations for three objects as 3 2 1=6.
92
Now suppose that we have 10 objects and wish to make arrangements by selecting only 3 of those objects. For the first object we have 10 choices. For the second we have 9 choices, and for the third we have 8 choices. So the number of permutations when using 3 objects out of a group of 10 objects is 10 9 8=720.
93
We can use this example to help derive the formula for computing the number of permutations of r objects chosen from n distinct objects r n. The notation for these permutations is and the formula is:
94
We often use factorial notation to rewrite this formula. Recall that: And Using this notation we can rewrite the Permutation Formula for as
95
It is important to remember that in using this formula to determine the number of permutations: 1. The n objects must be distinct 2. That once an object is used it cannot be repeated 3. That the order of objects is important.
96
Combinations A combination is an arrangement of objects in which order is not important. We arrange r objects from among n distinct objects where r n. We use the notation C(n, r) to represent this combination. The formula for C(n, r) is given by:
97
The Combination Formula is derived from the Permutation Formula in that for a permutation every different order of the objects is counted even when the same objects are involved. This means that for r objects, there will be r! different order arrangements.
98
Permutation Combination So in order to get the number of different combinations, we must divide the number of permutations by r!. The result is the value we get for C(n, r) in the previous formula.
99
Permutations of Repeated Objects It is possible that in a group of objects some of the objects may be the same. In taking the permutation of this group of objects, different orders of the objects that are the same will not be different from one another.
100
In other words if we look at the group of letters in the word ADD and use D 1 to represent the first D, and D 2 to represent the second, we can then write the different permutations as AD 1 D 2, AD 2 D 1, D 1 AD 2, D 2 AD 1, D 1 D 2 A, and D 2 D 1 A.
101
But if we substitute the Ds back for the D 1 and D 2, then AD 1 D 2 and AD 2 D 1 both appear as ADD, and the six permutations become only three distinct permutations. Therefore we will need to divide the number of permutations by 2 to get the number of distinct permutations.
102
In permutations of larger groups of objects, the division becomes a little more complicated. To explain the process, let us look at the word WALLAWALLA. This word has 4 A’s, 4 L’s, and 2 W’s.
103
Consider that there are 10 locations for each of these letters. These 10 locations will be filled with 4 A’s, and since the A’s are all the same, the order in which we place the A’s will not matter. So if we are filling 10 locations with 4A’s the number of ways we can do this is C(10, 4). Remember
104
Once these 4 locations have been filled, there remain 6 locations to fill with the 4 L’s. These can be filled in C(6,4) ways, and the last 2 locations are filled with the W’s in C(2,2) ways.
105
Finally, we multiply these together to get
106
This leads to the general formula for permutations involving n objects with n 1 of one kind, n 2 of a second kind, …and n k of a kth kind. The number of permutations in this case is: where n=n 1 +n 2 +…n k.
107
Counting other choices sometimes requires a bit more reasoning to determine how many possibilities there are.
108
Suppose there are three cards that are each marked with a different letter, A, B, or C. If the cards are face down, and a person can pick one, two or all three of the cards, what is the possibility that the person will pick up the card with the letter A on it? ?
109
In this case there are three ways that one card can be picked. Out of these there is only one possibility of picking the A. First way Second way Third wayA is picked!
110
There are three ways of picking two cards. Out of these three pairs, there are two that will include the A. First way Second way Third wayA is picked!
111
There is only one way to pick all three cards, and of course, if all three cards are picked, the A will always be included. A is picked!
112
So there are a total of seven ways the cards can be picked if the person can pick one, two, or all three cards. Of these choices, four of them will include the A, so the probability that the A will be picked is: Total # of ways to pick the three cards Possibilities of picking the A card
113
When we want the probability of an event from a conditional distribution, we write P(B|A) and pronounce it “the probability of B given A has already occurred.” A probability that takes into account a given condition is called a conditional probability.
114
It Depends… To find the probability of the event B given the event A, we restrict our attention to the outcomes in A. We then find the fraction of those outcomes B that also occurred. Note: P(A) cannot equal 0, since we know that A has occurred.
115
The General Multiplication Rule When two events A and B are independent, we can use the multiplication rule for independent events: P(A and B) = P(A) x P(B) However, when our events are not independent, this earlier multiplication rule does not work. Thus, we need the General Multiplication Rule.
116
The General Multiplication Rule (cont.) We encountered the general multiplication rule in the form of conditional probability. Rearranging the equation in the definition for conditional probability, we get the General Multiplication Rule: For any two events A and B, P(A and B) = P(A) x P(B|A) or P(A and B) = P(B) x P(A|B)
117
Independence Independence of two events means that the outcome of one event does not influence the probability of the other. With our new notation for conditional probabilities, we can now formalize this definition: Events A and B are independent whenever P(B|A) = P(B). (Equivalently, events A and B are independent whenever P(A|B) = P(A).)
118
Independent ≠ Disjoint Disjoint events cannot be independent! Well, why not? Since we know that disjoint events have no outcomes in common, knowing that one occurred means the other didn’t. Thus, the probability of the second occurring changed based on our knowledge that the first occurred. It follows, then, that the two events are not independent. A common error is to treat disjoint events as if they were independent, and apply the Multiplication Rule for independent events—don’t make that mistake.
119
Depending on Independence It’s much easier to think about independent events than to deal with conditional probabilities. It seems that most people’s natural intuition for probabilities breaks down when it comes to conditional probabilities. Don’t fall into this trap: whenever you see probabilities multiplied together, stop and ask whether you think they are really independent.
120
Drawing Without Replacement Sampling without replacement means that once one individual is drawn it doesn’t go back into the pool. We often sample without replacement, which doesn’t matter too much when we are dealing with a large population. However, when drawing from a small population, we need to take note and adjust probabilities accordingly. Drawing without replacement is just another instance of working with conditional probabilities.
121
Reversing the Conditioning Reversing the conditioning of two events is rarely intuitive. Suppose we want to know P(A|B), but we know only P(A), P(B), and P(B|A). We also know P(A and B), since P(A and B) = P(A) x P(B|A) From this information, we can find P(A|B):
122
Reversing the Conditioning Reversing the conditioning of two events is rarely intuitive. Suppose we want to know P(A|B), but we know only P(A), P(B), and P(B|A). We also know P(A and B), since P(A and B) = P(A) x P(B|A) From this information, we can find P(A|B):
123
Reversing the Conditioning (cont.) When we reverse the probability from the conditional probability that you’re originally given, you are actually using Bayes’s Rule.
124
Bayes’s Theorem Adding up the parts of A in all the B’s Same Event
125
Bayes’s Theorem Using Contingency Table Fifty percent of borrowers repaid their loans. Out of those who repaid, 40% had a college degree. Ten percent of those who defaulted had a college degree. What is the probability that a randomly selected borrower who has a college degree will repay the loan?
126
Bayes’s Theorem Using Contingency Table Repay College 1.0.5.2.3.05.45.25.75 Total
127
Bayes’ Theorem Example A drilling company has estimated a 40% chance of striking oil for their new well. A detailed test has been scheduled for more information. Historically, 60% of successful wells have had detailed tests, and 20% of unsuccessful wells have had detailed tests. Given that this well has been scheduled for a detailed test, what is the probability that the well will be successful?
128
Let S = successful well U = unsuccessful well P(S) = 0.4, P(U) = 0.6 (prior probabilities) Define the detailed test event as D Conditional probabilities: P(D|S) = 0.6 P(D|U) = 0.2 Goal is to find P(S|D) Bayes’ Theorem Example (continued)
129
Bayes’ Theorem Example (continued) Apply Bayes’ Theorem: So the revised probability of success, given that this well has been scheduled for a detailed test, is 0.667
130
Given the detailed test, the revised probability of a successful well has risen to 0.667 from the original estimate of 0.4 Bayes’ Theorem Example Event Prior Prob. Conditional Prob. Joint Prob. Revised Prob. S (successful) 0.40.6(0.4)(0.6) = 0.240.24/0.36 = 0.667 U (unsuccessful) 0.60.2(0.6)(0.2) = 0.120.12/0.36 = 0.333 Sum = 0.36 (continued)
131
Counting Principles Sometimes determining probability depends on being able to count the number of possible events that can occur, for instance, suppose that a person at a dinner can choose from two different salads, five entrees, three drinks, and three desserts. How many different choices does this person have for choosing a complete dinner?
132
The Multiplication Principal for counting (which is similar to the Multiplication Principle for Probability) says that if an event consists of a sequence of choices, then the total number of choices is equal to the product of the numbers for each individual choice.
133
If c 1,c 2, c 3, …,c n, represent the number of choices that can be made for each option then the total number of choices is: c 1 c 2 c 3 … c n For our person at the dinner, the total number of choices would then be 2 5 3 3=90 different choices for combining salad, entrée, drink, and dessert.
134
Counting Rules Rules for counting the number of possible outcomes Counting Rule 1: –If any one of k different mutually exclusive and collectively exhaustive events can occur on each of n trials, the number of possible outcomes is equal to knkn
136
Counting Rules Counting Rule 2: –If there are k 1 events on the first trial, k 2 events on the second trial, … and k n events on the n th trial, the number of possible outcomes is –Example: You want to go to a park, eat at a restaurant, and see a movie. There are 3 parks, 4 restaurants, and 6 movie choices. How many different possible combinations are there? Answer: (3)(4)(6) = 72 different possibilities (k 1 )(k 2 )…(k n ) (continued)
137
Counting Rules Counting Rule 3: –The number of ways that n items can be arranged in order is –Example: Your restaurant has five menu choices for lunch. How many ways can you order them on your menu? Answer: 5! = (5)(4)(3)(2)(1) = 120 different possibilities n! = (n)(n – 1)…(1) (continued)
138
Permutations A permutation is an arrangement of objects where order is important. For instance the digits 1,2, and 3 can be arranged in six different orders --- 123, 132, 213, 231, 312, and 321. Hence, there are six permutations of the three digits. In fact there are six permutations of any three objects when all three objects are used.
139
In general the number of permutations can be derived from the Multiplication Principal. For three objects, there are three choices for selecting the first object. Then there are two choices for selecting the second object, and finally there is only one choice for the final object. This gives the number of permutations for three objects as 3 2 1=6.
140
Now suppose that we have 10 objects and wish to make arrangements by selecting only 3 of those objects. For the first object we have 10 choices. For the second we have 9 choices, and for the third we have 8 choices. So the number of permutations when using 3 objects out of a group of 10 objects is 10 9 8=720.
141
We can use this example to help derive the formula for computing the number of permutations of r objects chosen from n distinct objects r n. The notation for these permutations is and the formula is:
142
We often use factorial notation to rewrite this formula. Recall that: And Using this notation we can rewrite the Permutation Formula for as
143
Counting Rules Counting Rule 4: –Permutations: The number of ways of arranging X objects selected from n objects in order is –Example: Your restaurant has five menu choices, and three are selected for daily specials. How many different ways can the specials menu be ordered? Answer: different possibilities
144
It is important to remember that in using this formula to determine the number of permutations: 1. The n objects must be distinct 2. That once an object is used it cannot be repeated 3. That the order of objects is important.
145
Combinations A combination is an arrangement of objects in which order is not important. We arrange r objects from among n distinct objects where r n. We use the notation C(n, r) to represent this combination. The formula for C(n, r) is given by:
146
The Combination Formula is derived from the Permutation Formula in that for a permutation every different order of the objects is counted even when the same objects are involved. This means that for r objects, there will be r! different order arrangements.
147
Permutation Combination So in order to get the number of different combinations, we must divide the number of permutations by r!. The result is the value we get for C(n, r) in the previous formula.
148
Permutations of Repeated Objects It is possible that in a group of objects some of the objects may be the same. In taking the permutation of this group of objects, different orders of the objects that are the same will not be different from one another.
149
In other words if we look at the group of letters in the word ADD and use D 1 to represent the first D, and D 2 to represent the second, we can then write the different permutations as AD 1 D 2, AD 2 D 1, D 1 AD 2, D 2 AD 1, D 1 D 2 A, and D 2 D 1 A.
150
But if we substitute the Ds back for the D 1 and D 2, then AD 1 D 2 and AD 2 D 1 both appear as ADD, and the six permutations become only three distinct permutations. Therefore we will need to divide the number of permutations by 2 to get the number of distinct permutations.
151
In permutations of larger groups of objects, the division becomes a little more complicated. To explain the process, let us look at the word WALLAWALLA. This word has 4 A’s, 4 L’s, and 2 W’s.
152
Consider that there are 10 locations for each of these letters. These 10 locations will be filled with 4 A’s, and since the A’s are all the same, the order in which we place the A’s will not matter. So if we are filling 10 locations with 4A’s the number of ways we can do this is C(10, 4). Remember
153
Once these 4 locations have been filled, there remain 6 locations to fill with the 4 L’s. These can be filled in C(6,4) ways, and the last 2 locations are filled with the W’s in C(2,2) ways.
154
Finally, we multiply these together to get
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.