The interarrival time of customers for 60 min was monitored and reported below:
0.56974538 6.25245930 4.38116270 2.73018725 0.01947573 2.05621644
0.95476822 0.20938206 0.36555334 13.31611807 1.84342165 3.85799384
0.78148032 0.06480221 1.01586982 1.54638918 1.65045201 8.62226018
1.41718532 3.75108604
What is p-value of the KS test testing the hypothesis that the interarrival times are exponentially distributed?
In order to solve this question I used R software.
R codes and output:
> y=scan('clipboard')
Read 20 items
> y
[1] 0.56974538 6.25245930 4.38116270 2.73018725 0.01947573
2.05621644
[7] 0.95476822 0.20938206 0.36555334 13.31611807 1.84342165
3.85799384
[13] 0.78148032 0.06480221 1.01586982 1.54638918 1.65045201
8.62226018
[19] 1.41718532 3.75108604
> mean(y)
[1] 2.7703
> ks.test(y,pexp(1/2.7703))
Two-sample Kolmogorov-Smirnov test
data: y and pexp(1/2.7703)
D = 0.85, p-value = 0.381
alternative hypothesis: two-sided
Hypothesis:
H0 : Exponential distribution fits the given data.
H1 : Exponential distribution does not fit the given data.
Test statistic, D = 0.85
P-value = 0.381
Since p-value is greater than 0.05, we accept null hypothesis. And conclude that exponential distribution fit the given data.
Get Answers For Free
Most questions answered within 1 hours.