INDUSTRIAL SYSTEMS SIMULATION

EMGT 5410 INDUSTRIAL SYSTEMS SIMULATION
SPRING 2017
Homework 2
Due: 4/7/2017 Friday in Class
There are 100 observations for the service time of a drive-through restaurant. The data observations
are provided in the Excel files named “HW2”. Use these raw data to complete the following
questions.
a) Use Excel Analysis ToolPak to find the “descriptive statistics”. (5 points)
b) Use Excel to find the time series plot and give your comments. (5 points)
c) Use Excel to make scatter plots for x(t) vs x(t+1), and x(t) vs x(t+2), and give your
comments. (10 points)
d) Use Excel to make a histogram plot using default interval width by Excel. (10 points)
e) Use Excel to plot P-P plot for the hypothesized exponential distribution with mean of 94
and give your comments. (10 points)
f) Use Excel to plot P-P plot for the hypothesized normal distribution with mean of 96.8 and
standard deviation of 102 and give your comments. (10 points) (Hint: you can use
formula NORM in Excel for calculation of CDF of normal distribution)
g) Use Excel to plot Q-Q plot for the hypothesized exponential distribution with mean of 94
and give your comments. (10 points)
h) Use Excel to plot Q-Q plot for the hypothesized normal distribution with mean of 96.8 and
standard deviation of 102 and give your comments. (10 points) (Hint: you can use
formula NORMINV in Excel for calculation of inverse CDF of normal distribution)
i) Use Arena Output Analyzer to generate histogram plot with 12 intervals. (5 points)
j) Use Arena Output Analyzer to generate time series plot and give your comments. (5 points)
k) Use Arena Output Analyzer to generate autocorrelation plot up to 10 steps and give your
comments. (5 points)
l) Use Arena Input Analyzer to find the Chi-Square and KS test statistics to check the
goodness if we fit the data to exponential distribution. Give your conclusion about the
goodness of fit based on p-value by a given alpha of 0.05 (10 points)
m) Use Arena Input Analyzer to fit the data to all distributions and find the ranked distribution
based on squared error. (5 points)
For questions a)-h), you need to solve them using Excel in the Excel file where the raw data are
provided. In addition to the sheet “raw data”, there are also sheets a, b, c, d, e, f, g, and h. Use these
sheets to address each of the questions from a) to h).
For questions i)-m), you need to use Arena Output/Input Analyzer to solve them. The path you
need to follow to find Input and Output Analyzer if you use the PC in the classroom: C:\Program
Files(X86)\Rockwell Software\Arena\Input; C:\Program Files(X86)\Rockwell
Software\Arena\Output
You need to prepare a Word file including the solutions to all these questions. For a)-h), you need
to provide all the required plots, statistics, and comments. For i)-m), you need to provide the plot
or snapshot and your comments.
2
You need to submit the hardcopy of this Word file and the electronic file of the Excel
including raw data and detailed procedure for questions a)-h). Hardcopy is due in April 7th
(Friday) class. The electronic Excel file is due 8:00AM, April 7th
.
Email me the Excel file. Use the following format to name this Excel file:
EMGT5410_HW2_LAST NAME_First Name

