Download Week3_Lecture 1_post

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Inductive probability wikipedia , lookup

Birthday problem wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Ch 14 Randomness and
Probability
 We’ll begin a new part: randomness and probability.
 This part contain 4 chapters: 14-17.
 Why we need to learn this part?
 Probability is not a portion of statistics. Instead it’s a branch of
mathematics
 Later when we are going to develop the advanced statistical
techniques, we need to employ the knowledge of probability
 In chapter 14, we’ll discuss
 random phenomenon
 Probabilities
 Rules for probability
Term 1: Random Phenomenon
 A phenomenon is random if we know what outcomes could happen,
but not which particular outcomes will happen.
 Let’s try the following example together:
Questions: Can you identify which of the following are random?
1. Toss a coin
2. Is it going to rain on Jun 28th ,2013?
3. Date of the final exam of this course
We are mainly interested in the random phenomenon when we are
learning the probability part.
The probability provides a numerical measure of the randomness.
Term 2: Several Definitions
Term
Definition
Example
Trial
In general, each occasion upon which
we observe a random phenomenon is
called a trial.
Rolling a fair dice once
and record the number
on top
Outcome
At each trial, we record the value of
the random phenomenon, and call
that the trial’s outcome.
Could be any number
among 1,2,3,4,5 and 6
Event
An event is a combination of
outcomes (denoted as A, B…)
We say an event happens if any
outcome of this event occurs.
Let event A={get a
number greater than
3}={4, 5,6}, is the
combination of the
outcome {4} ,{5} and {6}
Sample
Space
Sample space is the collection of all
possible outcomes, denoted by S
S={1, 2, 3, 4, 5, 6}
as the collection of all
possible outcomes
Term 2: Several Definitions
 Example: Suppose we are going to toss two fair coins (one 1 cent
coin, one 1 quarter coin) at the same time and record the patterns
on top.
1)
2)
Please identify the trial, outcome and the sample space
Term
Answer
Trial
Toss two fair coins at the same time for once and
record the top patterns.
Outcome
Any one result among the followings:
Both heads, both tails, 1 cent head and 1 quarter
tail, and 1 cent tail and 1 quarter head.
Sample Space
S={HH,TT,HT,TH}
Try to express the event A={we get two different patterns}
A={ HT , TH}
Term 2: Several Definitions
 Example: Please identify the sample space for the following trials
 1) Toss a coin repeatedly; record the number of the tosses you





have done until you get the first head
S=
2) Toss a coin 10 times; record the number of heads.
S=
3) Roll two dice at the same time; record the sum of two
numbers.
S=
Term 3: Modeling Probability
 The probability, like the chance, is a numerical measurement
of the likelihood of the random phenomenon
 Unlike the chance which is mostly expressed by percentages,
the probability is mostly expressed in decimal-place form.
Fro example, we write 50% chance in the probability form as
0.5
 We denote P(event) for the probability of a particular event.
Term 3: Modeling Probability
Let’s start with something simple.
Consider the following trials:
Flip a fair coin, record the pattern on top
S={H, T}
2) Toss a fair die, record the number on top
S={1, 2, 3, 4, 5, 6}
 The common place between the two events is:
All possible outcomes are equally likely to happen.
Example: Are the outcomes equally likely to happen in the
following trial?
1) Choose a card from a complete deck with 52 cards and record
its color.
2) Toss two fair coins at the same time, and record the number of
heads we get.
1)
Term 3: Modeling Probability
 When outcomes are equally likely to happen, the probability that
any single outcome happens is easy to compute-it is just one
divided by the total number of possible outcomes.
For example,
1) The probability of getting a head with a fair coin is ½=0.5
2) The probability of rolling a 3 with a fair die is 1/6.
 For the event A that are made up of several equally likely
outcomes,
# outcomes in A
P ( A) =
# all possible outcomes
For example,
The probability of rolling an odd number with a fair die is 3/6=0.5
since # of outcomes in rolling an odd number is 3 (i.e. {1,3,5}) and #
of all possible outcomes is 6 (i.e. {1,2,3,4,5,6})
Term 3:Modeling Probability
 Example: Drawing one card from a well-shuffled deck with 52
