qt1 - 04 - probability
TRANSCRIPT
Introduction to Probability
Probability Theory
QUANTTECHINTEUQIASEVIT10S
Contents
Probability
Classical
Relative
Subjective
Marginal Probability
Joint Probability
Exclusive Events
Independent Events
Dependent Events
Bayes Theorem
Probability : Basic Terminology
Event
One or more of the possible outcomes of doing something
Toss a coin
Getting head
Getting tail
Person enters a mall
Person is male
Person is a student
Pick a carton of candies at a store
Candy is Amul
Candy is spoilt
Experiment
An activity that produces or causes an event is referred to as an experiment
Tossing a coin is an experiment.
Tossing three coins in a row is an experiment
Choosing a person at the entrance of a mall door and asking questions is an experiment
Pick a carton of candies at a store
Probability : Basic Terminology
Mutually Exclusive Events
Only one of the events can take place at a time
Either Head or Tail
Either Man or Woman
Non Exclusive Events
Both or more can take place
Person is male
Person is student
Collectively Exhaustive List
List of events that between them consider all cases
Toss of coin : Head or Tail nothing else is possible
Choice of cold drink
Coke
Pepsi
Anything else
Classical Probability
Probability of an event is defined as
[ number of outcomes where event occurs ]
[ total number of possible outcomes ]
Experiment of tossing a single coin
P(Head) = 1 / 2 = 0.5
Experiment of rolling a dice
P(getting 6) = 1 / 6 = 0.167
Experiment of choosing a person at the mall
P(Person is male ) = 0.5 [ unless we know more ]
P(Person is a student ) = not known as yet
Problem withClassicalProbability
State Space
All Possible Outcomes
HTHHHTTHTTHHHHHTHTTTHHHTHTHTTTHTTTEvent A : Head
Event B : Tail
Event A : Identical Reading
Event B : Different Reading
Event A : Three Heads
Event B : Two Heads
Event C : Anything Else
One CoinTossed
Two CoinsTossed
Three CoinsTossed
Probability is NOT certainty !
HTTTTTHTTH
P(H) = 0.5Probabilityof getting H = 0.5
HHTTTHHHTH
TTTTTHHTTT
THHHTHHTHT
HHHHHTHHHT
3/10
3/10
6/10
9/20
2/10
11/30
6/10
17/40
8/10
25/50
TTHHTTHTHT
4/10
29/60
HTHHTTHHHT
6/10
499/1000
Many
more
trIals
Simple Example
Classical Approach
I have three friends Ram, Gopal, Bharat each of whom is equally likely to visit me for lunch
What is the probability that today it will be Ram ?
Total 3 outcomes possible : R G B
One is the outcome in question : R
P(R) = 1/3
In the past one month
R has visited 20 times
G has visited 5 times
B has visited 5 times
What is the probability that today it will be Ram ?
Is it P(R) = 1/3
Relative Frequency
Probability calculated from statistical data on the relative frequency of certain occurrences
Observed relative frequency of an event in a very large number of trials
Proportion of times that an event occurs in the long run when conditions are stable
Carbon monoxide emissions
Challenges with relative probability
Number of events considered
Suppose you know of three of your friends who have had jaundice this year
Can you conclude that the probability of getting jaundice is higher this year than in the last year ?
Long run stability
Suppose Tata Motors brings a new model of Indica in the market and in the first three months 10% cars have a clutch failure.
Can you conclude that the probability of a clutch failure in Indica cars is 0.1 ?
If you toss a coin
Two times you may get two heads
100 times, you would get between 45 55 heads
Two Questions
A yoga club consists of 10 members of whom
2 Doctors, 3 Engineers, 3 CA and 2 Other
4 women, 6 men
7 married, 3 single
If we were to choose a club secretary by lottery, what is the probability that the secretary is a
Doctor ?
Woman ?
Single person ?
The following table shows the frequency of marks in a quiz
If I were to ask a random student what is your score, what is the probability that it is in the range of
2 3 ?
6 7 ?
Points to note
Numerical value of a probability of any event is between 0 and 1
0 : if it is impossible, e.g. The probability of teacher being an alien from outer space
1 : if is totally certain, e.g. The probability of teacher being a human being
Sum of the probabilities of events that must be 1, provided the events are
Mutually exclusive
Part of a collectively exhaustive list
Something must happen !!
Subjective Probability
Based on beliefs, not hard facts ..
Because hard facts are simply not available and you cannot sit and do nothing because you do not have facts
Widely used in cases where the event in question occurs very rarely
To be replaced with statistical models if possible
Consider
Selection of a candidate for a job
Sanction of a loan
Earlier these were all subjective but now with more data being collected
Strategic Decisions are still taken on the basis of subjective probability !!
Classical Probability
Relative Probability
Subjective Probability
Marginal Probability
[unconditional probability]
Probability of an event is written as
P(A) = n where
A is the event that secretary is
Doctor
Engineer
CA
Other
n is the value of the probability 0 Joint Probability
under Statistical Dependence
P(Man/Employed)
P(Man AND Employed)
P(Employed)
P(A / B)
P(A B)
P(B)
P(Man and Employed)
= P(Man / Emp) x P(Emp)
P (A B ) = P (A / B ) x P(B)
=
=
Joint Probabilities
from Conditional Probabilities
P(E M) = P(E/M) x P(M) = 3/5 x 5/10 = 3/10
= P(M/E) x P(E) = 3 / 4 x 4/10 = 3/10
P(E W) = P(E/W) x P(W) = 1/5 x 5/10 = 1/10
P(S M) = P(S/M) x P(M) = 2/5 x 5/10 = 2/10
P(S W) = P(S/W) x P(W) = 4/5 x 5/10 = 4/10
Probabilities under
Statistical Dependence
Conditional ProbabilityP(B/A) = P(B A) / P(A)P(A/B) = P(B A) / P(B)
Joint ProbabilityP(B A) = P(B / A) x P(A)= P(A / B) X P(B)
Where are we ? 3
Classical Probability
Relative Probability
Subjective Probability
Marginal Probability P(A)
Probability of A or B
Exclusive Events P(AorB) = P(A) + P(B)
Non Exclusive Events P(AorB) = P(A)+P(B)-P(AB)
Two Events under Statistical Independence
Joint probability P(AB) = P(A) x P(B)
Conditional Probability P(B/A) = P(B)
Two Events under Statistical Dependence
Conditional Probability P(B/A) = P(AB) / P(A)
Joint Probability P(AB) = P(B/A) x P(A)
Marginal Probabilities
under Statistical Dependence
Marginal Properties under statistical dependence are computed by simply summing up the probabilities of all the joint events where the simple event occurs
P(A) = P(AB) + P(AC)
P(Man) = P(Man Employed) + P(Man Student)
P(Student) = P(Man Student) + P(Woman Student)
Marginal Probabilities
under Statistical Dependence
P(M) = P( E M) + P(S M) = 0.3 + 0.2 = 0.5
P(W) = P(E W) + P(S W) = 0.1 + 0.4 = 0.5
P(E) = P(E M) + P(E W) = 0.3 + 0.1 = 0.4
P(S) = P(S M) + P(S W) = 0.2 + 0.4 = 0.6
Where are we ? 4
Classical Probability
Relative Probability
Subjective Probability
Marginal Probability P(A)
Probability of A or B
Exclusive Events P(AorB) = P(A) + P(B)
Non Exclusive Events P(AorB) = P(A)+P(B)-P(AB)
Two Events under Statistical Independence
Joint probability P(AB) = P(A) x P(B)
Conditional Probability P(B/A) = P(B)
Two Events under Statistical Dependence
Conditional Probability P(B/A) = P(AB) / P(A)
Joint Probability P(AB) = P(B/A) x P(A)
Multiple Events under Statistical Dependence
Marginal Probality P(A) = P(AB) + P(AC) + P(AD) + .....
Bayes Theorem
revising prior estimates of probability
Central Theorem that connects
Joint Probability
Conditional Probability
Marginal Probability
Using the basic formula
P(B A) = P(B/A) x P(A)
P(B A) = P(A/B) x P(B)
P(B/A) x P(A) = P(A/B) x P(B)
Its value lies in being able to calculate P(B/A) from the value of P(A/B)
Brand Conscious Customer
Suppose there are two types of customers
Type A : Brand Conscious; Type B : Brand Indifferent
Demographic information tells us that 20% customers are Type A and rest 80% is Type B
P(A) = 0.2 ; P(B) = 0.8
P(A) + P(B) = 1 since events are mutually exclusive
Probability of sale of Designer Shirt is
60% if the customer is Brand Conscious
10% if the customer is Brand Indifferent
P(S/A) = 0.6, P(S/B) = 0.1
A person walks in and purchases a Designer Shirt
What is the probability that he is Brand Conscious
Calculate P(A/S)
Brand Conscious Customer : 1
Demographics tells us that P(A) = 0.2; P(B) = 0.8We know the conditional probabilitiesP(S/A) = 0.6, P(S/B) = 0.1Joint Probability of Sale and given type of customer hence P(SA) = P(S/A)xP(A)Marginal Probability of Saleis sum of the two joint probabilitiesP(S) = P(SA) + P(SB)
Brand Conscious Customer : 2
Conditional ProbabilityP(A/S) = P(SA) / P(S)P(B/S) = P(SB) / P(S)
After purchase of ONE branded shirt
Probability that customer is brand conscious has now increased from 20% to 60%
Brand Conscious Customer : 3
a second sale
After purchase of TWO branded shirts
Probability that customer is brand conscious has now increased from 20% to 90%
Consider Loyalty Program / Free Gifts !!
The TWO sales are INDEPENDENT of each otherhence P(2 Sales) = P(1 Sale) x P(1 Sale)
Error in Machine Setup
A carton sealing machine has to be aligned correctly before it starts packaging
10% of the time it is aligned badly : P(B) = 0.1
90% of the time it is aligned correctly : P(C) = 0.9
If the machine is aligned is aligned badly then there is a 50% chance that the carton will be found defective by the QC staff
P(D / B ) = 0.5
If the machine is aligned correctly, the probability of a defect is is 5%
P(D/C) = 0.05
Given that the first carton is rejected, what is the probability that alignment is bad ? What is P(B/D)
Error in Machine Setup : 1
After the detection of ONE defect on the first carton
Probability that alignment is erroneous has now increased from 10% to 53%
Let us rework the numbers such that
Probability of BAD alignment = 2%
Probability of Defective carton with
Bad alignment is 5%
Good alignment is 1%
Is one defective carton important enough ?
Error in Machine Setup : 2
After the detection of ONE defect on the first carton
Probability that alignment is erroneous has now increased from 2% to 9%
Is it worth stopping production and fixing alignment ?
Let us consider 2 defects in the first 5 cartons
Error in Machine Setup : 3
inconsistent behaviour
After TWO defects in FIVE cartons
Probability that machine is badly aligned has now increased from 2% to 31%
Consider Stopping Production and fixing the machine
P(2 D in 5) = 0.05 x 0.05 X 0.95 X 0.95 X 0.95 = 0.00214P(2D in 5) = 0.01 x 0.01 x 0.99 x 0.99 x 0.99 = 0.00010
Customer Type Elementary Event(Prior) Probability of Primary EventConditional Probability of ONE Sale, given Customer TypeConditional Probability of TWO Sales, given Customer TypeJoint Probability of Sale and Customer Type(Posterior) Probability of Primary Event given 1 Sale
Brand Conscious Type A0.20.60.360.2 x 0.36 =0.0720.9
Brand Indifferent Type B0.80.10.010.8 x 0.1 =0.0080.1
Marginal Probability of Sale =>0.080
???Page ??? (???)30/05/2008, 10:20:30Page / Alignment Elementary Event(Prior) Probability of Primary EventConditional Probability of Defect, given Alignement TypeJoint Probability of Defect and Alignment Type(Posterior) Probability of Primary Event given 1 Defect
BAD Type B0.10.50.1 x 0.5 =0.0500.53
Correct Type C0.90.050.9 x 0.05 =0.0450.47
Marginal Probability of Defect =>0.095
???Page ??? (???)30/05/2008, 10:20:30Page / Alignment Elementary Event(Prior) Probability of Primary EventConditional Probability of Defect, given Alignement TypeJoint Probability of Defect and Alignment Type(Posterior) Probability of Primary Event given 1 Defect
BAD Type B0.020.050.1 x 0.5 =0.0010.09
Correct Type C0.980.010.9 x 0.05 =0.0100.91
Marginal Probability of Defect =>0.011
???Page ??? (???)30/05/2008, 10:20:30Page / Alignment Elementary Event(Prior) Probability of Primary EventConditional Probability of ONE Defect, given Alignement TypeConditional Probability of 2 Defects in 5 CartonsJoint Probability of Sale and Customer Type(Posterior) Probability of Primary Event given 1 Sale
BAD Type B0.020.050.002140.02 x 0.002140.0000430.31
Correct Type C0.980.010.000100.98x0.00010.0000950.69
Marginal Probability of Defect =>0.0001380.050.002140.950.010.000100.99
???Page ??? (???)30/05/2008, 12:42:44Page /
Click to edit the title text format
Click to edit the outline text format
Second Outline Level
Third Outline Level
Fourth Outline Level
Fifth Outline Level
Sixth Outline Level
Seventh Outline Level
Eighth Outline Level
Ninth Outline Level
prithwis mukerjee
???Page ??? (???)27/05/2008, 22:11:08Page / DECOWWWWMMMMMM
???Page ??? (???)27/05/2008, 22:11:08Page / Event / PersonProbability of Event P(n)Description of Event / Kind of Person
10.1employed man
20.1employed man
30.1employed man
40.1employed woman
50.1student man
60.1student man
70.1student woman
80.1student woman
90.1student woman
100.1student woman
???Page ??? (???)29/05/2008, 15:54:06Page / EventProbabilityDescription of Event Work
10.1employed manemployed
20.1employed manemployed
30.1employed manemployed
40.1employed womanemployed
50.1student manstudent
60.1student manstudent
70.1student womanstudent
80.1student womanstudent
90.1student womanstudent
100.1student womanstudent
???Page ??? (???)29/05/2008, 20:06:15Page / EventProbabilityDescription of Event WorkGender
10.1employed manemployedman
20.1employed manemployedman
30.1employed manemployedman
40.1employed womanemployedwoman
50.1student manstudentman
60.1student manstudentman
70.1student womanstudentwoman
80.1student womanstudentwoman
90.1student womanstudentwoman
100.1student womanstudentwoman
???Page ??? (???)29/05/2008, 20:06:15Page / EventProbabilityDescription of Event WorkGender
10.1employed manemployedman
20.1employed manemployedman
30.1employed manemployedman
40.1employed womanemployedwoman
50.1student manstudentman
60.1student manstudentman
70.1student womanstudentwoman
80.1student womanstudentwoman
90.1student womanstudentwoman
100.1student womanstudentwoman
???Page ??? (???)29/05/2008, 20:06:15Page / EventProbabilityDescription of Event WorkGender
10.1employed manemployedman
20.1employed manemployedman
30.1employed manemployedman
40.1employed womanemployedwoman
50.1student manstudentman
60.1student manstudentman
70.1student womanstudentwoman
80.1student womanstudentwoman
90.1student womanstudentwoman
100.1student womanstudentwoman
???Page ??? (???)29/05/2008, 18:09:01Page / Customer Type Elementary Event(Prior) Probability of Primary EventConditional Probability of Sale, given Customer TypeJoint Probability of Sale and Customer Type
Brand Conscious Type A0.20.60.2 x 0.6 =0.12
Brand Indifferent Type B0.80.10.8 x 0.1 =0.08
Marginal Probability of Sale =>0.2
???Page ??? (???)30/05/2008, 10:20:30Page / Customer Type Elementary Event(Prior) Probability of Primary EventConditional Probability of Sale, given Customer TypeJoint Probability of Sale and Customer Type(Posterior) Probability of Primary Event given 1 Sale
Brand Conscious Type A0.20.60.2 x 0.6 =0.120.6
Brand Indifferent Type B0.80.10.8 x 0.1 =0.080.4
Marginal Probability of Sale =>0.2
???Page ??? (???)30/05/2008, 10:20:30Page /