Uploaded by User9446

ML3 probability

advertisement
Probability
Ridho Rahmadi
Machine Learning
Informatika, FTI UII
March 2019
Think about an experiment from which outcome is
unpredictable; but suppose you know the set of possible
outcomes (sample space S).
(a) S = {girl, boy }
(b) S = {2, 3, 5, 4, 6, 7, 1}
(c) S = (0, ∞)
(d) S = {head, tail}
Sample space and events
Any subset E of the sample space S is called an event
I
An event consists of possible outcomes.
I
If the outcome is contained in E , then the event E has
occurred.
Sample space and events
For example,
1. Based on Figure (a), E = {girl}
2. Based on Figure (b),
E = {all outcomes in S starting with a 7}
3. Based on Figure (c), E = (0, 2)
4. Based on Figure (d), E = {tail}
From 1 to 4, E is the event that the child is a girl, E is the event
that the horse number 7 wins, E is the event that a patient gets an
injection of dosage less than 2, and E is the event of the coin
falling with tail on top, respectively.
For any two events E and F of a sample space S,
I
If E = {girl} and F = {boy }, then E ∪ F = {girl, boy }. The
E ∪ F occurs if either E or F occur.
I
If E = (0, 5) and F = (2, 10), then EF (denoting the
intersection between the two) occurs if only both E and F
occur, e.g., EF = (2, 5).
Note that () above indicates interval.
0
I
For any event E , E is a complement of E , consisting all
outcome in S that are not in E . For example, if E = {girl},
0
E = {boy }.
I
If, based on Figure (b), E = {an outcome started with 5},
F = {an outcome ended with 5}, then EF = ∅ (null event or
event with no outcome), which means E and F cannot occur
and thus E and F are mutually exclusive.
Axioms of probability
I
0 ≤ P(E ) ≤ 1
I
P(S) = 1
I
For any sequence of mutually exclusive events E1 , E2 , . . . , En ,
i.e.,SEi Ej = ∅, i 6= j,
P( ni=1 ) = Σni=1 , n = 1, 2, , . . . , ∞.
I
1 = P(S) = P(E ∪ E c ) = P(E ) + P(E c ), equivalently
P(E c ) = 1 − P(E ).
I
P(E ∪ F ) = P(E ) + P(E ) − P(EF )
Odds of an event
The odds of an event is defined by
P(A)
P(A)
=
P(Ac )
1 − P(A)
For example, if P(A) = 3/4, then the odds is 3, which means that
the event A likely occurs 3 times higher than it does not.
Conditional probability
Given, S = {(i, j)}, i = j = 1, 2, . . . , 6, where i = the first die
lands on side i, and j = the second die lands on side j.
What is the probability that the sum of rolling two dice = 8, given
that the first die landed on side 3?
Answer:
(3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6)
From the six possibilities of two dice given the first die landed on
side 3, only (3, 5) that gives 8 as a total sum (1 out of six
possibilities). Thus, the conditional probability is 1/6.
Conditional probability
Probability of event E , given that event F occurred,
P(E |F ) =
, only when P(F ) > 0.
P(EF )
P(F )
Download