cards.
Q1:What is the probability of picking a face card (JQK)?
Q2: What is the probability of picking a heart?
Q3: What is the probability of picking a seven?
Q4: What is the probability of picking a black card?
Term 3:Modeling Probability
 Caution:
# outcomes in A
P
(
A
)
=
The formula
# all possible outcomes can only be used when the
outcomes are equally likely to happen.
Example: Suppose we toss two fair coins together and record the
number of heads we can get on top. What is the probability that we
get at least one head? Here is a student’s work:
Sample space={0 heads, 1 head, 2 heads}
# of all possible outcomes=3
Event={at least 1 head} ={1 head, 2 heads} # of outcomes in event =2
So P(at least 1 head)=2/3.
Question: Is this correct?
Actually, it’s wrong! Because the outcomes in the sample space are
not equally likely to happen.
P(0 heads)= ¼=0.25, P(1 head)=2/4=0.5, P(2 heads)=1/4=0.25
So P(at least one head)= ¾=0.75
Term 3:Modeling Probability
 Venn diagram is the most commonly used diagram to describe
the events.
 The way we connect the probabilities with the Venn diagram is
to treat the area as the corresponding probability.
For example, in the Venn diagram above,
The area of the “Event A” circle corresponds to P(A)
 When we solve the probability problems, it’s always a good
idea to draw a Venn diagram first.
Term 5 Probability rules (Part I)
 Rule#1
A probability is a number between 0 and 1
 For any event A, 0<=P(A)<=1
 Rule#2 Probability Assignment Rule:
The set of all possible outcomes of a trial must have
probability 1:
P( S ) = 1
Venn
diagram
Term 5 Probability rules (Part I)
 Example:
For a given kind of lottery, there are 3 levels of awards: 100
dollars, 10 dollars and 1 dollar. Which of the following
probability assignments is possible?
Award
$100
$10
$1
(a)
0.15
0.50
0.10
(b)
-0.1
0.5
0.6
(c)
0.5
0.5
0.5
(d)
0.1
0.2
0.7
Term 5 Probability rules (Part I)
 Rule#3 Complement Rule:
 The set of outcomes that are not in the event A is called
the compliment of A, and is denoted by AC
For example,
1) when we toss a coin, let event A={ H
}, then AC ={T}
2) when we toss a die, let event A= {
getting a number bigger than 3 },
then AC ={ getting a number smaller
than or equal to 3} = {1,2,3}
 The probability of an event occurring is 1 minus the
probability that it doesn’t occur.
P( A) = 1 − P( AC )
Term 5 Probability rules (Part I)
 Rule#3 Complement Rule:
Example: During the product testing, the inspector
observed that 10% of the products are defective.
Question: What is the probability that a randomly chosen
product is not defective?
Solution: P(not defective)=P(defectiveC)
By the complement rule,
P(defectiveC)=1-P(defective)=1-0.10=0.90
Term 5 Probability rules (Part I)
 The operations for two events A and B
Operation
Interpretation
A or B
1) For event A and B, at least one of
these two events happens.
2) On the Venn diagram, it’s the
union of Circle A and Circle B
3) The set of its outcomes is the
union of two sets of outcomes of
event A and B
1) For event A and B, both of them
happen at the same time.
2) On the Venn diagram, it’s the
intersection of Circle A and Circle B
3) The set of its outcomes is the
intersection of two sets of
outcomes of event A and B
A and B
Venn Diagram
Term 5 Probability rules (Part I)
 The operations for two events A and B
Example: Suppose we toss a fair dice and record the number
on its top. Denote two events:
event A={get an odd number} and
event B={get a number bigger than 3}
Question: Please identify the set of the
outcomes of
a) A and B
Answer: A and B= { 5 }
b) A or B
Answer: A or B={ 1, 3, 4, 5, 6}
Term 5 Probability rules (Part I)
 Rule#4 Addition Rule:
 We say two events are disjoint (or mutually exclusive) if
they have no outcomes in common.
 In other words, two disjoint events can’t happen together
