lecture (5) introduction to probability theoryandapplications

Post on 17-Dec-2015

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lecture (5)Lecture (5)

Introduction to Probability Introduction to Probability Theory Theory

and and ApplicationsApplications

Experiment: a process that generates well-defined outcomes.

Experiment outcomes

Roll a dice 1,2,3,4,5,6

Sample space: all possible outcomes.

Sample point: any particle outcome.

For the “Roll a dice” example: S={1,2,3,4,5,6}.

In the example {1}.

Experiments

An event is a collection of sample points (or, an event is a subset of a sample space)

(1) Rolling two dices: (a) the sum of the numbers that come up is odd, (b) the numbers that come up are 3 and 6, etc.(2) Tossing two coins: at least one of them is head (it is a collection of the following sample points (H,T), (T,H) and (H,H)).

Events

Coin Tossing

Sometimes the experiment consists of several steps. In such a case, a tree diagram is handy. Consider the experiment of tossing two coins. S={(H,H), (H,T), (T,H), (T,T)}

Step 1

First Coin Toss

Step 2

Second Coin Toss

Sample Point

Head

Head

HeadTail

Tail

Tail

(H,H)

(H,T)

(T,H)

(T,T)

T

Complement of an event: Given an event A, the complement of A is defined to be the event of all sample points that are not in A. The complement of A is denoted by Ac

Venn DiagramSample space S

Event A

Ac

0

1

2

3

4

5

6

7

0 1 2 3 4 5 6 7

Event A – at least one dice shows the number 1

Thus, event Ac – none of the dices shows the number 1

event A

event Ac

Rolling two dices (Example)

the union of A and B is the event containing all sample points belonging to A or B or both. The union is denoted by

Sample space S

Event A

BA

Event B

Union of two events

0

1

2

3

4

5

6

7

0 1 2 3 4 5 6 7

Event A – at least one dice shows the number 1

Event B – the sum of the numbers is at most 4

event A

event B

Rolling two dices (Example)

Given two events A and B, the intersection of A and B is the event containing the sample points belonging to both A and B. The intersection is denoted by

Sample space S

Event A

BA

Event B

BA

Intersection of two events

0

1

2

3

4

5

6

7

0 1 2 3 4 5 6 7

Event A – at least one dice shows the number 1

Event B – the sum of the numbers is at most 4

The intersection (1,1), (1,2), (1,3), (2,1) and (3,1)

event A

event B

BA

Rolling two dices (Example)

Mutually exclusive events: two events are said to be mutually exclusive if the events has no sample points in common.

Sample space S

Event A Event B

Definitions Events

Rolling two dices

0

1

2

3

4

5

6

7

0 1 2 3 4 5 6 7

Event A – at least one dice shows the number 1

Event B – the sum of the numbers is bigger than 10

event A

event B

Probability is a number expressing the

likelihood that a specific event will occur. Let Ei be a specific event (for example,

the sum of the numbers on two dices is 2.)

Let be the probability of this event.Axioms of probability:

ii

i

E

iE

possible all

