Download Conditional Probability

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
no text concepts found
Transcript
ST 380
Probability and Statistics for the Physical Sciences
Conditional Probability
We always use all available information when we assess the
probability of some event.
For example, consider this experiment: choose a day at random from
the year 2012, and find out the percentage change for that day in
Apple’s stock price (AAPL) and in the S&P 500 index (GSPC).
Let A be the event that AAPL rises, and B be the event that GSPC
rises.
1 / 11
Probability
Conditional Probability
ST 380
Probability and Statistics for the Physical Sciences
Table : Numbers of days in 2012
GSPC falls (B 0 )
GSPC rises (B)
Total
AAPL falls (A0 )
AAPL rises (A)
75
43
45
86
120
129
Total
118
131
249
2 / 11
Probability
Conditional Probability
ST 380
Probability and Statistics for the Physical Sciences
AAPL rose on 129 out of 249 days, so P(A) = 129/249 = 0.52.
If we feel that current market conditions are similar to those of 2012,
we would use that as an estimate of the probability that AAPL rose
today.
Now suppose that we see that GSPC rose today. Does that change
our estimate for AAPL?
3 / 11
Probability
Conditional Probability
ST 380
Probability and Statistics for the Physical Sciences
Of the 131 days on which GSPC rose, AAPL also rose on 86 days.
So given that GSPC rose, the probability that AAPL rose is
86/131 = 0.66.
That is, the information that GSPC rises on a given day changes the
probability of a rise in AAPL from 0.52 to 0.66.
We call this the conditional probability of A given that B occurred,
and write it as P(A|B).
4 / 11
Probability
Conditional Probability
ST 380
Probability and Statistics for the Physical Sciences
Note that
P(A ∩ B) =
86
131
and P(B) =
,
249
249
so
P(A|B) =
86
P(A ∩ B)
=
.
131
P(B)
This is the general definition of conditional probability:
P(A|B) =
P(A ∩ B)
.
P(B)
Note the useful consequence:
P(A ∩ B) = P(A|B) × P(B).
5 / 11
Probability
Conditional Probability
ST 380
Probability and Statistics for the Physical Sciences
Bayes’ Theorem
Law of Total Probability
Suppose that A1 , A2 , . . . , Ak are:
mutually exclusive (Ai ∩ Aj = ∅, i 6= j)
and exhaustive (A1 ∪ A2 ∪ · · · ∪ Ak = S).
Then for any event B,
P(B) = P(B|A1 )P(A1 ) + P(B|A2 )P(A2 ) + · · · + P(B|Ak )P(Ak )
=
k
X
P(B|Ai )P(Ai )
i=1
6 / 11
Probability
Conditional Probability
ST 380
Probability and Statistics for the Physical Sciences
Bayes’ Theorem
P(Aj ∩ B)
P(B)
P(B|Aj )P(Aj )
= Pk
i=1 P(B|Ai )P(Ai )
P(B|Aj )
= P(Aj ) × Pk
i=1 P(B|Ai )P(Ai )
P(Aj |B) =
P(Aj ) is called the prior probability of Aj (that is, prior to knowing
whether or not B happened);
P(Aj |B) is called the posterior probability of Aj (that is, conditional
on knowing that B occurred).
7 / 11
Probability
Conditional Probability
ST 380
Probability and Statistics for the Physical Sciences
Bayes’ Theorem is useful when we know P(Ai ) and P(B|Ai ),
i = 1, 2, . . . , k.
Example 2.31: Incidence of a Rare Disease
One in 1,000 adults suffers from a rare disease, for which a
less-than-perfect test is available.
A1 = individual has the disease, A2 = A01
B = test is positive
Specification
P(A1 ) = 0.001, P(A2 ) = 1 − P(A1 ) = 0.999
P(B|A1 ) = 0.99, P(B|A2 ) = 0.02
8 / 11
Probability
Conditional Probability
ST 380
Probability and Statistics for the Physical Sciences
Terminology
P(B|A1 ) is the sensitivity of the test, the probability of correctly
identifying someone with the disease, here 0.99.
P(B 0 |A2 ) is the specificity of the test, the probability of correctly
identifying someone who does not have the disease, here
1 − 0.02 = 0.98.
Calculation
In this case, Bayes’ Theorem gives P(A1 |B) = 0.047.
Even though the test is quite accurate, a positive result is far from
conclusive that the individual suffers from the disease.
9 / 11
Probability
Conditional Probability
ST 380
Probability and Statistics for the Physical Sciences
Independence
Suppose that information about whether B has occurred does not
change the probability of A.
That is, P(A|B) = P(A).
Then we say that A is independent of B.
So
P(A ∩ B) = P(A|B)P(B) = P(A)P(B).
This is symmetric in A and B, so B is also independent of A, and we
say simply that A and B are (probabilistically, or statistically)
independent.
10 / 11
Probability
Independence
ST 380
Probability and Statistics for the Physical Sciences
Mutual Independence
If more than two events A1 , A2 , . . . , Ak satisfy
P(A1 ∩ A2 ∩ · · · ∩ Ak ) = P(A1 )P(A2 ) . . . P(Ak ),
they are mutually independent.
In the birthday example, because we assumed all outcomes were
equally likely, we can show that each person’s birthday is independent
of the others.
We can often argue that two or more events are defined by physically
independent processes, not affected by each other.
In this case, we assume that the events are also statistically
independent of each other.
11 / 11
Probability
Independence
Related documents