219323 Probability and Statistics for Software and Knowledge Engineers 2nd Semester, 2006 Monchai Sopitkamon, Ph.D.
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)
Intro (1.1.1) � Probability deals with uncertainty . � Originally introduced to analyze gambling games and later for medical purposes. � Focus a lot about chances
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 outcomes of the experiment, or sample space. � Sample space S of an experiment: a set of all of the possible experiment outcomes.
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}
Probability Values (1.1.3) � A set of probability values for an experiment with a sample space S = { O 1 , O 2 , …, O n } consists of some probabilities p 1 , p 2 , …, p n that satisfy 0 ≤ p 1 ≤ 1, 0 ≤ p 2 ≤ 1, …, 0 ≤ p n ≤ 1 and p 1 + p 2 + … + p n = 1 The probability of outcome O i occuring is said to be p i , or P ( O i ) = p i .
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
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 of the probabilities of the outcomes contained within the event A . A ' • • • • • • • A • • • •
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 • • • •
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
Combinations of Events (1.3) � Sometimes, we are interested in the probability of more than one event occurring. – E.g., probability of both events occurring simultaneously, – Probability that neither event A nor B occurs, – Probability that at least one of the two events occurs, or – Probability that event A occurs, but B does not.
Combinations of Events (1.3) � Intersections of Events � Event A ∩ B is the intersection of events A and B and consists of outcomes contained in both A and B . � P( A ∩ B ) = probability that both events A and B occur simultaneously
Intersections of Events Event A ∩ B → P ( A ∩ B ) Event B → P ( B ) Event A → P ( A ) • • • • • • • B • A • • •
Mutually Exclusive Events � Two events A and B are mutually exclusive if A ∩ B = φ so that they have no outcomes in common. • • • • • • • • • B A • •
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 . • • • • • • • B • A • • • � P( A ∪ B ) = probability that at least one of the events A and B occurs.
Conditional Probability (1.4) � Conditional probability of event A conditional on event B is P ( A | B ) = P ( A ∩ B ) for P ( B ) > 0. P ( B ) Probability that event A occurs given that event B occurs.
Conditional Probability (1.4) � For mutually exclusive events A and B , P ( A | B ) = P ( A ∩ B ) 0 = P ( B ) = 0 P ( B ) since A ∩ B = φ for mutually exclusive events
Conditional Probability Example � Refers to examples 4’s on pages 35, 21, 10, and 2 for a conditional probability example.
General Multiplication Law (1.5.1) � From conditional probability equation, the probability of intersection of two events A ∩ B P ( A ∩ B ) = P ( A | B ) P ( B ) P ( B | A ) = P ( A ∩ B ) Also , from P ( A ) P ( A ∩ B ) = P ( B | A ) P ( A ) Therefore,
Independent Events (1.5.2) � Two events A and B are independent events if P ( B | A ) = P ( B ) Therefore, P ( A ∩ B ) = P ( B | A ) P ( A ) = P ( B ) P ( A ) = P ( A ) P ( B ) P ( A | B ) = P ( A ∩ B ) = P ( A ) P ( B ) = P ( A ) and P ( B ) P ( B )
Independent Events (1.5.2) � Two events A and B are independent events if P ( A | B ) = P ( A ) P ( B | A ) = P ( B ) P ( A ∩ B ) = P ( A ) P ( B ) or Independence means knowing about one event does not affect the probability of the other event.
Intersections of Independent Events � Probability of intersection of a series of independent events A 1 , …, A n is 1 ∩ L ∩ A n ) = P ( A 1 ) P ( A 2 ) L P ( A n ) P ( A
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 of interest. � 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
Multiplication Rule � If an experiment consists of k components for which the number of possible outcomes are n 1 , …, n k , then the total number of experimental outcomes (sample space size) is x … x n k n 1 x n 2
Permutations � A permutation of k objects from n objects ( n ≥ k ) is an ordered sequence of k objects selected without replacement from the group of n objects. � The number of possible permutations of k objects from n objects is n = n ( n − 1)( n − 2) L ( n − k + 1) = n ! P ( n − k )! k
Combinations � A combination of k objects from n objects ( n ≥ k ) is an unordered collection of k objects selected without replacement from the group of n objects. � The number of possible combinations of k objects from n objects is ⎛ ⎞ n = n n ! ⎟ = ⎜ C k ( n − k )! k ! ⎝ ⎠ k
Recommend
More recommend