Download Conditional probability, etc. 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
Conditional probability - 1
Conditional probability, etc.
●
●
A LECTURE
prepared by
Gilberto E. Urroz
●
January 2006
●
●
●
●
P( A | B) =
●
Conditional probability - 4
Definition:
P( A ∩ B)
.
P( B)
Conditional probability - 3
Given that A⊂ S, B ⊂ S, S = sample space
P(A∩B) = hA∩ B/n, and P(B) = hB/n, where
n = number of outcomes in S, and
hAB = outcomes in event A∩B
hB = outcomes in event B
h / n h A∩ B
=
P ( A | B ) = A∩ B
hB / n
hB
Notation: P(A|B) interpreted as
– “the probability of A given B” or
– “the probability of the occurrence of A given
that B has occurred.”
P( A | B) =
Conditional probability - 2
●
Probability associated with an event A, given the
occurrence of a related event B.
h A∩ B / n h A∩ B
=
hB / n
hB
This result is similar to the classical definition of
probability if we think of B as a “reduced” sample
space [See the next two figures].
Conditional probability - 5
Conditional Probability Axioms - 1
For any three events A1, A2, and A3 the following
relationship holds true:
●
Conditional Probability Axioms - 2
●
The expression
P(A) = P(A∩A1) + P(A∩A2) + … + P(A∩An)
P(A1∩A2∩A3) = P(A1)P(A2|A1)P(A3|A1∩A2)
is illustrated below:
If an event A must result in one of the mutually exclusive
events A1, A2, …, An, then
●
P(A)=P(A1)P(A|A1)+P(A2)P(A|A2)+…+P(An)P(A|An)
or
P(A) = P(A∩A1) + P(A∩A2) + … + P(A∩An)
Independent Events Illustrated
Independent Events - 1
●
●
●
●
From the definition of conditional probability, P(A∩B) =
P(B) P(A|B)
If events A and B are independent, P(A|B) = P(A), thus,
for independent events A and B, P(A∩B) = P(B) P(A)
Also, if P(A∩B) = P(B) P(A), then events A and B are
independent
In summary, events A and B are independent, if and only
if, P(A∩B) = P(B) P(A).
Dots represent outcomes in
sample space
P(A) = hA/n = 8/20 = 0.4
P(B) = hB/n = 10/20 = 0.5
P(A∩B) = hA∩B/n= 4/20 =
0.4
P(A)P(B) = 0.4x0.5 = 0.20
= P(A∩B)
Thus, events A and B are
independent
Independent ≠ Mutually-exclusive
Bayes theorem
●
Let A1, A2, …, An, be mutually-exclusive events so
that A1 ∪ A2 ∪ …∪An = S (i.e., one of the events
must occur). Then, if A is any event,
P ( Ak | A) =
P ( Ak ∩ A)
P ( Ak ) P ( A | Ak )
= n
P ( A)
∑ P( A j ) P( A | A j )
j =1
Fundamental principle of counting
●
●
●
When putting together
configurations of elements
selected in k different steps
with n1 options in the first step,
n2 options in the second step,
and so on, up to nk options in
the k-th step, the total number
of possible configurations is
given by
n1n2n3…nk.
Factorials - 1
The factorial of a positive integer number n is the product
n! = n(n-1)(n-2)…3x2x1
Examples:
5! = 5x4x3x2x1 = 120, 4! = 4x3x2x1 = 24,
3! = 3x2x1 = 6, 2! = 2x1 = 2, and 1! = 1.
From the definition of factorial:
For the diagram shown, n1=3,
n1=2, and n1=3.
Possible configurations
n1n2n3 = 3x2x3 = 18
n! = n(n-1)! = n(n-1)(n-2)! = n(n-1)(n-2)(n-3)! = …
e.g., 6! = 6x5! = 6x5x4! = 6x5x4x3! = 6x5x4x3x2! = 6x5x4x3x2x1
Also, for two positive integer numbers n, r, with r < n,
Factorials - 2
Also, for two positive integer numbers n, r, with r < n,
n!
n ⋅ (n − 1) ⋅ (n − 2) L (n − r + 1) ⋅ (n − r )!
=
= n ⋅ (n − 1) ⋅ (n − 2) L (n − r + 1)
(n − r )!
(n − r )!
Permutations - 1
●
●
For example, in the following case n = 8 and r = 5:
8!
8! 8 × 7 × 6 × 5 × 4 × 3!
= =
= 8 × 7 × L× (8 − 5 + 1) = 8 × 7 × 6 × 5 × 4
(8 − 5)! 3!
3!
Given n objects we select r (with r<n) of those
objects and order them in a line.
The number of permutations of n objects, taken r
at a time, is
n
●
Pr = P (n, r ) = n ⋅ (n − 1) ⋅ (n − 2) L (n − r + 1) =
If n = r, then
Pn = P(n,n) = n!
n
By convention,
●
0! = 1
For permutations, the order of the objects is
important
Permutations - 2
●
If you have n objects consisting of n1 objects of
type 1, n2 objects of type 2, and so on, ending with
nk objects of type k, so that
n 1 + n 2 + … + nk = n
●
The number of different permutations of the n
objects is given by
n
n!
(n − r )!
Pn1 ,n2 ,Lnk = P (n; n1 , n2 , L , nk ) =
n!
n1!n2 !L nk !
Combinations
●
●
Given n objects we select r (with r<n) of those
objects disregarding the order of selection => a
combination of objects.
The number of combinations of n objects, taken r
at a time, is
n
⎛n⎞
P
n!
Cr = C (n, r ) = ⎜⎜ ⎟⎟ = n r =
⎝ r ⎠ r! r!(n − r )!
Related documents