12.
EMGT 5410
Industrial System Simulation
Input Analysis in Simulation
Instructor: Dr. Zeyi Sun
Department of Engineering Management and Systems
Engineering
Missouri University of Science and Technology
Email: sunze@mst.edu
Office: Engineering Management 216
Phone: 573-341-7745
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 1
Objectives
• To be able to model probability distributions
based on collected data for simulation input
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 2
Schedule
• Input Modeling Procedure
• Graphical & Statistical Analysis
• Hypothesize Distribution & Goodness Test
• Hands-on Practice
– LOTR MAKERS, INC.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 3
Input Modeling
Procedure
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
4
Why is Input Modeling Important?
• Different distributions lead to different results
• Manufacturing system throughput example
– Mean time between failure (MTBF)
– Mean time to repair (MTTR)
MTBF MTTR Throughput (95% CI)
Exponential Exponential (587, 598)
Gamma Exponential (577, 586)
Weibull Normal (581, 591)
Normal Normal (567, 576)
Different distributions > Different results
Beware of GIGO (Garbage-in = Garbage-out)
5
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
General Input Modeling Procedure
• Documenting the process being modeled
• Developing a plan for collecting data
• Collecting data
• Graphical and statistical analysis of the data
• Hypothesizing distribution
• Estimating parameter
• Checking goodness of the fit for hypothesized
distribution
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 6
Documenting Process
• Describe the process being modeled
• Define the random variables to be collected
– Find the source of the randomness
– What is your input and what is your output
– Don’t model output data
• E.g., in pharmacy model, random variable needs to be
collected is the service time/customer arrival time, rather
than the length of the queue/pharmacist busy time
– If service time is collected, define when service
starts and ends
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 7
Developing Collection Plan
• Analyze data source availability
– Scenario 1: Good data collected and available
– Scenario 2: Too much data
• Not clear whether it is all applicable
• Simplify & stratify
– Scenario 3: Not enough data
• Collect more, estimate
– Scenario 4: Use expert opinion
• Limited time for data collection
• Process doesn’t exist yet
• Develop a sampling plan
• Describe how to collect data
• Perform a pilot run of the plan
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 8
Collecting Data
• What methods can be used
– Time study analysis
– Historical records
– Automatically collected data
• What needs to be beware of:
– Data homogeneity
– Data censoring
– Possible autocorrelation
– Intermediate reality checks
• Use histograms, scatter plot to check for relationship between two variables
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 9
Graphical and Statistical Analysis
• Graphical analysis
– Histogram
– Time series plot
– Autocorrelation plot
• Statistical Analysis
– Sample mean
– Sample variance
– Minimum and Maximum
– Quartile
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 10
Hypothesizing Distribution
• Hypothesize the possible distribution for the data
– From the understanding from graphical or statistical analysis
– From common knowledge about the application of random distribution
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 11
Distribution Common Modeling Situation
Uniform When you have no data; Everything is equally likely to occur within an interval; Task times
Normal Modeling errors; Modeling measurement, length, etc.; Modeling the sum of a large number of
random variables
Exponential Time to perform a task; Time between failure; Distance between defects
Erlang Service times; Multiple Phases of service with each phase exponential
Weibull Time to failure; Time to complete a task
Gamma Repair times; Time to complete a task
Lognormal Time to perform a task; Quantities that the product of a large number of other quantities
Triangular Rough model in the absence of data; Assume a minimum, a maximum, and a most likely value
Beta Useful for modeling task times in bounded range with little data; Modeling probability as a
random variable
Estimating Parameters
• Once possible distribution in mind we need to estimate
the parameters of those distribution so that we can
analyze whether the distribution provides a good
model for the data
• Arena Input Analyzer can be used
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 12
Checking Goodness
• Assess whether the hypothesized probability
distributions provide a good fit for the data
• This can be done both graphically or statistically
• Graphically: P-P plots, and Q-Q plots
• Statistical test: Chi-square test, Kolmogorov-Smirnov
test, sum of squared error criteria
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 13
Graphical & Statistical
Analysis
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
14
15
Example: Service times for the pharmacy
• 100 data points of
service time are
collected
• Service times are
positive quantities
• Unit of measure is
second
61 278.73 194.68 55.33 398.39
59.09 70.55 151.65 58.45 86.88
374.89 782.22 185.45 640.59 137.64
195.45 46.23 120.42 409.49 171.39
185.76 126.49 367.76 87.19 135.6
268.61 110.05 146.81 59 291.63
257.5 294.19 73.79 71.64 187.02
475.51 433.89 440.7 121.69 174.11
77.3 211.38 330.09 96.96 911.19
88.71 266.5 97.99 301.43 201.53
108.17 71.77 53.46 68.98 149.96
94.68 65.52 279.9 276.55 163.27
244.09 71.61 122.81 497.87 677.92
230.68 155.5 42.93 232.75 255.64
371.02 83.51 515.66 52.2 396.21
160.39 148.43 56.11 144.24 181.76
104.98 46.23 74.79 86.43 554.05
102.98 77.65 188.15 106.6 123.22
140.19 104.15 278.06 183.82 89.12
193.65 351.78 95.53 219.18 546.57
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Common Statistics
• Sample average, sample variance
• Coefficient of variation
• Skewness
• Kurtosis
• Order statistics
• Median
16
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Coefficient of Variation
17
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Skewness
18
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Kurtosis
19
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Order Statistics, Quartiles, Median
20
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Correlation
• The correlation of two random variables measures the
strength of linear association. Range [-1,1]
– Negative correlated
• X tends to be high, then Y will tend to be low, or alternatively
– Positive correlated
• X tends to be high, then Y will tend to be high, or alternatively
• If X and Y are independent random variable, the correlation
between is zero (the converse is not necessarily true)
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 21
cov[X,Y] [X,Y] [X] [ ]
cor
V VY u
22
Autocorrelation
2
cov[X ,X ] cov[X ,X ] [X ,X ] [X ] [X ]
i ik i ik
k i ik
i ik
cor
V V U
V
 


