Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Pramod Parajuli

Simulation and Modeling, CS-331

Chapter 6
Probability Concepts

a l
ep
itn
1
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

1
Stochastic Variables

-Ordered set of random values


-Stochastic process give rise to stochastic variable
-Stochastic process can be discrete or continuous

a l
ep
itn
2
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

2
Discrete Probability Functions

Probability Mass Function (PMF)


-Distribution of probabilities
-If a variable can take n different values xn (n = 1, 2, 3, …
N), and probability of xn being take is p(xn), then the set
of numbers comprise of p(xn) is probability mass function
N

∑ p( x ) = 1
n =1
i

-In certain cases like dice roll, the PMF values may be
known (e.g. 1/6). But most of the time, PMF is counted
from input sample

a l
ep
-Example – table 6-1

itn
3
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

3
Discrete Probability Functions

Cumulative Distribution Function (CDF)


-For a continuous variable, probability of any one specific
value occurring is considered logically to be zero
F ( x) = P(−∞ < X ≤ x)
F ( x) = P( X ≤ x) F (−∞) = 0
gives : 0 ≤ F ( x) ≤ 1 F (+∞) = 1
-Let f(x) is PDF and the probability that ‘x’ falls in the
range x1 to x2 is given by
x2 ∞
= ∫ f ( x)dx = ∫ f ( x)dx = 1

a l
x1 −∞

ep
itn
4
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

4
Discrete Probability Functions

Cumulative Distribution Function


-As we have seen already, value of ‘infinity’ is
implementation dependent
-But, the cumulative distribution function (CDF) will be
x
F ( x) = ∫ f ( x)dx
−∞

gives,0 ≤ F ( x) ≤ 1

-Therefore, probability of x falling in the range x1 to x2 is,

l
F(x2) – F(x1)

a
ep
itn
5
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

5
Discrete Probability Functions

Probability Density
-If,
P( x < X ≤ x + ∆x) = f ( x).∆x
then,
P( x < X ≤ x + ∆x)
f ( x) =
∆x
is said to be probability density/density function in
continuous system

In discrete system, it is called frequency function

a l
ep
itn
6
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

6
Measure of Probability Functions

Mean (Expectation)
N
1
mean =
N
∑x
i =1
i xi (i = 1,2,3,4,...., N )

If observation fall into I groups i.e. xi element have


ni occurrences I
1 I
m = ∑ ni .xi m = ∑ p ( x).xi
N i =1 i =1

For continuous variable;



∑ (aX ) = a∑ ( x)
m= ∫ x. f ( x)dx

l
∑ (x + x ) = ∑ (x ) + ∑ (x )

a
ep
−∞ 1 2 1 2

itn
7
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

7
Measure of Probability Functions

Mean (Expectation)
-Most of the times, the selection of expectation has no
occurrence in the sample
-Therefore, it is better to take the nearest sample
-Note; if a value is being multiplied in future, then it must
not be corrected. Only after the multiplication it should
be corrected. (example)
Mode
Peak probability density function
Median
-Half of the random values will fall below this point

a l
ep
-Normally, cumulative function, F(x) = 0.5

itn
8
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

8
Measure of Probability Functions

Variance
-Standard deviation
-Measure of the degree to which data are dispersed from
the mean value
-Computed as +ve square root of variance
1/ 2
 1 N
2
s= ∑ (m − xi ) 
 ( N − 1) i =1 
-If I-groups
1/ 2
 I
2
s = ∑ p ( xi ).(m − xi ) 

a l
 i =1 

ep
itn
9
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

9
Measure of Probability Functions

Variance
-For continuous

s= ∫ f ( x) x dx − m
2 2

−∞

-If mean ‘m’ and data are at same point, standard


deviation = 0

a l
ep
itn
10
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

10
Measure of Probability Functions

Coefficient of Variance
s tan dard − deviation
mean − value
-Better than variance as it is expressed in relative terms

Auto-correlated
-All the data are supposed to be independent of each
other
-But if data at ith step is related to previous data using any
kind of relationship they are said to be auto-correlated

l
-In such case, only the ‘mean’ holds the meaning, others

a
ep
do not

itn
11
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

11
Numerical Evaluation of probability functions

-Required for random number generation


-For computation, numerical methods required
Representation
-Frequency distribution
-Relative frequency distribution
If xi < x ≤ xi +1 xi +1

then relative frequency distribution= pi = ∫ f ( x)dx


xi
pi
density function =
( xi +1 − x i )

a l
n
Fn = ∑ pi

ep
For cumulative
i =0

itn
12
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

12

You might also like