Docsity

Understanding Probability Theory: Elementary & Compound Events, Conditional Probability, M, Slides of Computational Physics

Partial preview of the text

Download Understanding Probability Theory: Elementary & Compound Events, Conditional Probability, M and more Slides Computational Physics in PDF only on Docsity!

Stochastic Methods

Topic: Probability Theory

Dr. Nasir M Mirza

Computational Physics^ Computational Physics

Email: [email protected]

Lecture Five:

Probability Theory

Monte Carlo Methods^ Monte Carlo Methods

Probability^ Probability

is a measure of the likelihood that some event will occur. It is

always in range of 0 and 1. Suppose that an event E can happen in h ways out of total n possible ways,then the probability of occurance

of the event E (also called success) is

p = Pr{E} = h/n The probability of non-occurrence of event E is given as q: q = Pr{not

E} = (n –

h)/n

= 1 –

p = 1 –

Pr{E}

Thus, p + q = 1^ Example:^ Let E is number 3 in a single toss of a die. There are six ways in which adie can fall; so Pr{E} = 1/6.

Conditional Probability If there are two events E

1

and E

, then probability that E 2

2

occurs given that E

1

has occurred is called

conditional probability:

It is denoted as Pr{E

2

| E

} or Pr{E 1

2

given E

}. 1

If the occurrence of E

1

does not effect the occurrence of E

, then the 2

conditional probability reduces to only Pr{E

} and such events are called 2

independent events.

Pr{E2 | E1} = Pr{E2}

(for independent events)

If there are two events E

1

and E

, then E 2

E 1

2

means both E

1

and E

2

occur.

Such events are called

compound events. Then probability for compound

events can be written as

Pr{E

2

E

} 1 = Pr{E

} Pr{ 1

E

2

| E

} 1

And for independent events,

Pr{E

2

E

} 1 = Pr{E

} Pr{ 1

E

} 2

Docsity.com

Mutually Exclusive Events If there are two events E

1

and E

2 , then E

1

+ E

2

means E

1

or E

2

or

both occur.

Then probability for E

1

+ E

2

events can be written as

Pr{E

1

+ E

2

}^

= Pr{E

  • Pr{ E2} -

Pr{E

2

|E

When these are mutually exclusive events, then

Pr{E

2

E

1

}^

That means

the occurrence of any one of them excludes the occurrence of

the other. So,

Pr{E

1

+ E

2

}^

= Pr{E

  • Pr{ E

(for mutually exclusive events)

Mutually Exclusive Events Example: A ball is drawn at random from a box containing 6 red balls, 4 whiteballs and 5 blue balls. Find probability that a ball drawn is (a) red, (b)white, (c) blue (d) red or white. Let R, W, B denote the events of drawing red, white and blue ballrespectively. Then Pr{R} = (ways of choosing a red ball)/(total ways of choosing a ball) Pr{R} = 6/(6 + 4 + 5) = 6/15 Pr{W} = 4/(6 + 4 + 5) = 4/15 Pr{B} = 5/(6 + 4 + 5) = 5/15 Pr{ R + W} = (ways of choosing red or white ball)/Total = (6 + 4)/15 = 10/15 Pr{R

  • W} = Pr{R} + Pr{W} = 6/15 + 4/15 = 10/15 for mutually exclusive events.

Probability Distributions Continuous distributions: If a variable X can assume continuousvalues and the respective probabilityvalues are also continuous then we say acontinuous probability distribution hasbeen defined. The function p(X) is called

continuous

probability density function

and

probability that X lies between and b isgiven as shaded area under the curve forp(X). The X is called continuous randomvariable.

a

b

p(X)

X Docsity.com

Probability Distributions

**-

-**

0

1

2

3

4

5

6

0.7 0.6 0.5 0.4 0.3 0.2 0.1 0. p(X)

X-values

EXAMPLE:

A continuous random

variable X has values between 0 and 4and has a density function given by p(X) =0.5 –

aX

where a is constant.

Find Pr{ 1 < X < 2 }.

(^

)

4 0

2

4 0

4 0

∫

∫

a

a

aX

X

dX

aX

dX

X

p

(^

)

(^21)

2

2 1

2 1

∫

∫

X

X

dX

X

dX

X

p

Solution:

For a, we know that total

probability is one. So, we integrate thedensity function from 0 to 4 and equateit to one:

Then we find Pr{1

Estimating Average Values^ Example:^ Flipping of a coin has been done. Assign 1 to the event of gettinghead and 0 to the event of getting tail. Using two differentfunctions g(x) and h(x) let us find the expected values.

Events

p

i^

x

i^

g(x)

h(x)

HEAD
TAIL

x

x

g

3

1

)

(

=

x

x

x

h

=

1

3 1 ) ( 2 / 1

>=

<

x

2 / 5

) (

>=

<

x g

2 / 3

) (

>=

<

x h

nth Moment^ The nth moment of x is defined as

n j

j

j

n^

x

p

x

āˆ‘

>=

<

j

j

j^

x

p

x

āˆ‘

>=

<

The First moment of x is

2

2

j

j

xj

p

x

āˆ‘

The second moment of x is

Nth moment

First moment = m

1 = c

Ī£

fu /N = (3)(15)/(100) = 0.

Second moment = m

2 = c

2 Σ

fu

2

/N = (9)(97)/(100) = 8.

Third moment = m

(^3) = c

3 Σ

fu

3

/N = (27)(33)/(100) = 8.

First moment = m

4 = c

4 Σ

fu

4

/N = (81)(253)/(100) = 204.

Moments & Variance

The Central Moments The Central moments of x are defined as The second central moment has a particular meaning:

This is also called variance of x.

n

i

n x

x

p

x

x

x g

)

(

)

(

) (

>

< āˆ’

=

> > < āˆ’ < = > <

āˆ‘

2

2

2

2

2

2

āˆ‘ āˆ‘

x

x

x

x p

x

x

p

x

x

i

i

i

i

i

i

i

2

2

var{

x

x

x

}

var{

x

±

The standard deviation of x is

Covariance & Correlation

The covariance is a measure of the independence of two randomvariables x and y:

> < > < āˆ’ > < = y x y x y x

}

,

cov{

Zero

covariance

does

not

imply

independence

of

random

variables.

Another

quantity

related

to

covariance

is

the

It is equal to zero when x and y are independent. Also,correlation coefficient:

}

var{

} ,

cov{

2

2

x

x

x

x x

=

> < āˆ’ > < =

}

var{ }

var{

}

,

cov{

)

, (

y

x

y

x

y

x

=

Its value is in between -1 and +1. Monte Carlo calculations try totake

advantage

of

the

negative

correlation

as

a

measure

of

reducing the variance.