Post on 31-Dec-2015
description
transcript
Chapter 4
Probability Concepts
2
4.1 Events and Probability
Three Helpful Concepts in Understanding Probability: Experiment Sample Space Event
Experiment An activity for which the outcome is uncertain is an experiment.An activity for which the outcome is uncertain is an experiment. Example 4.1.1: Examples of experimentsExample 4.1.1: Examples of experiments
Flipping a coinFlipping a coin Rolling two diceRolling two dice Taking an examTaking an exam Observing the number of arrivals at a drive-up window over a 5-minute Observing the number of arrivals at a drive-up window over a 5-minute
periodperiod
3
4.1 Events and Probability (cont.)
Sample Space The list of all possible outcomes of an experiment is called the sample
space. Example 4.1.2: Example of sample space
Flipping a coin twice results in one of four possible outcomes. These possible outcomes are HH, HT, HT, TT. Therefore, sample space = {HH, HT, TH, TT}.
If there are n outcomes of an experiment, sample space lists all n outcomes.
4
4.1 Events and Probability (cont.)
Event An event consists of one or more possible outcomes of the experiment.An event consists of one or more possible outcomes of the experiment. It is usually denoted by a capital letter.It is usually denoted by a capital letter. Example 4.1.3: Examples of experiments and some corresponding Example 4.1.3: Examples of experiments and some corresponding
eventsevents Experiment:Experiment: Rolling two dice; Rolling two dice; events: Aevents: A = rolling a total of 7, = rolling a total of 7, BB = rolling a = rolling a
total greater than 8, total greater than 8, CC = rolling two 4s. = rolling two 4s. Experiment:Experiment: Taking an exam; Taking an exam; events: Aevents: A = pass, = pass, BB = fail. = fail. Experiment:Experiment: Observing the number of arrivals at a drive-up window over a Observing the number of arrivals at a drive-up window over a
5-minute period; 5-minute period; events: Aevents: A00 = no arrivals, = no arrivals, AA11 = seven arrivals, etc. = seven arrivals, etc.
5
4.1 Events and Probability (cont.)
Probability A numerical measure of the chance OR likelihood that a particular event
will occur. The probability that event A will occur is written P(A). The probability of any event ranges from 0 to 1, inclusive. P(A) = 0 means event A will never occur. P(A) = 1 means event A must occur.
6
4.1 Events and Probability (cont.)
How to come up with probability? Classical Definition of Probability
If event A occurs in m of the n outcomes in an experiment, then the probability that event A will occur is:
n
mAP )(
This assumes all n possible outcomes have an equal chance of occurring.This assumes all n possible outcomes have an equal chance of occurring. Example 4.1.4: Toss a nickel and a dime. The sample space (i.e., the list of the Example 4.1.4: Toss a nickel and a dime. The sample space (i.e., the list of the
possible outcomes) is {HH, HT, TH, TT}. If event possible outcomes) is {HH, HT, TH, TT}. If event AA is observing one head and is observing one head and one tail, then one tail, then m = 2m = 2 and and n = 4n = 4. So according to classical definition of probability, . So according to classical definition of probability, P(A) = m/n = 2/4 = 0.5P(A) = m/n = 2/4 = 0.5..
7
4.1 Events and Probability (cont.)
Relative Frequency Approach Observe an experiment n times and count the number of times event A occurs, m.Observe an experiment n times and count the number of times event A occurs, m.
n
mAP )(
Example 4.1.5: A production process has been in operation in for 250 days and Example 4.1.5: A production process has been in operation in for 250 days and has been accident-free for 220 days. If event has been accident-free for 220 days. If event A A is a randomly chosen accident-free is a randomly chosen accident-free day in the future, then, according to relative frequency approach, day in the future, then, according to relative frequency approach, P(A) = 220/250 P(A) = 220/250 = 0.88= 0.88..
Subjective ProbabilitySubjective Probability A measure (between 0 and 1) of your belief that a particular event will occur.A measure (between 0 and 1) of your belief that a particular event will occur. Example 4.1.6: Example of subjective probability: The probability that it will rain Example 4.1.6: Example of subjective probability: The probability that it will rain
today is 50%. today is 50%.
8
4.2 Basic Concepts
Contingency Table (also called Cross-Tab Table) Contingency tables are used to record and analyze the relationship between two
variables. Example 4.2.1: Datacomp Survey: Datacomp recently conducted a survey of 200
selected purchasers of their newly introduced laptop computer to obtain a gender-and-age profile of its new customers. The data are summarized in the following contingency table.
Age (Years)
< 3030 -
45 > 45
Sex (U) (B) (O) Total
Male (M) 60 20 40 120
Female (F) 40 30 10 80
Total 100 50 50 200Some Events:M = a male is selected B = the person selected is between 30 & 45F = a female is selected O = the person selected is over 45U = the person selected is under 30
9
4.2 Basic Concepts (cont.)
Contingency Table (also called Cross-Tab Table) Example 4.2.2: At a local University 75% of the Business faculty are
professors and 70% of the faculty are full time. 80% of the professors are full time. Suppose the faculties are randomly assigned to courses.
If you take a course in the Business School, what is the probability that you will get a Professor for the course?
What is the probability that a teacher selected at random is a Professor AND is Full Time?
What is the probability that a teacher chosen at random is Not a Professor OR is Not Full Time?
10
4.2 Basic Concepts (cont.)
Marginal Probability Marginal probability is the probability of one event, regardless of the
other events. Example 4.2.2: In Datacomp Survey, the marginal probabilities are:
P(M) = 120/200 = 0.6 P(F) = 80/200 = 0.4P(F) = 80/200 = 0.4 P(U) = 0.5P(U) = 0.5 P(B) = 0.25P(B) = 0.25 P(O) = 0.25P(O) = 0.25
11
4.2 Basic Concepts (cont.)
Complement of an eventComplement of an event The complement of an event A is the event that A does not occur.The complement of an event A is the event that A does not occur. This event is denoted by This event is denoted by AA.. For example, For example, AA = it rains tomorrow, = it rains tomorrow, AA = it does not rain tomorrow. = it does not rain tomorrow. Example 4.2.3: In Datacomp Survey:Example 4.2.3: In Datacomp Survey:
M = a male is selected. M = a male is not selected = a female is selected.
P(M) = 0.6, and so P(M) = P(F) = 0.4. P(A) + P(A) = 1 P(A) = 1 – P(A) P(A) = 1 – P(A)
12
4.2 Basic Concepts (cont.)
Joint Probability The probability of the occurrence of two events at the same timeThe probability of the occurrence of two events at the same time Example 4.2.4: In Datacomp Survey, what proportions are males Example 4.2.4: In Datacomp Survey, what proportions are males
between 30 and 45? That is, find the probability of selecting a person between 30 and 45? That is, find the probability of selecting a person who is a male and between 30 and 45.who is a male and between 30 and 45.
P(M and B) = 20/200 = 0.10P(M and B) = 20/200 = 0.10 Example 4.2.5: The probability of selecting a person who is a female Example 4.2.5: The probability of selecting a person who is a female
and under 30 is and under 30 is P(F and U) = 40/200 = 0.20P(F and U) = 40/200 = 0.20..
13
4.2 Basic Concepts (cont.)
Either of Two Events The probability of either event A or event B occurring is written as P(A The probability of either event A or event B occurring is written as P(A
or B).or B). Example 4.2.6: In Datacomp Survey, the probability of selecting a Example 4.2.6: In Datacomp Survey, the probability of selecting a
person who is male or under 30 is person who is male or under 30 is P(M or U) = (120 + 40) / 200 = 0.80P(M or U) = (120 + 40) / 200 = 0.80..
Conditional Probability Whenever you are given information and are asked to find a probability Whenever you are given information and are asked to find a probability
based on this information, the result is a conditional probability.based on this information, the result is a conditional probability. This probability is written as P(A|B) and read as “probability of A given This probability is written as P(A|B) and read as “probability of A given
B”.B”. Example 4.2.7: In Datacomp Survey, what is the probability that a Example 4.2.7: In Datacomp Survey, what is the probability that a
randomly selected customer is male given that he is under 30?randomly selected customer is male given that he is under 30?
P(M | U) = 60/100 = 0.60P(M | U) = 60/100 = 0.60..
14
4.2 Basic Concepts (cont.)
Independent Events Events A and B are independent if the probability of event A is
unaffected by the occurrence or nonoccurrence of event B. Events A and B are independent if and only if:
PP((A | BA | B) =) = P P((AA)) (assuming (assuming PP((BB) ≠ 0), or) ≠ 0), or PP((BB | | AA) = ) = PP(B)(B) (assuming (assuming PP((AA) ≠ 0), or) ≠ 0), or PP((AA and and BB) = ) = PP((AA) • ) • PP((BB))
Example 4.2.8: In Datacomp Survey, are events M and U independent?Example 4.2.8: In Datacomp Survey, are events M and U independent? P(M) = 120/200 = 0.6, P(M | U) = 60/100 = 0.6, so they are independent.P(M) = 120/200 = 0.6, P(M | U) = 60/100 = 0.6, so they are independent. P(U) = 100/200 = 0.5, P(U | M) = 60/120 = 0.5, so they are independent.P(U) = 100/200 = 0.5, P(U | M) = 60/120 = 0.5, so they are independent. P(M and U) = 60/200 = 0.3, P(M) P(M and U) = 60/200 = 0.3, P(M) •• P(U) = 0.6 P(U) = 0.6 • • 0.5 = 0.3, so they are 0.5 = 0.3, so they are
independent.independent.
15
4.2 Basic Concepts (cont.)
Dependent Events Events that are not independent are Events that are not independent are dependentdependent events. events. PP((A | BA | B) =) = PP((AA and and BB)) /P /P((BB)) PP((B | AB | A) =) = PP((AA and and BB)) /P /P(A)(A) PP((AA and and BB) = ) = PP(A | B) • (A | B) • PP((BB) = ) = PP(B | A) • (B | A) • PP((AA))
16
4.2 Basic Concepts (cont.)
Mutually Exclusive Events If an event can not occur when another event has occurred the two If an event can not occur when another event has occurred the two
events are said to be mutually exclusive.events are said to be mutually exclusive. Events A and B are mutually exclusive if their joint probability is zero, Events A and B are mutually exclusive if their joint probability is zero,
that is, P(A and B) = 0.that is, P(A and B) = 0. PP((AA or or BB) = ) = PP(A) + (A) + PP((BB)) Example 4.2.9: Consider an experiment of randomly selecting a card fro Example 4.2.9: Consider an experiment of randomly selecting a card fro
a deck of 52 cards. Is the event of selecting a queen mutually exclusive a deck of 52 cards. Is the event of selecting a queen mutually exclusive from the event of selecting a heart? from the event of selecting a heart? No. Why?No. Why?
Non-mutually Exclusive EventsNon-mutually Exclusive Events P(A and B) P(A and B) ≠≠ 0. 0. PP((AA or or BB) = ) = PP(A) + (A) + PP((BB) - ) - PP((AA and and BB))..
17
4.3 Going Beyond the Contingency Table
Venn Diagram In Venn diagram, a rectangle represents all possible outcomes of an
experiment. Event are shown in the rectangle as circles. The probability of an event occurring is its corresponding area in the
Venn diagram.
AA BB
Venn diagram for events A and B.The rectangle represents all
possible outcomes of an experiment
AA
0.60.6
AA0.40.4
Venn diagram for P(A) = 0.4.
18
4.3 Going Beyond the Contingency Table (cont.)
AABB
AABB
AABB
Venn diagram for P(A and B).The points in the shaded area are in A and B
Venn diagram for P(A or B).The points in the shaded area are in A or B
Venn diagram of mutually exclusive events.P(A and B) = 0 and P(A or B) = P(A) + P(B).
19
4.3 Going Beyond the Contingency Table (cont.)
Probability Rules General Additive Rule
PP((AA or or BB) =) = P P((AA) +) + P P((BB) -) - P P((AA and and BB)) Special Additive RuleSpecial Additive Rule
If A and B are mutually exclusive then PIf A and B are mutually exclusive then P((AA or or BB) =) = P P((AA) +) + P P((BB)) Example 4.3.1: In Datacomp Survey, what is the probability of selecting Example 4.3.1: In Datacomp Survey, what is the probability of selecting
a person who is male or under 30? That is, find a person who is male or under 30? That is, find P(M or U).P(M or U). P(M or U) = P(M) + P(U) – P(M and U) = 120/200 + 100/200 – P(M or U) = P(M) + P(U) – P(M and U) = 120/200 + 100/200 – 60/20060/200
= 0.80= 0.80 Example 4.3.2: The probability of event A is 0.5 and the probability of Example 4.3.2: The probability of event A is 0.5 and the probability of
event B is 0.2. If P(A and B) is 0.1, what is P(A or B)?event B is 0.2. If P(A and B) is 0.1, what is P(A or B)?P(A or B) = P(A) + P(B) – P(A and B) = 0.5 + 0.2 – 0.1 = 0.6P(A or B) = P(A) + P(B) – P(A and B) = 0.5 + 0.2 – 0.1 = 0.6
Example 4.3.3: In Datacomp Survey, find P(M or F).Example 4.3.3: In Datacomp Survey, find P(M or F).P(M or F) = P(M) + P(F) – P(M and F) = 120/200 + 80/200 – 0/200P(M or F) = P(M) + P(F) – P(M and F) = 120/200 + 80/200 – 0/200
= 0.6 + 0.4 – 0 = 0.6 + 0.4 = P(M) + P(F) = 1.0= 0.6 + 0.4 – 0 = 0.6 + 0.4 = P(M) + P(F) = 1.0
20
4.3 Going Beyond the Contingency Table (cont.)
General Conditional Probability Rule
0P(A) assuming )(
) and ()|(
and ,0P(B) assuming )(
) and ()|(
AP
BAPABP
BP
BAPBAP
Special Conditional Probability Rule
If events A and B are independent then:If events A and B are independent then:
)()|(
and ),()|(
BPABP
APBAP
21
4.3 Going Beyond the Contingency Table (cont.)
Example 4.3.4: If P(A and B) = 0.4 and P(B) = 0.8, find P(A|B).
5.08.0
4.0
)(
) and ()|(
BP
BAPBAP
Example 4.3.5: If P(A) = 0.3 and P(B) = 0.4, and P(A and B) = 0.2, are events A and B statistically independent? Use conditional probability rules.
)(67.03.0
2.0
)(
) and ()|(
)(5.04.0
2.0
)(
) and ()|(
BPAP
BAPABP
APBP
BAPBAP
Events A and B are not independent.
22
4.3 Going Beyond the Contingency Table (cont.)
Multiplicative Rule
)()|()()|() and ( APABPBPBAPBAP
Special Multiplicative Rule
If events A and B are independent then:If events A and B are independent then: )()() and ( BPAPBAP
Example 4.3.6: Let P(A) = 0.6, P(B) = 0.2, and P(A|B) = 0.1. Find P(A and B)
02.02.01.0)()|() and ( BPBAPBAP
23
4.3 Going Beyond the Contingency Table (cont.)
Sampling Without Replacement Assume that you select a card from a deck, examine it, and then discard
it. You then select another card. This procedure is called sampling without replacement.
Example 4.3.7: Let A = selecting a king on the first draw, and B = selecting a king on the second draw. What is the probability of drawing two kings [P(A and B)]?
If you select a king on the first draw, then, of the 51 cards remaining, three are kings. So, P(A) = 4/52 and P(B|A) = 3/51. P(A and B) = (4/52)(3/51) = 0.0045.
24
4.3 Going Beyond the Contingency Table (cont.)
Sampling With Replacement Assume that you select a card from a deck and replace it before selecting
the second card. This procedure is called sampling with replacement. Example 4.3.8: Let A = selecting a king on the first draw, and B =
selecting a king on the second draw. What is P(B|A)?
There are still 52 cards in the deck. So, P(B|A) = 4/52.
Using Excel to Construct a Contingency Table KPK Data Analysis > Qualitative Data Charts > Contingency Table.
25
4.4 Tree Diagrams
A tree diagram shows all possible outcomes of an experiment and the probabilities of each.
A general form of a tree diagram is:
B
B
B
E1
E2
En
...
Example 4.4.1: Draw a tree diagram for the Datacomp Survey data.
26
4.4 Tree Diagrams (cont.)
Rules for Tree Diagram Rule # 1: The probability of the event on the right side (say, event B) of The probability of the event on the right side (say, event B) of
the tree is equal to the sum of the paths; that is, all probabilities along a the tree is equal to the sum of the paths; that is, all probabilities along a path leading to event B are multiplied, and then summed over all paths path leading to event B are multiplied, and then summed over all paths leading to B.leading to B.
Rule # 2:Rule # 2: The posterior probability for the iThe posterior probability for the ithth path is: path is:
1. # Rule using found is paths" of sum" thewhere,
paths of sum
pathth -i)|( BEP i
27
4.4 Tree Diagrams (cont.)
Example 4.4.2: Zetadyne Corporation
50%50% of components produced of components produced on shift 1on shift 1
20%20% of components produced of components produced on shift 2on shift 2
30%30% of components produced of components produced on shift 3on shift 3
6%6% of the components of the components produced on shift 1 are produced on shift 1 are defectivedefective
8%8% of the components of the components produced on shift 2 are produced on shift 2 are defectivedefective
15%15% of the components of the components produced on shift 3 are produced on shift 3 are defectivedefective
Defective
Shift1
2
Defective
Defective
3
(.06)
(.08)
(.15)
(.5)
(.2)
(.3)
28
4.4 Tree Diagrams (cont.)
Solution 1 – What percentage of the components are defective?
P(Defective) = sum of paths= (.5)(.06) + (.2)(.08) + (.3)(.15)= .030 + .016 + .045= .091
Solution 2 – Given that a defective component is found, what is the probability that it was produced during shift 3?
P(shift 3 | defective) =
=
= = .495
third pathsum of paths
(.3)(.15).091
(.045).091