u
The autocorrelation between two data series (actually they are k
steps apart from the same data series)
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
23
Covariance Stationary
Consider out sample as a sequence of observations ordered by observation
number, X X Xn , , 1 2 . A time series, X X Xn , , 1 2 is said to be covariance
stationary if:
x The mean exists and > @ T E Xi , for i 1,2,, n
x The variance exists and > @ 2 Var Xi V > 0, for i 1,2,, n
x The lag-k autocorrelation, ( , ) k Xi Xi k cor U  , is not a function of i , i.e.
the correlation between any two points in the series does not depend
upon where the points are in the series, it depends only upon the
distance between them in the series.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
cov( , ) [( [ ])( [ ])] [ ] [ ] [ ] X Y E X E X Y E Y E XY E X E Y   
Example
Find the sample average, sample variance
coefficient of variation, skewness, kurtosis, order
statistics, and median for the data series 1, 8, 5,
6, 9, 12, 3
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
24
Add Data Analysis Tool to Excel
• File>Options>Add-Ins
• In the lower part of the diaglog box, find Manage:
Excel Add-ins, click “GO”
• Select “Analysis ToolPak” , click “OK”
• Then, under Menu “Data”, you can find “Data
Analysis” button on the right most
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
25
Analysis Tool Pak>Descriptive Statistics
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
26
27
Summary Statistics
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
28
Analysis Tool Pack – Histogram
• Data Analysis Tool pack>Histogram
• Divide the range of the data into disjoint, adjacent equally
spaced intervals
– Define disjoint and adjacent intervals
– Range/number of desired classes k
– Width of interval:
• Too larger->Block like
• Too small->Ragged shape
• Two rules for k: k=sqrt(n), or k=floor function (1+log2n), n is the number of
observations
• Tabulate count (or %) in each interval
• Look for shape of common distributions and modality of
distribution
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
29
Histogram Configuration in Excel
• Input Range: The raw data
• Bin Range: Interval number and interval width
– Excel default defines: a set of evenly distributed bins between
the data’s minimum and maximum values.
• Output Range:
Histogram
0
10
20
30
40
50
36.84
111.378
185.916
260.454
334.992
409.53
484.068
558.606
633.144
707.682
More
Bin
Frequency
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering Missouri
University of Science and Technology
30
Time Series Plot
• Plot the value of observations versus the observation times
• Look for trends with respect to time
• Examine the dependency
• No definite pattern here. Looks to be stationary
Time Series Plot
0
200
400
600
800
1000
1 9 17 25 33 41 49 57 65 73 81 89 97
Observation Number
Service Time
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
31
Scatter Plot
• Scatter plot of x(t) vs x(t+1)
• Is there a line?
– A line indicates lag-1 correlation
• No readily apparent line in this scatter plot
• Check for independence Scatter Plot
0
100
200
300
400
500
600
700
800
900
0 200 400 600 800 1000
X(i)
X(i+1)
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Using Arena Output Analyzer for Plotting
• Graphical plots can also be made by Output
Analyzer
– Time Series Plot
– Histogram
– Autocorrelation Plot
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 32
Load Data File into Output Analyzer
• Create a text file with one column of counting the
observations and another column representing the
observation values
• Open the Output Analyzer and start a new data group,
Use File>Data File>Load ASCII File
• Use Browse import source text file
• Use Browse to create a data file
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 33
Example: Time series Plot
• Menu Graph>Plot
• Add the Data File
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 34
Time series Plot
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 35
Example: Histogram
• Menu Graph>Histogram
• Specify Data File
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 36
Histogram
• Output Analyzer Histogram
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 37
Example: AutoCorrelation
• Menu Analyze >Correlogram
• Find the data file
• Maximum lag: 10
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 38
AutoCorrelation
• Correlogram from Output Analyzer
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 39
40
Independence
• Independence is
indicated if lag-k
correlations are
distributed near 0.0
with no discernable
pattern
• From this plot the
data look to be
independent.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Hypothesize Distribution
& Goodness Test
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
41
Hypothesize Possible Distributions
• Is the process… ?
– Discrete or continuous
– Bounded or without a natural bound
• One-sided
• Two-sided
– Based on specific assumptions (e.g., memory-less)
– Usually modeled by a certain well-known
distribution
42
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Using Arena’s Input Analyzer
• A separate program that can be executed outside
the Arena Environment
• Can be accessed by the start Menu in the Arena
folder
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 43
44
Arena’s Input Analyzer
• Allows histograms to be made
with different cell sizes
• Tabulates basic statistics
• Fits distributions to the data,
performs hypothesis tests,
recommends a distribution.
• From the histogram, the data
look somewhat exponential
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
45
Input Analyzer
• Possible distributions: Beta, Erlang, Exponential,
Gamma, Lognormal, Normal, Triangular, Uniform,
Weibull, Empirical, Poisson
– Poisson is only discrete distribution.
• Uses algorithms (e.g. maximum likelihood estimation)
to fit the distributions parameters.
• Tabulates chi-squared goodness of fit test statistic,
Kolmogorov-Smirnov Test, and sum of squared error
criteria
– Can fit one distribution at a time or all distributions
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Testing the Distribution
• Evaluate the chosen distribution and associated
parameters for goodness-of-fit.
– Chi-Square (histogram)
– Kolmogorov-Smirnov
• If the fit is poor, back to picking distribution family
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 46
?2 Goodness of Fit Test
• ?2 test divides the range of the data into k intervals and
test whether the number of observations that fell in
each interval is close to the expected number that
should fall in the interval given the hypothesized
distribution
• Ni
: the observed number of observations that fell in ith
interval
• pi
: theoretical probability of being in that ith interval
• n: the number of observations
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 47
2
2
1
( ) k
i i
i i
N np
np
F
 ¦