at the same time.
A
B
Two disjoint sets, A and B
Q: When we toss a fair dice,
which of the following events are
disjoint?
1) A={ get an odd number}
B={get an even number}
2) A= {get an odd number}
B={get a number bigger than 3}
 Provided that A and B are disjoint,
P( AorB) = P( A) + P( B)
Term 5 Probability rules (Part I)
 Rule#4 Addition Rule:
Example: Suppose at an intersection, we will meet a green
light with a chance of 35% and a yellow light with a chance
of 50%.
Question: What is the probability that we will meet a greed
light or a yellow light?
Solution:
P(green)=0.35 P(yellow)=0.50
and {meet a green light} and {meet a yellow light} are
disjoint.
By the addition rule,
P(green or yellow)= P(green)+P(yellow)=0.35+0.50=0.85
Review of Chapter 14
 In this chapter, we learned
 Random Phenomenon
(Definition of trail, outcome, event, sample space)
 Modeling Probability

What is probability?

How to calculate probability when outcomes are equally likely to happen?
P( A) =
Venn diagram

Some Probability rules
(To be reviewed in detail)

# outcomes in A
# all possible outcomes
Review of Probability Rules in Chapter 14
 Rule #1: A probability is a number between 0 and 1.
 Rule #2(Probability Assignment Rule): The set of all possible outcomes of
a trail must have probability 1.
P( S ) = 1
 Rule #3(Complement Rule):The probability of an event occurring is 1
minus the probability that it doesn’t occur.
P( A) = 1 − P( AC )
 The operations for two events A and B.
A or B: Union of two sets of outcomes of event
 A and B: Intersection of two sets

 Rule #4: Additional Rule.
If A and B are disjoint, P(A or B)=P(A)+P(B)
 Rule #5: Multiplication Rule. (next)
Term 5 Probability rules (Part I)
 Rule#5 Multiplication Rule:
 We say two events are independent intuitively if the
occurrence of one event doesn’t affect the probability that
the other event happens.
 Disjoint ≠ Independent because:
1) If two events are independent with each other, then
they still can happen together at the same time. So
two independent events can never be disjoint!
2) If two events are disjoint with each other, then one
event happens will directly eliminate the possibility
that the other event can happen. So two disjoint
events can never be independent!
Term 5 Probability rules (Part I)
 Rule#5 Multiplication Rule:
 Disjoint ≠ Independent
Example: Suppose we toss two fairs coins one-by-one. For
the following two pairs of events, please identify which
pair is disjoint and which pair is independent.
a) A={first coin is a head} B={First coin is a tail}
Answer: A and B are disjoint since they can’t happen
together at the same time.
b) A={first coin is a head}
B={Second coin is a tail}
Answer: A and B are independent since the occurrence of
event A doesn’t affect the probability that B happens. We
toss the two coins one-by-one (independent tosses).
Term 5 Probability rules (Part I)
 Rule#5 Multiplication Rule:
Come back to the Multiplication Rule
Provided that A and B are independent ,
P( A
and
B) = P( A) × P( B)
Example: (Continue with the light problem)
Suppose at an intersection, we will meet a green light with a
chance of 35% and a yellow light with a chance of 50%.
Question: What is the probability of meeting a green light on
Monday and Tuesday?
Solution: Denote A={green on Mon} B={green on Tue}
Then A and B are independent with each other.
By Multiplication rule,
P(green on Mon and Tue)= P(A and
B)=P(A)×P(B)=0.352=0.1225
Term 5 Probability rules (Part I)
Finally, let’s learn how to apply all the rules under a complex
situation
Example: The Masterfoods company said yellow candies made
up 20% of their plain M&M, red another 20%, and orange, blue,
and green each made up 10%. The rest were brown
a)If you pick an M&M at random, what is the probability that
1) it is brown?
2) It is yellow or orange?
3) It is not green?
4) It is red and green?
b)If you pick two M&M’s in a row independently, what is the probability that
1) They are all brown?
2) The second one is the first one that’s red?
3) None are yellow?
4) at least one green?
Ch15 Probability Rules
 In this chapter, we are going to expand the
discussion in Ch14





