1 – Simulation

advertisement
Chapter 6
Probability – using known facts about a population to reason out what might occur when a sample is
selected from the population – branch of mathematics that describes the pattern of chance outcomes
Three methods used to calculate the probability of an event occurring:
1) Observe the random phenomenon many times and calculate the relative frequency of results
2) Develop a probability model and calculate theoretical answer
3) Develop a plan for imitating – or simulating – repetitions of the event
Option 1: slow, costly, impractical, logistically difficult
Option 2: must know rules of probability
Option 3: many repetitions quickly, reasonably accurate
§1 – Simulation – the imitation of chance behavior, based on a model that accurately reflects the
situation
**may use die, cards, different colored beads, slips of paper, random number table or random number
generator on calculator, computer software
Simulation Mechanics:
1. State the problem or describe the variable of interest.
2. Assign digits to represent the outcomes – must establish a correspondence between random
numbers and possible outcomes. Give a stopping rule.
3. Simulate many repetitions.
4. State your conclusions – note what is to be counted (what is the purpose of the simulation), and give
the count if requested. DO NOT say “proves” or “definitely true” – say “sufficient evidence to
support” your claim
Def: Each time we obtain a simulated answer to our question, this is called a trial.
Two scenarios:
1) Set number of trials – may be equal or unequal probabilities such as 50/50 or 60/40
2) “Wait-time” – rather than set number of trials, the simulation continues until a certain condition is met
The idea that the relative frequency of an event will converge on the probability of the event, as the
number of trials increases, is called the law of large numbers.
§2 and §3
Definition: Two events are mutually exclusive (disjoint) if they have no outcomes in common and can
never occur together.
All the Probability Laws in the World (that you need to know)
1. For any event E , 0  P ( E )  1
2. Given a sample space S , P( S )  1
3. The probability of an event A , when outcomes are equally likely:
P( A) 
4. Complement:
5.
number of outcomes in A (successes)
total possible number of outcomes in sample space
𝑃(𝐴𝑐 ) = 1 − 𝑃(𝐴)
or
𝑃(𝐴) + 𝑃(𝐴𝑐 ) = 1
Addition Rule (“or”)
𝑃(𝐴 𝑜𝑟 𝐵) = 𝑃(𝐴) + 𝑃(𝐵) − 𝑃(𝐴 𝑎𝑛𝑑 𝐵)
𝑃(𝐴 ∪ 𝐵) = 𝑃(𝐴) + 𝑃(𝐵) − 𝑃(𝐴 ∩ 𝐵)
Example: From a deck of 52 cards, a card is randomly selected. What is the probability that the card is
either an ace or a spade?
If 𝐴 and 𝐵 are mutually exclusive, then 𝑷(𝑨 ∪ 𝑩) = 𝑷(𝑨) + 𝑷(𝑩) because 𝑃(𝐴 ∩ 𝐵) = 0
Example: From a deck of 52 cards, a card is randomly selected. What is the probability that the card is
either an ace or a king?
6.
Multiplication Rule (“and”)
𝑃(𝐴 ∩ 𝐵) = 𝑃(𝐴) ∙ 𝑃(𝐵|𝐴)
Example: From a deck of 52 cards, a card is drawn at random and without replacement, a second card is
drawn. What is the probability of drawing an ace first and a king second?
If 𝐴 and 𝐵 are independent, then 𝑃(𝐴 ∩ 𝐵) = 𝑃(𝐴) ∙ 𝑃(𝐵)
Example: If the card is replaced, what is the probability of drawing an ace first and a king second?
Conditional Probability: 𝑃(𝐵|𝐴) is the probability of the occurrence of an event 𝐵 given that
an event 𝐴 has already occurred.
The Formula:
P( B | A) 
P( A  B)
P( A)

P( A  B)  P( A)  P( B | A)
This formula makes perfect sense because it means that if we know event A must occur, then the sample
space for event A becomes “the set of all possible outcomes” (the denominator). Then “success” (the
numerator”) is defined as the times when both A and B occur together.
Example: Two psychologists surveyed 478 children in grades 4, 5, and 6 in elementary schools in
Michigan. They stratified their sample, drawing roughly 1/3 from rural, 1/3 from suburban, and 1/3 from
urban schools. Among other questions, they asked the students whether their primary goal was to get
good grades, to be popular, or to be good at sports. One question of interest was whether boys and girls
at this age had similar goals. Here is a two-way contingency table giving counts of the students by their
goals and sex:
1. If we select a student at random from this study, what is the probability that we select a girl?
2. What is the probability of selecting a girl whose goal is to be popular?
3. What is the probability of selecting a student whose goal is to excel at sports?
4. What is the probability that a selected student wants to excel at sports given that we have selected a
girl?
5. What is the probability that we have selected a girl given that the selected student’s goal is popularity?
Independent Events: Two or more successive events are independent if the probability of
occurrence of one event does not affect the probability of later events. Otherwise they are
dependent (related).
The Formula:
𝑃(𝐵) = 𝑃(𝐵|𝐴) = 𝑃(𝐵|𝐴𝑐 )
The Connection to Conditional Probability: If two events are independent, then the conditional
probability of an event B is the same as the unconditional probability of event B.
Example: A survey of college students found that 56% live in a campus residence hall, 62% participate
in a campus meal program, and 42% do both.
1) Based on a Venn diagram, what is the probability that a randomly selected student
a) lives off campus and doesn’t have a meal plan?
b) lives in a residence hall but doesn’t have a meal plan?
2) While dining in a campus facility open only to students with meal plans, you meet someone
interesting. What is the probability that your new acquaintance lives on campus?
3) Are living on campus and having a meal plan independent? Are they disjoint (mutually exclusive)?
The connection between mutually exclusive and independent
If two events are mutually exclusive then they cannot both happen at the same time. That means that as
soon as one event happens the other cannot – the probability of the other changes to 0. When the
occurrence of one event changes the probability of the other, the events are not independent. Therefore
events that are mutually exclusive can never be independent, because if one event happens, the other
event is guaranteed not to happen. Similarly, if two events are independent then they cannot be mutually
exclusive.
Question: In order for two events to be independent, would we need to draw with replacement or
without replacement?
**What might be confusing, however, is the fact that events that are not mutually exclusive may or may
not be independent.
Example) Let event A = taking a math class and let event B = taking a science class. Then A AND B =
taking a math class and a science class. Suppose P(A)=0.6, P(B)=0.5, and P(A ∩ B)=0.3. Are A and B
independent?
Example) In a particular college class, 60% of the students are female. 50% of all students in the class
have long hair. 45% of the students are female and have long hair. Of the female students, 75% have
long hair. Let A be the event that the student is female and let B be the event that the student has long
hair. One student is picked randomly. Are the events of being female and having long hair independent?
1. If P(A) = 0.24 and P(B) = 0.52 and A and B are independent, what is P(A or B)?
(a) 0.1248
(b) 0.28
(c) 0.6352
(d) 0.76
(e) The answer cannot be determined from the information given.
2. Which of the following best describes the relationship between the properties “independence” and
“mutually exclusive” given that A and B are two events defined on the same sample space and that
P(A)>0 and P(B)>0?
(a) If A and B are mutually exclusive, then they are dependent events.
(b) If A and B have common elements, then they are mutually exclusive.
(c) If A and B are independent, then they are mutually exclusive.
(d) If A and B are not mutually exclusive, then they must be dependent events.
(e) If A and B are dependent, then they must be mutually exclusive.
Download