SLIDE 1 219323 Probability and Statistics for Software and Knowledge Engineers
2nd Semester, 2006
Monchai Sopitkamon, Ph.D.
SLIDE 2 Outline
Intro (1.1.1) Sample Spaces (1.1.2) Probability Values (1.1.3) Events (1.2) Combinations of Events (1.3) Conditional Probability (1.4) General Multiplication Law (1.5.1) Independent Events (1.5.2) Counting Techniques (1.7)
SLIDE 3
Intro (1.1.1)
Probability deals with uncertainty. Originally introduced to analyze
gambling games and later for medical purposes.
Focus a lot about chances
SLIDE 4 Sample Spaces (1.1.2)
Experiment: any process that produces at
least one outcome.
Probability theory goal: to provide a
measurement of the chances of the various outcomes that occur.
Thus, must be able to list all possible
- utcomes of the experiment, or sample
space.
Sample space S of an experiment: a set of
all of the possible experiment outcomes.
SLIDE 5
Sample Spaces (1.1.2)
E.g. 1: sample space of machine’s 3
possible breakdown causes: electrical, mechanical, misuse.
→ S = {electrical, mechanical, misuse}
E.g. 2: sample space of number of
possibly defective chips in a box of 500 chips
→ S = {0 def, 1 def, 2 def, …, 500 def}
SLIDE 6 Probability Values (1.1.3)
A set of probability values for an
experiment with a sample space S = {O1, O2, …, On} consists of some probabilities
p1 , p2 , …, pn that satisfy 0 ≤ p1 ≤ 1, 0 ≤ p2 ≤ 1, …, 0 ≤ pn ≤ 1 and p1 + p2 + … + pn = 1 The probability of outcome Oi
is said to be pi , or P(Oi ) = pi .
SLIDE 7
Probability Values (1.1.3)
E.g. 3: the number of errors in a
software product has probabilities
P{0 errors} = 0.05, P{1 error} = 0.08, P{2 errors} = 0.35, P{3 error} = 0.20, P{4 errors} = 0.20, P{5 error} = 0.12, P{i errors} = 0, for i ≥ 6
SLIDE 8 Events (1.2)
An event A is a subset of the sample
space S.
– Collects outcomes of particular interest – Probability of an event A, P(A), is a sum
- f the probabilities of the outcomes
contained within the event A.
A A'
SLIDE 9
Events (1.2)
The compliment of an event A (A') is
the event consisting of everything in the sample space S that is not contained within the event A.
P(A) + P(A') = 1
A A'
SLIDE 10 Events (1.2)
E.g. 4: From E.g. 2, suppose that we know
P{0 def} = 0.02, P{1 def} = 0.11, P{2 def} = 0.16, P{3 def} = 0.21, P{4 def} = 0.13, P{5 def} = 0.08 And we don’t know P{i def}, i ≥ 6 We can find the probabilities of no more than 5 defective chips in each box as: P(A) = P{0 def} + … + P{5 def} = 0.02+0.11+0.16+0.21+0.13+0.08 = 0.71
SLIDE 11 Combinations of Events (1.3)
Sometimes, we are interested in the
probability of more than one event
– E.g., probability of both events occurring simultaneously, – Probability that neither event A nor B
– Probability that at least one of the two events
– Probability that event A
does not.
SLIDE 12 Combinations of Events (1.3)
Intersections of Events Event A∩B is the intersection of
events A and B and consists of
- utcomes contained in both A and B.
P(A∩B) = probability that both events
A and B occur simultaneously
SLIDE 13 A
Intersections of Events
B
Event A → P(A) Event B → P(B)
SLIDE 14
Mutually Exclusive Events
Two events A and B are mutually
exclusive if A∩B = φ so that they have no outcomes in common.
A B
SLIDE 15 Unions of Events
Event A∪B is the union of events A and B
and consists of outcomes contained within at least one of the events A and B.
P(A∪B) = probability that at least one of
the events A and B occurs.
A B
SLIDE 16
Conditional Probability (1.4)
Conditional probability of event A
conditional on event B is for P(B) > 0.
P(A | B) = P(A∩ B) P(B)
Probability that event A occurs given that event B occurs.
SLIDE 17
Conditional Probability (1.4)
For mutually exclusive events A and
B,
since A∩B = φ for mutually exclusive events
P(A | B) = P(A∩ B) P(B) = P(B) = 0
SLIDE 18
Conditional Probability Example
Refers to examples 4’s on pages 35,
21, 10, and 2 for a conditional probability example.
SLIDE 19
General Multiplication Law (1.5.1)
From conditional probability
equation, the probability of intersection of two events A∩B
Also, from Therefore, P(A∩ B) = P(A | B)P(B)
P(B | A) = P(A∩ B) P(A)
P(A∩ B) = P(B | A)P(A)
SLIDE 20
Independent Events (1.5.2)
Two events A and B are
independent events if Therefore, and
P(B | A) = P(B) P(A∩ B) = P(B | A)P(A) = P(B)P(A) = P(A)P(B) P(A | B) = P(A∩ B) P(B) = P(A)P(B) P(B) = P(A)
SLIDE 21 Independent Events (1.5.2)
Two events A and B are
independent events if
P(B | A) = P(B) P(A∩ B) = P(A)P(B) P(A | B) = P(A)
Independence means knowing about one event does not affect the probability of the other event.
SLIDE 22 Intersections of Independent Events
Probability of intersection of a series
- f independent events A1, …, An is
P(A
1 ∩L∩ An) = P(A 1)P(A2)LP(An)
SLIDE 23 Counting Techniques (1.7)
Sometimes, sample space size is
very large and we’re not interested in listing them all, but only want to know the number of possible outcomes and number of outcomes in the event
A sample space S consists of N
equally likely outcomes, of which n are contained within the event A, then the probability of the event A is
P(A) = n N
SLIDE 24
Multiplication Rule
If an experiment consists of k
components for which the number of possible outcomes are n1, …, nk, then the total number of experimental outcomes (sample space size) is
n1 x n2 x … x nk
SLIDE 25 Permutations
A permutation of k objects from n
- bjects (n ≥ k) is an ordered
sequence of k objects selected without replacement from the group
The number of possible permutations
- f k objects from n objects is
P
k n = n(n −1)(n − 2)L(n − k +1) =
n! (n − k)!
SLIDE 26 Combinations
A combination of k objects from n
- bjects (n ≥ k) is an unordered
collection of k objects selected without replacement from the group
The number of possible
combinations of k objects from n
Ck
n = n
k ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ = n! (n − k)!k!