General Addition Rule
Conditional Probability
General Multiplication Rule
Redefine the Independence
Tree diagram
Term 1 : General Addition Rule
 Review of addition rule
P(A or B)= P(A) + P(B), provided that A and B
are disjoint.
A
B
Term 1 : General Addition Rule
 Let’s look at the following example.
A survey of college students found that 56% live in a
campus residence hall, 62% participate in a campus
meal program.
Q: What’s the probability that a randomly selected
student either lives or eats on campus?
Is it safe to say : P(live or
eat)=P(live)+P(eat)=0.56+0.62=1.18?
No, we are missing the condition “disjoint”!
Term 1 : General Addition Rule
 If the two events are not disjoint, how to find
P(A or B) ?
Q: Is it still true that
P( A or B) =P(A) +P(B)?
The Answer is : NO!. If you simply add P(A) and P(B)
together, we add the intersection part P(A and B)
twice!
Term 1 : General Addition Rule
 To fix this problem, we just need to subtract one
P(A and B) from the sum. This gives us the General
Addition Rule
For any two events A and B,
P( A or B) = P(A) +P(B)-P(A and B)
Term 1 : General Addition Rule
 Continue with the previous 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.
Q: What’s the probability that a randomly selected
student either lives or eats on campus?
Notation: L={live on campus} M={has a meal plan}
P(L)=0.56 P(M)=0.62 P(L and M)=0.42
Term 1 : General Addition Rule
Solution:
Draw a Venn diagram first.
With the info:
P(L)=0.56 P(M)=0.62 and
P(L and M)=0.42
By the General Addition Rule:
P(a student either live or eat on campus)
=P(L or M)= P(L)+P(M)-P(L and M)
=0.56+0.62-0.42=0.76
Term 1 : General Addition Rule
• Comparison between the addition rule and the
general addition rule
 Addition Rule
P(A or B)= P(A) +P(B), provided
events A and B are disjoint
 General Addition Rule
P(A or B)= P(A) +P(B)-P(A and B),
for any two events A and B
1) Just like their names, the general addition rule is
a generalization of the addition rule
i.e. when A and B are disjoint, we have
P(A and B) = 0 
P(A or B)= P(A)+P(B)-P(A and B)=P(A)+P(B)
1) To use the addition rule, we always have to
check the disjoint condition first. But for the
general addition rule, we don’t need to check
Term 2: Advanced Use of Venn Diagram
•
Suppose we have two events A and B now, and their
relationship is displayed by using the following Venn
Diagram
•
So far, we have learned the following interpretations:
Term 2: Advanced Use of Venn Diagram
Next, let’s look at some new interpretations from the
Venn Diagrams
Example (Continue) :
•
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. P(L)=0.56 P(M)=0.62 P(L and M)=0.42
Q1: What is the probability that a randomly selected student
lives on campus but has no meal plan?
Solution:
P(L and MC)
=P(L) – P(L and M)
=0.56-0.42=0.14
Term 2: Advanced Use of Venn Diagram
Example (Continue) :
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. P(L)=0.56 P(M)=0.62 P(L and M)=0.42
Q2: What is the probability that a randomly selected student
has a meal plan but lives off campus?
Solution:
P(M and LC)
=P(M) – P(L and M)
=0.62-0.42=0.20
Term 2: Advanced Use of Venn Diagram
Example (Continue) :
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. P(L)=0.56 P(M)=0.62 P(L and M)=0.42
Q3: What is the probability that a randomly selected student
neither has a meal plan nor lives on campus?
Solution:
P(MC and LC)
=1-P(M or L) =1-(0.56+0.62-0.42)
=1-0.76=0.24
Term 2: Advanced Use of Venn Diagram
Example (Continue) :
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. P(L)=0.56 P(M)=0.62 P(L and M)=0.42
Q4: What is the probability that a randomly selected student
either has a meal plan or lives on campus, but doesn’t own
both?
Solution:
P(L or M)-P(L and M)
=P(L)+P(M)-P(L and M)-P(L and M)
=P(L)+P(M)-2*P(L and M)
=0.56+0.62-2*0.42=0.34
Or P(L and MC) + P(M and LC)=0.14+0.20=0.34 Same!