Professional Documents
Culture Documents
Basic Probability
Basic Probability
Basic Probability
Probability
Probability theory is a mathematical framework that
allows us to describe and analyze random
phenomena in the world around us.
Random phenomena
Events or experiments whose outcomes we can't predict with
certainty.
Our knowledge about the outcome is limited, so we can't be
certain what will happen.
Example:
Flipping a fair coin.
Example of Randomness
Phenomena
Set Operations
Union
The union of two sets is a set containing all elements
that are in A or in B (possibly both).
For example, A = {1,2}; B = {2,3}; A B = {1,2,3}.
Random Experiments
A random experiment is a process by which we observe
something uncertain, ex: rolling a die.
After the experiment, the result of the random experiment is
known outcome.
Thus in the context of a random experiment, the sample space
is our universal set.
Example:
Random experiment: toss a coin; sample space:
S={heads,tails} or as we usually write it, {H,T}.
Random experiment: roll a die; sample space: S={1,2,3,4,5,6}.
Probability
We assign a probability measure P(A) to an event A.
This is a value between 0 and 1 that shows how likely the event
is.
If P(A) is close to 0, it is very unlikely that the event A occurs.
On the other hand, if P(A) is close to 1, event A is very likely to
occur.
Axioms of Probability
Probability theory is based on some axioms that act as
the foundation for the theory.
Example
A adalah kejadian munculnya head (H) saat melempar koin.
S = {H,T}
A = {H}
P(A) = 1/2
axiom 1: 0 P(A) 1
P(S) = 2/2 = 1
axiom 2: P(S) = 1
B adalah kejadian munculnya tail (T) saat melempar koin.
B = {T}
kejadian A dan B adalah mutual eksklusif (disjoint)
P(B) = 1/2
P(A B) = P(A) + P(B) = 1/2 + 1/2 = 1
axiom 3
Example
A adalah kejadian munculnya bilangan ganjil saat melempar dadu.
S = {1,2,3,4,5,6}
A = {1,3,5}
P(A) = 3/6 = 1/2 axiom 1: 0 P(A) 1
P(S) = 6/6 = 1 axiom 2: P(S) = 1
B adalah kejadian munculnya bilangan genap saat melempar dadu.
B = {2,4,6}
kejadian A dan B adalah mutual eksklusif (disjoint)
P(B) = 3/6 =
P(A B) = P(A) + P(B) = 3/6 + 3/6 = 1
axiom 3
Inclusion-exclusion principle
As we have seen, when working with events, intersection means
"and", and union means "or".
The probability of intersection of A and B, P(AB), is sometimes
shown by P(A,B) or P(AB).
Inclusion-exclusion principle:
P(AB) = P(A) + P(B) P(AB) (A and B are not disjoint
events)
We can extend it to the union of three or more sets.
P(ABC) = P(A) + P(B) + P(C) P(AB) P(AC) P(BC) +
P(ABC)
Example
A adalah kejadian munculnya bilangan prima saat melempar dadu.
S = {1,2,3,4,5,6}
A = {2,3}
sehingga P(A) = 2/6 = 1/3
B adalah kejadian munculnya bilangan genap saat melempar dadu.
B = {2,4,6} sehingga P(B) = 3/6 = 1/2
(AB) = {2} sehingga P(AB) = 1/6
(AB) = {2,3,4,6} sehingga P(AB) = 4/6 = 2/3
Conditional Probability
P(A|B) , the conditional probability of A given that B has
occurred.
It is reasonable to assume that in this example, P(A|B)
should be larger than the original P(B), which is called
the prior probability of B.
Chain
Rule
sehingga
Chain
Contingency Table
X
Total of Rows
C
C
Total of
Column
Not Brand X
Total of Rows
Crash C
0.6
0.1
0.7
No Crash C
0.2
0.1
0.3
Total of Colums
0.8
0.2
Tentukan:
Probabilitas disk crash saat disk yang digunakan adalah
Brand X.
Probabilitas Brand X saat disk yang digunakan crash.
Independent
Two events are independent if one does not convey any
information about the other.
Example:
A : an event that it rains tomorrow, and suppose that P(A) = 1/3.
B : an event that it lands heads up when flipping a coin, so we
have P(B) = 1/2.
A and B are two independent events, because the result of coin
toss does not have anything to do with tomorrow's weather.
Independent (cont.)
Thus,
if two events A and B are independent and P(B)0, then
P(A|B) = P(A)
Two events A and B are independent if
P(AB) = P(A).P(B)
Independent (cont.)
Example:
I pick a random number from {1,2,3,,10}, and call it N. Suppose
that all outcomes are equally likely. Let A be the event that N is
less than 7, and let B be the event that N is an even number. Are A
and B independent?
Meaning
Disjoint
Independe
nt
Formulas
P(A|B)=P(A),
P(B|A)=P(B)
P(AB)=P(A)P(B)
Conditional Independence
Two events A and B are conditionally independent given
an event C with P(C)>0 if
P(AB|C) = P(A|C)P(B|C)
If A and B are conditionally independent given C, then
P(A|B,C) = P(A|C)
C = {1,4}
Then, we have
P(A) = 1/3 P(B) = 1/2
P(AB) = 1/6 = P(A)P(B)
But we have
P(A|C) = 1/2
P(B|C) = 1/2
P(AB|C) = P({2}|C)=0