1)Pr( .2

allfor 1)Pr(0 .1

)Pr( iE

Probability

Assessing Probability

The probability of occurrence of a given event can be assessed as the ratio of the number of occurrences to the total number of possible occurrences and non-occurrences of the event.

Occurrence of an event is called “ Success”Non-occurrence of the event is called “Failure”

The number of successes in N trials = nThe relative frequency of successes = n/N

( ) limN

n np X

N N

Assessing Probability (Cont.)Assessing Probability (Cont.) ( )

Fair Coin:

Head (H) or Tail (T)

( ) ( ) 0.5

( ) 0.5, ( ) 0.5

lim

lim lim

N

H T

N N

n np X

N N

p H p T

n np H p T

N N

0.4

0.5

0.6

10 1 10 2 10 3 10 4

Number of tosses

Figure 4.1.1 Proportion of heads versus number of tossesfor John Kerrich's coin tossing experiment.

From Chance Encounters by C.J. Wild and G.A.F. Seber, © John Wiley & Sons, 2000.

Long Run Behavior of Coin Tossing

Probability ( Ex.)Probability ( Ex.)

Coin: Sample Space {H, T}

Do the following experiments with one coin:n=5n=10n=20n=50n=100

Calculate p(H), p(T).Draw the convergence curve between n and p(H), p(T).

Basic Probability Laws

1)Pr( S

1)Pr()Pr( cAA

where S is the set of all the sample points

Thus,

Example (tossing two coins): A is the event “at least one of them is head”, and thus Ac is the event “none of the coins is head”

4

3)},(),,(),,{(Pr HHHTTHA

4

1)},{(Pr TTAcand

Thus, 14

1

4

3PrPr cAA

Tossing two coins: A is the event “at least one of them is head”, and thus Ac is the event “none of the coins is head”

4

3)},(),,(),,{(Pr HHHTTHA and

4

1)},{(Pr TTAc

14

1

4

3PrPr cAAThus,

Basic Probability Laws

)Pr()Pr()Pr()Pr( BABABA Let’s start with two mutually exclusive events. In this case, and 0)Pr( BA

)Pr()Pr()Pr( BABA

Rolling two dices: Event A – at least one dice shows the

number 1, and event B – the sum of the numbers is bigger than 10

Basic Probability Laws (Example Solution)

Rolling two dices: Event A – at least one dice shows the

number 1, and event B – the sum of the numbers is bigger than 10

36

14)Pr( thus

36

3)Pr( and

36

11)Pr( BABA

Dice #1

Dice #2

Dice #1

Dice #2

Basic Probability Laws

Pr( ) Pr( or )

= Pr( ) Pr( ) Pr( )

A B A B

A B A B

Why do we need to subtract when the two events are not mutually exclusive? Because otherwise we would double-count it—both and include it.

)Pr( BA

Rolling two dices: Event A – at least one dice shows the number 1, and event B – the sum of the numbers is at most 4

)Pr(A )Pr(B

Basic Probability Laws (Example Solution)

Rolling two dices: Event A – at least one dice shows the number 1, and event B – the sum of the numbers is at most 4

36

12)Pr(

36

5B)Pr(A and

36

6)Pr( ,

36

11)Pr(

BA

BA

Dice #1

Dice #2

)|Pr( BA

)Pr()Pr()Pr( BABA

Rolling two dices: Event A – at least one dice shows the number 1, and event B – the sum of the numbers is at most 4. What is the probability of event A?

)Pr(A

One of the most important concepts. It is denoted as which means “the probability of event A given the condition that event B has occurred.”

And what is the probability of event A if we know that event B has occurred?

)|Pr( BA

How did you calculate ? )|Pr( BA

Conditional Probability

)Pr(

)Pr()|Pr(

B

BABA

Event B

Event B with probability

Event A

BA

Event B has occurred:)Pr(B

Event A and B with probability )Pr( BA

Conditional Probability (Cont.)

General Multiplication Law

Pr( ) Pr( ) Pr( , )

Pr( | ) Pr( )

A B A and B A B

A B B

Independent events are events in which the occurrence of the events will not affect the probability of the occurrence of any of the other events.

Multiplication Rule for Independent Events

Example:

Picking a color from a set of crayons, then tossing a die. Separately, each of these events is a simple event and the selection of a color

does not affect the tossing of a die.

If the set of crayons consists only of red, yellow, and blue, the probability of picking red is . The probability of tossing a die and rolling a 5 is . Butthe probability of picking red and rolling a 5 is given by:

1

3 1

6

Pr(red 5) Pr(red) Pr(5) 1 1 1

3 6 18

The multiplication Rule for Independent Events (Example)

This can be illustrated using a “tree” diagram.

Since there are three choices for the color and six choices for the die, there are eighteen different results. Out of these, only one gives a combination of red and 5. Therefore, the probability of picking a red crayon and rolling a 5 is given by:

Pr(red 5) Pr(red) Pr(5) 1 1 1

3 6 18

The multiplication Rule for Independent Events (Example) Cont.

The multiplication rule for independent events can be stated as:

This rule can be extended for more than two independent events:

Pr( ) Pr( ) Pr( )A B A B

Pr( , .) Pr( ) Pr( ) Pr( ), .A B C etc A B C etc

Pr( ) Pr( | ) Pr( )A B A B B

The multiplication Rule for Independent Events

The general formula states:

The occurrence of one event affects the probability of the occurrence of other events.

An example of dependent events:

Picking a card from a standard deck then picking another card from the remaining cards in the deck.

For instance, what is the probability of picking two kings from a standard deck of cards? The probability of the first card being a king is . However, the probability of the second card depends on whether or not the first card was a king.

4 1

52 13

Multiplication Rule for Dependent Events

If the first card was a king then the probability of the second card being a king is .

If the first card was not a king, the probability of the second card being a king is .

Therefore, the selection of the first card affects the probability of the second card.

3 1

51 17

4

51

Multiplication Rule for Dependent Events (Example) Cont.

The multiplication rule that include dependent events reads:

Pr( ) Pr( | ) Pr( )

Pr( ) Pr( | ) Pr( )

A B A B B

A B B A A

Multiplication Rule for Dependent Events (Example) Cont.

In a group of 25 people 16 of them are married and 9 are single. What is the probability that if two people are randomly selected from the group, they are both married?

If A represents the first person chosen is married and

B represents the second person chosen is married then:

Here, is now the event of picking another married person from the remaining 15 married persons. The probability for the selection made in B is affected by the selection in A.

Example 2

( | )P B A

16 15 2

Pr( )25 24 5

A B

Probability that Q is 10,000 to 15, 000 = 17.3%

Prob that Q < 20,000 = 1.3 + 17.3 + 36 = 54.6%

17.3

36

1.3

27

8 1.39

Estimating Probability form Histogram

Discrete

Continuous

F(x1) = P(x < x1)

F(x1) - F(x2)

Estimating Probability form

Cumulative Histogram

Prob that Q < 20,000 = 1.3 + 17.3 + 36 = 54.6%Prob that Q = 20,000, = 80.6-54.6 = 27%

• The bivariate (or joint) distribution is used when the relationship between two random variables is studied.

• The probability that X assumes the value x, and Y assumes the value y is denoted

p(x,y) = P(X=x and Y = y)

Bivariate Distributions

Bivariate Distributions

1y)p(x, 2.

1y)p(x,0 1.

:conditionsfollowingthesatisfies

function y probabilitjoint The

y all

xall

• Example– X and Y are two variables. Let X and Y

denote the yearly runoff and rainfall (inches) respectively.

– The bivariate probability distribution is presented next.

Bivariate Distributions

p(x,y)

Bivariate Distributions

X

YX=0 X=10X=5

y=5

y=10

y=0

0.42

0.120.21

0.070.06

0.02

0.06

0.03

0.01

Example continued X (in)

Y (in) 0 5 100 .12 .42 .065 .21 .06 .0310 .07 .02 .01

Marginal Probabilities

• Example- continued– Sum across rows and down columns

XY 0 5 10 p(y)0 .12 .42 .06 .605 .21 .06 .03 .3010 .07 .02 .01 .10p(x) .40 .50 .10 1.00

p(0,0)p(0,5)p(0,10)

The marginal probability P(X=0)

P(Y=5), the marginal probability.

( )( | )

( )

p X x and Y yp X x Y y

p Y y

( )

( | )( )

p X x and Y yp X x Y y

p Y y

( 0 5) .21( 0 | 5) .7

( 5) .30

( 5 5) .06( 5 | 5) .2

( 5) .30

( 10 5) .03( 10 | 5) .1

( 5) .30

P X and YP X Y

P Y

P X and YP X Y

P Y

P X and YP X Y

P Y

Example - continued

The sum is equal to 1.0

XY 0 5 10 p(y)0 .12 .42 .06 .605 .21 .06 .03 .3010 .07 .02 .01 .10p(x) .40 .50 .10 1.00

Conditional Probability

Counting Techniques: PermutationsCounting Techniques: PermutationsPermutations: It is an arbitrary ordering of a number of different objects using all of them.

If we want to permute n different objects in r arrangements: The number of permutations of n different objects is the number of different arrangements in which r (r<n) of these objects can be placed, with attention given to the order of the items in each arrangement. !permutation: ( 1)( 2)...( 1)

( )!n r

nP n n n n r

n r

The number of permutations of n different objects of groups of which n_i are alike, is

1 2 3

!permutation=

! ! !...

n

n n n

If n=r, !permutation: ( 1)( 2)...( 1) !

0!n n

nP n n n n n n

Example 1Example 1 Example: with objects a, b, and c how many permutations can we do in 2 arrangements?:

ab, ac, ba, bc, ca, cb

First place: we have 3 choices.Second place we have two choice.

Altogether =3!/(3-2)!=6 permutation of three objects in two arrangements.

Example 2Example 2 Example: with objects a, b, and c we can produce six permutations:

abc, acb, bac, bca, cab, cba

First place: we have 3 choices.Second place we two choices.Third place we one choice.

Altogether 3*2*1 = 3! =6 permutation of three objects.

For n objects we get n*(n-1)*(n-2)………2*1=n! permutations

Example 3Example 3

The number of permutations of n objects consisting of groups of which n_i are alike, is

1 2 31 2 3

!permutation= , ...

! ! !...

nn n n n

n n n

The number of permutations of letters in the word “STATISTICS” =50400.

1

2

3

4

5

(number of letters) 10

(number of S's) 3

(number of T's) 3

(number of I's) 2

(number of A's) 1

(number of C's) 1

10!50400

3!3!2!1!1!

n

n

n

n

n

n

Counting Techniques: CombinationsCounting Techniques: Combinations

Combinations: The number of combinations of n different objects r at a time (n>r) is the number of different selection that can be made of r objects out of n, without giving attention to the order of arrangement within each selection.

!combination:

! ( )! !

! !

( )! !( )! ( )! !

n rn r

n n rn n r n r

n P nC

r r n r r

n P n nC C

n r n r r n r n r r

! 2 . n nn n n eStirling formula

Example 1 Example 1 Example: with objects a, b, and c we can produce six permutations:

abc, acb, bac, bca, cab, cba

3!=3*2*1=6

But three combinations:

abc=cba=acb=bca=bac=cab

3!/3!.0!=3*2*1/3*2*1=1

Example 2 Example 2 Example: Country A: 7 watersheds, and Country B: 4 Watersheds.

Five watersheds have to be selected for research 3 from A and 2 from B. How many different ways this choice can be made?

Solution:

This is a problem of combinations because the order of the watersheds is not important.

A: n= 7, r= 3B: n=4, r=2

7 3 4 2

7 3 4 2

7! 4!combinations: . . 210

4!3! 2!2!7! 4!

permutations: . . 252004! 2!

C C

P P

top related