Upload
alban-goodwin
View
217
Download
0
Embed Size (px)
DESCRIPTION
CSE 474 Simulation Modeling | MUSHFIQUR ROUF Experiment –A process whose outcome is not known with certainty –Throwing a die Sample Space, S –Set of all outcomes –{1, 2, 3, 4, 5, 6} Sample Point –Each outcome in a sample space
Citation preview
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
CSE474: Simulation and ModelingChapter 4
Review of Basic Probability and
StatisticsMushfiqur [email protected]
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Why• How to model a probabilistic system• Validate a simulation model• Choose an input probability distributions• Generate random samples from these
distributions• Perform statistical Analyses of the simulation
output data
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Experiment• Experiment
– A process whose outcome is not known with certainty
– Throwing a die• Sample Space, S
– Set of all outcomes – {1, 2, 3, 4, 5, 6}
• Sample Point– Each outcome in a sample space
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Random Variable• A function that assigns a real number to each
point in sample space S.– If X = “number of heads” in an experiment of
rolling a pair of dice.– Then X assigns 5 to {4, 1}, {3, 2}, {2, 3}, {1, 4}
• Discrete: if it can take countable number of different values
• Continuous: it can take any value
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Probability Distribution Function
• Or, cumulative distribution function• F(x) of random Variable X
– X: random variable name– x: value taken
• F(x) = P(X<=x) for –∞ < x < ∞• Properties
– 0 <= F(x) <= 1– F(x) is nondecreasing– and1)(lim
xF
x0)(lim
xF
x
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Probability Distribution Function
• X can take values – x1, x2, …, xn,
• Probability mass function “probability that x equals to xi”
p(xi) = P(X = xi)
1)(1
iixp
bxai
i
xpIX
baI
)()P(],,[ If
xx
ii
xpx )()F(
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Probability Distribution Function
1/61/31/2
0 1 2 3 4 x
p(x)
0 1 2 3 4 x
1
1/61/31/2
F(x)1
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Continuous Random Variable
• X is a continuous random variable if probability density function
f(x) is nonnegative
B
dxxfBXP )()(
1)(
dxxf
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Continuous Random Variable
• f(x) is not the probability that X=x
• X is more likely to fall in an interval I
0)(]),[()( x
xdyyfxxXPxXP
)()()()( aFbFdyyfIXPb
a
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Continuous Random Variable
• Distribution function F(x)– Area under the curve f(x)
xdyyfxXPxF )(]),(()(
f(x)
x
F(x) = P(X [-, x]) f(x)
b
P(X [a, b])
= F(b) – F(a)
a x
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Uniform Random Variable
01
)(xf0 <= x <= 1
otherwise
1 x0
1f(x)
1 x0
1F(x)U[0,1]
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Joint Probability Mass Function
• p(x, y) = P(X = x, Y = y)• X and Y are
independent if p(x, y) = px(x) py(y)
xY
yX
p(x,y)yp
p(x,y)xp
all
all
)(
)(
027),(xy
yxp
Calculate if X and Y are independent
For x = 1, 2 and y = 2, 3, 4
otherwise
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Jointly Continuous• Joint probability density function
• X and Y are independent if
B A
dydxyxfBYAXP ),(),(
)()(),( yfxfyxf YX
dxyxfxf
dyyxfxf
Y
X
),()(
),()(
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Mean or Expected Value
n
iii
n
iii XEcXcE
11
• E(cX)=cE(X)
dxxxf
xpx
i
i
X
jjXj
i1
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Median• Smallest value of x such that FXi (x) >= 0.5
median
F(median) = 0.5
area = 0.5
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Variance 2222 ][)Var( iiiiii XEXEX
μ μ
σ2 largeσ2 small
Calculate Mean and Variance of U[0,1]
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Standard Deviation• σi = √(σi
2)• Useful with Normal distribution
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Covariance• Dependence between two random variables
• Cij = 0 means Xi and Xj are uncorrelated• Cij > 0 means Xi and Xj are positively correlated• Cij < 0 means Xi and Xj are negatively correlated
jijijii
ij
ji
XXEXjXE
C
XXCov
,
CSE 474 Simulation Modeling | MUSHFIQUR ROUF [email protected]://groups.google.com/group/cse474spring07/ http://faculty.bu.ac.bd/~rouf/cse474
Correlation
)Var()Var(),Cov(
,Cor
22
ji
ji
ji
ijij
ji
XXXX
C
XX
• Covariance is not dimensionless, – makes interpretation troublesome