219323 Probability and Statistics for Software and Knowledge - - PowerPoint PPT Presentation

219323 probability and statistics for software and
SMART_READER_LITE
LIVE PREVIEW

219323 Probability and Statistics for Software and Knowledge - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

219323 Probability and Statistics for Software and Knowledge Engineers

2nd Semester, 2006

Monchai Sopitkamon, Ph.D.

slide-2
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
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
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
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
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

  • ccuring

is said to be pi , or P(Oi ) = pi .

slide-7
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
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
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
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
SLIDE 11

Combinations of Events (1.3)

Sometimes, we are interested in the

probability of more than one event

  • ccurring.

– E.g., probability of both events occurring simultaneously, – Probability that neither event A nor B

  • ccurs,

– Probability that at least one of the two events

  • ccurs, or

– Probability that event A

  • ccurs, but B

does not.

slide-12
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
SLIDE 13

A

Intersections of Events

B

  • Event A∩B → P(A∩B)

Event A → P(A) Event B → P(B)

slide-14
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
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
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
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
SLIDE 18

Conditional Probability Example

Refers to examples 4’s on pages 35,

21, 10, and 2 for a conditional probability example.

slide-19
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
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
SLIDE 21

Independent Events (1.5.2)

Two events A and B are

independent events if

  • r

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
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
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

  • f 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

slide-24
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
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

  • f n objects.

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
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

  • f n objects.

The number of possible

combinations of k objects from n

  • bjects is

Ck

n = n

k ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ = n! (n − k)!k!