Docsity

Probability Theory-Monte Carlo Methods-Modeling and Simulation, Slides of Mathematical Modeling and Simulation

Partial preview of the text

Download Probability Theory-Monte Carlo Methods-Modeling and Simulation and more Slides Mathematical Modeling and Simulation in PDF only on Docsity!

6/23/2012 Lecture 4:^ Nasir M Mirza^1

Monte Carlo Simulation

Room A-114,

Department of Physics & Applied Mathematics,

Pakistan Institute of Engineering & Applied Sciences, PIEAS

P.O. Nilore, Islamabad

email: [email protected]

Dr. Nasir M Mirza

Lecture Four: Probability Theory

6/23/2012 Lecture 4:^ Nasir M Mirza^2

Probability Theory

Random Events

Monte Carlo calculations are numerical stochastic process; a sequence

of random events.

Elementary Events: Those events that we can not further analyze into

simpler events. For example, results (HEAD or TAIL) of a coin flipping are

elementary events.

Compound or Composite Events: Those events that are defined from a

number of elementary events. For example, results of flipping two coins.

Random Events occur in nature. For example,

  • Scattering of electron from an atom,
  • Radioactive decay of an unstable nucleus,
  • Percolation,
  • Scattering of neutrons from solids.

6/23/2012 Lecture 4:^ Nasir M Mirza^4

Random Events

Given an elementary event with a countable set of random outcomes,

E 1 , E 2 , E 3 ,  En

k

p

Another notation for the probability of event Ek is:

There is associated with each possible outcome Ek

a number called probability, pk such that :

If the kth outcome never occurs, then probability is zero.  0.

k

p

If the kth outcome is sure to occur, then probability is one. pk ^1.

k k P (E )  p

A property: P{^ Ek and /or Ej} pk  pj

6/23/2012 Lecture 4:^ Nasir M Mirza^5

Probability

If two events Ek and Ej are mutually exclusive:

P{ E k and Ej} 0

P{ Ek or Ej} pk  pj

  1. When a whole class of events can be mutually exclusive for all i

and j then all the possible events (exhaustive set) will have following

property:

 ^1.

j

pj

4. A compound event for two elementary events will have

probability function of both the probabilities of first and

second events. It is called joint probability.

Two events Ei and Ej are mutually exclusive events if and only if the

occurance of Ei implies that Ej does not occur.

6/23/2012 Lecture 4:^ Nasir M Mirza^7

Independent Events

When the occurrence of one event does not affect whether or

not some other event happens, then these types of events are

called independent.

If events are independent, then knowing that one event has

occurred does not change our degree of belief that the other

event occur.

Two events are said to be independent if and only if any of the

following is true:

P E P E F

P E F P E P F

This can be extended to k events as

 

k

i

P E E E Ek P Ei 1

6/23/2012 Lecture 4:^ Nasir M Mirza^8

Bayes Theorem

Sometimes we start an analysis with an initial degree of belief

that an event will occur. Later on we obtain some additional

information about the event that would change our belief about

the probability that the event will occur.

The initial probability is called prior probability.

When we use new information and update our prior probability

using Bayes’ theorem we obtain the posterior probability.

Consider piston rings are purchased from two manufacturers;

60% from A and 40% from B. If we select a part at random

from supply we will have following probabilities:

P B

P A

These are prior probabilities that piston rings are from A and B.

6/23/2012 Lecture 4:^ Nasir M Mirza^10

Bayes Theorem

Now we write posterior probability as

( ) ( | ) ( ) ( | )

( ) ( | ) ( | ) P A P F A P B P F B

P A P F A P A F 

Note that we have to find two probabilities P(F|A) and P(F|B).

These are probabilities that a piston ring will fail given that it came

from the corresponding manufacturer.

This is theorem when the outcomes are only two. In general Bayes

theorem for n number of mutually exclusive events can be written

as

( ) ( | ) ( ) ( | )

( ) ( | ) ( | )

i i n n

i i i P E P F E P E P F E

P E P F E P E F  

 

6/23/2012 Lecture 4:^ Nasir M Mirza^11

The expectation of a random variable x is the stochastic mean value

and is defined as E (x):

Expected Value

j j

E (x)pj x

It is common to write this as < x >.

Consider a real-valued function: g^ (xi ) gi

Where xi are countable elementary events with probability pi. If xi is a

random variable then G(xi) is also a random variable.

The expected value of g(x) is

( ( )) ( ) ( j) j

E g x g x  pj g x

6/23/2012 Lecture 4:^ Nasir M Mirza^13

Expectation and nth Moment

From the definition of expected value of a function,

< constant > = constant

For two functions g and h with two constants,

< ag(x) + bh(x) > = a<g(x)> + b<h(x)>

For a linear function g(x):

< g(x) > = g()

The nth moment of x is defined as

n j j

j

n  x  p x

j j

The First moment of x is  x^  pj^ x

2 2 j j

The second moment of x is x^ pj^ x

  • 6/23/2012 Lecture 4: Nasir M Mirza