Visualizing ?2 Goodness of Fit Test
x
Counts of x
(actual &
expected)
theoretical
observation
Overlapping Histograms
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 48
?2 Decision Criteria
• For large n, an approximate 1-a level test can be
performed based on a chi-squared test statistic that
rejects the null hypothesis if
F!F
(k-1-s),1-D
where s is the number of estimated parameters
• Use p-value
– If p-value> a, do not reject H0
• The hypothesized distribution looks fine
– If p-value< a, reject H0
• The hypothesized distribution is NOT good enough
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 49
50
Histogram with Exponential Distribution
Overlay
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 51
Kolmogorov-Smirnov (K-S) Test
• K-S test compares the hypothesized distribution, to the
empirical distribution and does not depends on
specifying intervals for tabulating the test statistic
• The empirical distribution is defined as:
• It represents the proportion of the X’s that are less than
or equal to the ith order statistic
• The continuity correction is often used
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 52
( ) ( ) n i
i F x
n
( ) ( ) i F (
( )
0.5 ( ) n i
i F x
n
 ( ) ( ) i F (
K-S Test Statistics
• K-S Statistic Dn is calculated
• A large value for the K-S test statistic indicates a poor fit
between the empirical and hypothesized distribution
• Use p-value to determine if the null hypothesis should be
rejected or not
– The null hypothesis is that the observations are from the
hypothesized distribution
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 53
( ) 1
( ) 1
max{ , }
max{ ( )} ˆ
1 max{ ( ) } ˆ
n nn
n i i n
n i i n
D DD
i D Fx
n
i D Fx
n
 

d d

d d


 
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 54
55
Trying the Exponential Distribution
• Chi-squared test is based on
intervals used to display
histogram
– Important to vary number of
intervals
• K-S Test is based on the largest
vertical distance between the
hypothesized distribution and
the empirical distribution over
the range of the distribution
• Reject hypothesis if p-value is
small
Distribution Summary
Distribution: Exponential
Expression: 36 + EXPO(147)
Square Error: 0.003955
Chi Square Test
Number of intervals = 4
Degrees of freedom = 2
Test Statistic = 2.01
Corresponding p-value = 0.387
Kolmogorov-Smirnov Test
Test Statistic = 0.0445
Corresponding p-value > 0.15
Data Summary
Number of Data Points = 100
Min Data Value = 36.8
Max Data Value = 782
Sample Mean = 183
Sample Std Dev = 142
Histogram Summary
Histogram Range = 36 to 783
Number of Intervals = 10
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
56
Squared Error Criteria
Let b b bk , , , 0 1  be the breakpoints of the class intervals such that
> 0 1 b ,b ,> 1 2 b ,b ,, > bk bk , 1 form k disjoint and adjacent intervals where the
width of the class interval is ‘b bj  bj 1 . Let j c be the frequency count of
the i x ’s in the j
th interval, h j the relative frequency of i x ’s in the interval j
th
interval, and p j ˆ be the probability associated with the interval using the
hypothesized distribution. Then, we have:
n
c h j
j ³


j
j
b
b
p j f x dx
1
ˆ ˆ
The squared error is:
¦

k
j
Square Error hj p j
1
2 ˆ
Arena ranks the
distributions by minimum
squared error
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
57
Fit All
What distribution to recommend?
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
58
Based on 12 Intervals
Looks more like exponential
distribution
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
59
P-P Plot
x Sort the data to obtain the order statistics: (1) (2) ( ) , , n x x x
x Compute n i qi
n
i F x  ~ 0.5 for i 1,2,}.n
x Compute i F x ˆ for i 1,2,}.n where Fˆ is the CDF of the
hypothesized distribution
x Plot i F x ˆ versus n i F x ~ for i 1,2,}.n
If the plot looks linear (zero intercept and one slope) then this indicates that
the hypothesized distribution may be a good fit.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Example
Build a P-P Plot for the input data using a uniform
distribution between zero and one
xi
: 0.08 0.68 0.56 0.90 0.29 0.88 0.72 0.40 0.50 0.15
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 60
Solutions
• Input data:
xi
: 0.08 0.68 0.56 0.90 0.29 0.88 0.72 0.40 0.50 0.15
• Step 1: Order the data:
x(i)
: 0.08 0.15 0.29 0.40 0.50 0.56 0.68 0.72 0.88 0.90
i: 1 2 3 4 5 6 7 8 9 10
• Step 2: =q(i)
=(i-0.5)/n = (i-0.5)/10 = …
=0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95
• Step 3: If X is Uniformly distributed between 0 and 1; F(X) = X
=0.08 0.15 0.29 0.40 0.50 0.56 0.68 0.72 0.88 0.90
• Step 4: Plot versus or reverse the axes.
n i F x ~
i F x ˆ
i F x ˆ n i F x ~
n i F x ~
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 61
P-P Plot for Uniform Distribution
• Good fit
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 62
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
P-P Plot
Example
Build a P-P plot for the data series using an exponential
distribution with mean of 0.5
xi
: 0.08 0.68 0.56 0.90 0.29 0.88 0.72 0.40 0.50 0.15
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 63
Solutions
• Input data:
xi
: 0.08 0.68 0.56 0.90 0.29 0.88 0.72 0.40 0.50 0.15
• Step 1: Order the data:
x(i)
: 0.08 0.15 0.29 0.40 0.50 0.56 0.68 0.72 0.88 0.90
i: 1 2 3 4 5 6 7 8 9 10
• Step 2: = q(i)
=(i-0.5)/n = (i-0.5)/10 = …
=q(i) =0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95
If X is Exponentially distributed with a mean of 0.5; then lambda is 2.
F(x)=1-exp(-?*x)
• Step 3: Compute using = 1-exp(-?*x)
• =0.15 0.26 0.44 0.55 0.63 0.67 0.74 0.76 0.83 0.83
• Step 4: Plot versus or reverse the axes.
i F x ˆ
i F x ˆ
i F x ˆ
n i F x ~ n i F x ~
n i F x ~ i F x ˆ
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 64
P-P Plot of Exponential Distribution
• Poorer than
Uniform
distribution
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 65
0.00
0.10
0.20
0.30
0.40
0.50
0.60
0.70
0.80
0.90
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
P-P Plot
66
Q-Q Plot
1. Sort the data to obtain the order statistics: (1) (2) ( ) , , n x x x
2. Compute
n
i
qi
 0.5 for i 1,2,}.n
