You are on page 1of 3

SCHOOL OF SCIENCES

DEPARTMENT OF COMPUTATIONAL
SCIENCE
PARTH SHARDA-22215620
(STA451N)
Practical 7
SUBMITTED TO: DR SWATI AGRAWAL
Inter Arrival Times
Inter-arrival time refers to the gap between events happening one after the
other. For instance, in a bus schedule, it's the time between one bus leaving
and the next one arriving at a stop.

Our goal:
i) Find out these inter-arrival times in minutes.
ii) Fit an exponential distribution to these times.
iii) Test how good our fit is.

Here's what we do:


1. First, we figure out the average inter-arrival time using Excel's =MEAN
function.
2. Then we estimate a parameter value by looking at the difference between
observed and expected frequencies, dividing that by the sum of expected
frequencies.
3. We use Excel's =CHISQ.INV.RT() function to find the right-tailed
probability of a chi-squared distribution at a 5% significance level, with 8
degrees of freedom.
4. Next, we compare our calculated values with standard tabulated values.
5. We calculate the parameter theta of the exponential distribution as 1
divided by the average inter-arrival time.
6. We put our inter-arrival time data into a pivot table in Excel.
7. In the pivot table, we set the inter-arrival time as rows and change the
value setting to count instead of sum.
8. We group the data into intervals, typically 4 classes.
9. For each interval (let's say a to b), we calculate P(a<t<b) as exp(-theta*a)
minus exp(-theta*b).
10. Then, we find the expected frequency by multiplying each P(a<t<b)
value by the total number of observations, N.
11. Finally, we calculate the chi-square value based on these expected
frequencies and compare it with a critical value.
Screenshot of Excel sheet:

Conclusion:
The chi-square value we got (15.91) is bigger than what we were expecting (15.507),
showing a clear difference between what we observed and what we expected. This means the
data we saw is a bit different from what we thought we'd see, and because our value is higher,
we're going to say the original idea (null hypothesis) is not true.

You might also like