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

Ans 5: We conduct input Analysis for the system assuming Monte Carlo Simulation using

following two techniques.


K-S Test
P-P plot

Kolmogorov Smirnov (K-S) test


Let us test two distributions (exponential, uniform) for the input data (shown in column 5, table
below). The customer arrival rate ( ) is 1/x-bar = 1/31.3 =.0319. The sample size n =100. The
observations are denoted by i.

The cdf of exponential is given by F ( x(i ) ) = 1-e-x

The cdf of uniform is given by F ( x(i ) ) = x

Let us now compute the Dn statistic assuming exponential distribution.

~ i-1/n Fitted Distribution Dn+ Dn


F ( x(i ) ) = Actual data Exponential
i i/n
(xi)
i-0.5/n F ( x(i ) ) = 1-e-x
1 0.01 .005 0 30 0.616519 -0.61 0.62

2 0.02 .015 0.01 32 0.640257 -0.62 0.63

3 0.03 .025 0.02 30 0.616519 -0.59 0.60

4 0.04 .035 0.03 35 0.673136 -0.63 0.64

5 0.05 .045 0.04 32 0.640257 -0.59 0.60

6 0.06 .055 0.05 30 0.616519 -0.56 0.57

7 0.07 .065 0.06 30 0.616519 -0.55 0.56

8 0.08 .075 0.07 30 0.616519 -0.54 0.55

9 0.09 .085 0.08 32 0.640257 -0.55 0.56

10 0.1 .095 0.09 32 0.640257 -0.54 0.55

Dn = max { Dn+ , Dn } = max {-0.54,0.64} = 0.64

Let us now compute the Dn statistic assuming uniform distribution.

8
i-1/n Fitted Dn+ Dn
~ Distribution
F ( x(i ) ) = Actual
i i/n Uniform
i-0.5/n data (x)
F ( x(i ) ) = x
1 0.01 0.01 0 30 30 -29.99 30

2 0.02 0.02 0.01 32 32 -31.98 31.99

3 0.03 0.03 0.02 30 30 -29.97 29.98

4 0.04 0.04 0.03 35 35 -34.96 34.97

5 0.05 0.05 0.04 32 32 -31.95 31.96

6 0.06 0.06 0.05 30 30 -29.94 29.95

7 0.07 0.07 0.06 30 30 -29.93 29.94

8 0.08 0.08 0.07 30 30 -29.92 29.93

9 0.09 0.09 0.08 32 32 -31.91 31.92

10 0.1 0.1 0.09 32 32 -31.9 31.91

Dn = max { Dn+ , Dn } = max {-29.92,34.97} =34.97

Since Dn (exponential) < Dn (uniform), or 0.64<34.97, exponential distribution is a better fit to


the input data

Probability (P-P) Plots


For developing the probability plots, first of all sort the actual data values in ascending order and
then compute the cdf for the exponential and uniform distributions.
~
F ( x(i ) ) = Actual Fitted Distribution Fitted Distribution
i-0.5/n data (x) F ( x(i ) ) = 1-e-x Uniform F ( x(i ) ) = x
0.01 30 0.616519 30
0.02 30 0.616519 30
0.03 30 0.616519 30
0.04 30 0.616519 30
0.05 30 0.616519 30

9
0.06 32 0.640257 32
0.07 32 0.640257 32
0.08 32 0.640257 32
0.09 32 0.640257 32
0.1 35 0.673136 35

1.P-P plot for exponential distribution

P-P plot
0.68
0.67
Fitted (Exponential)

0.66
0.65
0.64
0.63
0.62
0.61
0 0.02 0.04 0.06 0.08 0.1 0.12
Sample

2.P-P plot for uniform distribution

P-P plot
36
35
Fitted(Uniform)

34
33
32
31
30
29
0 0.02 0.04 0.06 0.08 0.1 0.12
Sample

Based on the above two plots, we cannot conclude clearly which distribution is a better fit.
Therefore, more number of experiments are needed over a large time interval to make any
significant conclusion.

10

You might also like