3. Compute q
F qi x i
1 ˆ  for i 1,2,}.n where 1 ˆ  F is the inverse CDF of
the hypothesized distribution
4. Plot i q x versus i x for i 1,2,}.n
If the plot looks linear (zero intercept and one slope) then this indicates that
the hypothesized distribution may be a good fit.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Example
Build a Q-Q Plot for the input data using a uniform
distribution between zero and one
xi
: 0.08 0.68 0.56 0.90 0.29 0.88 0.72 0.40 0.50 0.15
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 67
Solution
• Input data:
xi
: 0.08 0.68 0.56 0.90 0.29 0.88 0.72 0.40 0.50 0.15
• Step 1: Order the data:
x(i)
: 0.08 0.15 0.29 0.40 0.50 0.56 0.68 0.72 0.88 0.90
i: 1 2 3 4 5 6 7 8 9 10
• Step 2: q(i)
=(i-0.5)/n = (i-0.5)/10 = …
q(i)
: 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95
Guess: X is Uniformly distributed between 0 and 1; F(X) = X, F-1(X)=X
• Step 3: Compute xq(i) using xq(i) = F-1(q(i)
)=q(i)
xq(i) : 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95
If we guess another distribution, xq(i) will be different
• Step 4: Plot xq(i) versus x(i) or reverse the axes.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 68
Q-Q Plot for Uniform Distribution
• Good fit
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 69
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Q-Q Plot
Example
Use Excel to build Q-Q plot for the data series using an
exponential distribution with mean of 0.5
xi
: 0.08 0.68 0.56 0.90 0.29 0.88 0.72 0.40 0.50 0.15
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 70
Solutions
• Input data:
xi
: 0.08 0.68 0.56 0.90 0.29 0.88 0.72 0.40 0.50 0.15
• Step 1: Order the data:
x(i)
: 0.08 0.15 0.29 0.40 0.50 0.56 0.68 0.72 0.88 0.90
i: 1 2 3 4 5 6 7 8 9 10
• Step 2: q(i)
=(i-0.5)/n = (i-0.5)/10 = …
q(i)
: 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95
If X is Exponentially distributed with a mean of 0.5; then lambda is 2.
F-1(X)=-1/?*ln(1-X)
• Step 3: Compute xq(i) using xq(i) =F-1(q(i)
)=-1/?*ln(1-q(i)
)
xq(i) : 0.03 0.08 0.14 0.22 0.30 0.40 0.52 0.69 0.95 1.5
• Step 4: Plot xq(i) versus x(i) or reverse the axes.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 71
Q-Q Plot for Exponential Distribution
• Lack of
linearity
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 72
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0.00 0.20 0.40 0.60 0.80 1.00 1.20 1.40 1.60
Q-Q Plot
Example
• Draw P-P Plot and Q-Q Plot for the arrival time using
the results from Arena Input Analyzer, i.e.,
36+expo(147)
EMGT 5410 Industrial System Simulation Department of Engineering
Management and Systems Engineering Missouri University of Science and
Technology 73
74
Arrival Time: P-P Plot for Exponential Fit
• An excellent
fit with no
significant
departure in
the middle or
the tails
P-P Plot
-0.1
0.1
0.3
0.5
0.7
0.9
1.1
0 0.2 0.4 0.6 0.8 1
q(i)
F(q(i))
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
75
Arrival Time: Q-Q Plot for Exponential
Fit
• Very linear
• Less points at
higher end
because of tail
distribution
• Good looking fit
Q-Q Plot
0
100
200
300
400
500
600
700
800
900
0 200 400 600 800
X(i)
FINV(X(i))
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Example
• Draw P-P Plot and Q-Q Plot for the arrival time using
Uniform distribution within the range of (36, 783)
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 76
77
Arrival Time: P-P Plot for Uniform
Distribution
• Not linear
• As expected, very
far from linear in
the middle
• Indicates lack of fit
P-P Plot Uniform Distribution
-0.1
0.1
0.3
0.5
0.7
0.9
1.1
0 0.2 0.4 0.6 0.8 1
q(i)
F(q(i))
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
78
Arrival Time: Q-Q Plot for Uniform
Distribution
• Again, not linear,
especially in the
middle
• Indicates poor fit
Q-Q Plot Uniform Distribution
0
100
200
300
400
500
600
700
800
900
0 200 400 600 800
X(i)
FINV(X(i))
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
Hands-On Example
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology
79
Model Descriptions
Each morning the sales force at LOTR Makers Inc. makes a number of
confirmation calls to customers who have previously been visited by the sales
force. They have tracked the success rate of their confirmation calls over time and
have determined that the chance of success varies from day to day. They have
modeled the probability of success for a given day as a Beta random variable
parameters D1 5 and D 2 1.5 so that the mean success rate is about 77%. They
always make 100 calls each morning. Each call will result in an order for a pair of
magical rings or it will not for that day. Thus, the number of pairs of rings to
produce each day is a Binomial random variable with p determined by the
success rate for the day and n 100 representing the total number of calls made.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 80
Model Descriptions (Cont.)
Besides being magical, one ring is smaller than the other ring so that the
smaller ring must fit snuggly inside the larger ring. The pair of rings is
produced by a master ring maker and takes uniformly between 5 to 15 minutes.
Then, the rings are inspected by an inspector with the inspection time (in
minutes) being distributed according to a triangular distribution with
parameters (2, 4, 6) for the minimum, the mode, and the maximum. The
inspection determines whether or not the smaller ring is too big or too loose
when fit within the bigger outer ring. The inside diameter of the bigger ring,
Db , is normally distributed with a mean of 1.5 cm and a standard deviation of
0.002. The outside diameter of the smaller ring, Ds , is normally distributed
with a mean of 1.49 and a standard deviation of 0.005. If Ds ! Db , then the
smaller ring will not fit in the bigger ring; however if Db  Ds ! tol 0.02 cm then
the rings are considered too loose.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 81
Model Descriptions (Cont.)
If there are no problems with the rings, the rings are sent to a packer for custom
packaging so that they can be shipped. A time study of the packaging time indicates
that it is distributed according to a lognormal distribution with a mean of 7 minutes and
a standard deviation of 1 minute. If the inspection shows that there is a problem with
the pair of rings they are sent to a re-work craftsman. The minimum time that it takes
to re-work the pair of rings has been determined to be 5 minutes plus some random time
that is distributed according to a Weibull distribution with a scale parameter of 15 and a
shape parameter of 5. After the re-work is completed, the pair of rings is sent to
packaging.
LOTR Inc is interested in estimating the time that it takes to produce the daily
production. In particular, they are interested in estimating the chance associated with
having to work overtime. Currently they run two shifts of 480 minutes each. Any time
past the end of the second shift is considered overtime. Use 30 simulated days to
investigate the situation.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 82
Basic Modeling Questions
• What is the system? What information is known by the system?
• What are the required performance measures?
• What are the entities? What information must be recorded or
remembered for each entity? How are entities introduced into
the system?
• What are the resources that are used by the entities? Which
entities use which resources and how?
• What are the process flows? Sketch the process or make an
activity flow diagram
• Develop pseudo-code for the situation
• Implement the model in Arena
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 83
System
The system is the LOTR, Inc. sales order calling and ring production
processes. The system starts each day with the initiation of sales calls
and ends when the last pair of rings produced for the day is shipped.
The system knows:
x The sales call success probability distribution, p ~ BETA(5,1.5)
x The number of calls to be made each morning, n 100
x The distribution for the time to make the pair of rings, UNIF(5,15)
x The distributions associated with the big and small ring
diameters, NORM(1.5,0.002) and NORM(1.49,0.005)
x The distribution for the time to inspect the rings, TRIA(2,4,6)
x The distribution for the packaging time, LOGN(7,1)
x The distribution for the rework time, 5WEIB(15,3)
x The length of a shift, 480 minutes
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 84
Entities/Resources
• Possible entities are the sales calls and the production
job (pair of rings) for each successful sales call. Each
sales call knows whether or not it is successful. For
each pair of rings, the diameters must be known.
• The sales calls do not use any resources. The
production job uses a master craftsman, an inspector,
and a packager. It might also use a re-work craftsman.
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 85
Process Flow
• Sales Order Process
– Start the day
– Determine the likelihood of calls being successful
– Make the calls
– Determine the total number of successful calls
– Start the production jobs
• Production Process (for each pair of rings)
– Make the rings (determining their sizes)
– Inspect the rings
– If rings do not pass inspection
• Perform rework
– Package rings and ship
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 86
Pseudo-Code for Sales Process
CREATE 1 order process logical entity
ASSIGN p ~ BETA(5,1.5),
do k= 1 to 100
X Bernoulli(p)
If X = 1, add 1 to number of successes
loop
Create number of successes SEPARATE jobs and send them to
production
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 87
Pseudo-Code for Production Process
SEIZE master ring maker
DELAY for ring making
RELEASE master ring maker
ASSIGN bigger ring inner diameter,
ID = NORM(1.49,0.005)
Smaller ring outer diameter,
OD = NORM(1.50, 0.002)
SEIZE inspector
DELAY for inspection time
RELEASE inspector
DECIDE if (ID > OD) OR (OD – ID > tol)
SEIZE rework craftsman
DELAY for rework
RELEASE rework craftsman
SEIZE packager
DELAY for packaging time
RELEASE packager
DISPOSE ship rings
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 88
Arena Modules
• CREATE – Creates the logical entity to initiate sales process
• ASSIGN – Assign values to variables and attributes.
• DECIDE – Used to loop for binomial trials, check diameters, etc.
• SEPARATE – Used to create orders for the day
• PROCESS – This module will be used to implement the seize, delay, release
of the ring maker, the inspector, and the packager
• RECORD – Used to count production
• DISPOSE – This module will be used to dispose of the entities that were
created.
• STATISTIC – Used to define an OUTPUT statistic to record the time that
production completed
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 89
Model Overview
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering Missouri
University of Science and Technology 90
1st SubModel: Daily Order Generation
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 91
CREATE
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 92
ASSIGN
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 93
DECIDE
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 94
ASSIGN: In the Loop
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 95
SEPARATE
• Original: Dispose
• Duplicate: the 2nd SubModel
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 96
DISPOSE
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 97
2nd SubModel Ring Processing
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 98
PROCESS: Making Ring
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 99
ASSIGN
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 100
PROCESS: Inspection
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 101
ASSIGN: Display Diameter
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 102
DECIDE
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 103
RECORD: Too Big
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 104
RECORD: Not Too Big
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 105
DECIDE: Too Small
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 106
RECORD: Too Small
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 107
REWORK
EMGT 5410 Industrial System Simulation
Department of Engineering Management and Systems Engineering
Missouri University of Science and Technology 108
RECORD: Fit
EMGT 54

Order from us and get better grades. We are the service you have been looking for.