Date post: | 16-Dec-2015 |
Category: |
Documents |
Upload: | yasmin-sheriff |
View: | 238 times |
Download: | 2 times |
1
OutlineOutline
input analysis input analyzer of ARENA parameter estimation
maximum likelihood estimator
goodness of fit randomness independence of factors homogeneity of data
2
Topics in SimulationTopics in Simulation
knowledge in distributions and statistics random variate generation input analysis output analysis verification and validation optimization variance reduction
3
Input AnalysisInput Analysis
statistical tests to analyze data collected and to build model standard distributions and statistical tests estimation of parameters enough data collected? independent random variables? any pattern of data? distribution of random variables? factors of an entity being independent from each other? data from sources of the same statistical property?
4
Input Analyzer of ARENAInput Analyzer of ARENA
which distribution to use and what parameters for the distribution
Start /Rockwell Software/Arena 7.0/Input Analyzer
Choose File/New Choose File/Data File/Use Existing to open
exp_mean_10.txt Fit for a particular distribution, or Fit/Fit All
5
Criterion for Fitting in Input AnalyzerCriterion for Fitting in Input Analyzer
n: total number of sample points ai: actual # of sample points in ith interval
ei: expected # of sample points in ith interval
sum of square error to determine the goodness of fit
2
2)-(
n
eai
ii
2
i
ii
n
e
n
a
6
pp-values in Input Analyzer-values in Input Analyzer
Chi Square Test and the Kolmogorov-Smirnov Test in fitting
p-value: a measure of the probability of getting such a
set of sample values from the chosen distribution
the larger the p-value, the better
7
Generate Random Variates Generate Random Variates by Input Analyzerby Input Analyzer
new file in Input Analyzer Choose File/Data file/Generate New select the desirable distribution
output expo.dst changing expo.dst to expo.txt
8
Parameter EstimationParameter Estimation
two common methods maximum likelihood estimators method of moments
9
Idea of Idea of Maximum Likelihood EstimatorsMaximum Likelihood Estimators
a coin flipped 10 times, giving 9 heads & then 1 tail best estimate of p = P(head)? let A be the event of 9 heads followed by 1 tail
p 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
P(A|p) 0 0 0 0.000 0.001 0.004 0.012 0.027 0.039
p 0.8 0.825 0.85 0.875 0.9 0.925 0.95 0.975
P(A|p) 0.027 0.031 0.035 0.038 0.039 0.037 0.032 0.02
10
Maximum Likelihood EstimatorsMaximum Likelihood Estimators
let be the parameter to be estimated from sample values x1, ..., xn
set up the likelihood function in choose to maximize the likelihood function
)()...()(1
nxx ppL✦ discrete distribution:
where {pi} is the p.m.f. with parameter
);()...;()( 1 nxfxfL✦ continuous distribution:
where f(x; ) is the density at x with parameter
11
Examples of Examples of Maximum Likelihood EstimatorsMaximum Likelihood Estimators
Bernoulli Distribution Exponential Distribution
12
Method of Moments Method of Moments
kth moment of X: E(Xk) two ways to express moments
from empirical values in terms of parameters
estimates of parameters by equating the two ways
Examples: Bernoulli Distribution, Exponential Distribution
13
Goodness-of-Fit TestGoodness-of-Fit Test
Is the distribution to represent Is the distribution to represent
the data points appropriate?the data points appropriate?
14
General Idea of Hypothesis TestingGeneral Idea of Hypothesis Testing
coin tosses H0: P(head) = 1
H1: P(head) 1
tossed twice, both being head; accept H0? tossed 5 times, all being head; accept H0? tossed 50 times, all being head; accept H0? to believe (or disbelieve) based on evidence internal “model” of the statistic properties of the
mechanism that generates evidence
15
Theory and Main Idea of Theory and Main Idea of the the 22 Goodness of Fit Test Goodness of Fit Test
(X1, X2, ..., Xk) ~ Multinomial (n; p1, p2, ..., pk)
2
1
2
1)(
knk
i i
iik np
npXQ
16
Goodness-of-Fit TestGoodness-of-Fit Test
test the underlying distribution of a population H0: the underlying distribution is F
H1: the underlying distribution is not F
Goodness-of-Fit Test n sample values x1, ..., xn assumed to be from F
k exhaustive categories for the domain of F oi = observed frequency of x1, ..., xn in the ith category
ei = expected frequency of x1, ..., xn in the ith category 2
11
22 ~
)(
k
k
i i
ii
e
eo
17
Goodness-of-Fit TestGoodness-of-Fit Test
“better” to have ei = ej for i not equal to j
for this method to work, ei 5
choose significant level decision:
if , reject H0; otherwise, accept H0.22
18
Example: The lives of 40 batteries are shown below.
Goodness-of-Fit TestGoodness-of-Fit Test
Category i: Frequency oi
1.45-1.95 2
1.95-2.45 1
2.45-2.95 4
2.95-3.45 15
3.45-3.95 10
3.95-4.45 5
4.45-4.95 3
Test the hypothesis that the battery lives are approximately normally distributed with μ = 3.5 and σ = 0.7.
19
Solution: First calculate the expected frequencies under the hypothesis:
Goodness-of-Fit TestGoodness-of-Fit Test
For category 1: P(1.45 < X < 1.95)
= P[(1.45-3.5)/0.7 < Z < (1.95-3.5)/0.7]
= P(-2.93 < Z <-2.21)
= 0.0119.
e1 = 0.0119(40) 0.5.
Similarly, we can calculate other expected frequencies:
ei: 0.5 2.1 5.9 10.3 10.7 7.0 3.5
20
Since some ei’s are smaller than 5, we combine some categories and get the following
Goodness-of-Fit TestGoodness-of-Fit Test
Category i: Frequency oi Frequency ei
1.45-2.95 7 8.5
2.95-3.45 15 10.3
3.45-3.95 10 10.7
3.95-4.95 8 10.5
Similarly, we can calculate other expected frequencies:
ei: 0.5 2.1 5.9 10.3 10.7 7.0 3.5
21
calculate statistics: 24
2
1
( )3.5.i i
i i
o e
e
Goodness-of-Fit TestGoodness-of-Fit Test
set the level of significance: = 0.05. degrees of freedom: k-1=3.
20.05 7.815.
accept because 22
22
Test for RandomnessTest for Randomness
Do the data points behave like
random variates from i.i.d.
random variables?
23
Test for RandomnessTest for Randomness
graphical techniques run test (not discussed)
run up and run down test (not discussed)
24
BackgroundBackground
random variables X1, X2, …. (assumption Xi constant)
if X1, X2, … being i.i.d. j-lag covariance Cov(Xi, Xi+j) cj = 0
V(Xi) c0
j-lag correlation j cj/c0 = 0
25
Graphical TechniquesGraphical Techniques
estimate j-lag correlation from sample check the appearance of the j-lag correlation
jn
xxxxc
jn
ijii
j
1))((
ˆ1
)(ˆ 1
2
2
n
xxs
n
ii
n