1
$\begingroup$

An exponential distribution describes the time between events in a Poisson process. Suppose that the average waiting time for an action is 5 minutes. The time waited each time measured in hours is an exponential random variable, $t$.
Therefore $t$ has the CDF distribution:$$P(t) = 1-e^{-\lambda t}$$ where $\lambda = 1/(5/60)$.

If the action can not be recorded at the time, instead only the minute during occurrence, why is it inappropriate to use exponential distribution?

What is a better model?

$\endgroup$
  • 3
    $\begingroup$ This new distribution is the discretisation of an exponential variate, hence is perfectly well defined. $\endgroup$ – Xi'an Dec 11 '16 at 17:38
  • 3
    $\begingroup$ I agree with @Xi'an comment if the time between events is exponential. A key property of the exponent is the lack of memory problem. That means if say the expected waiting time starting from the last pullover is 6 minutes it is still still expected to be 6 more minutes after 5 minutes has gone by without a pull over. Is that appropriate in your case. $\endgroup$ – Michael R. Chernick Dec 11 '16 at 17:51
1
$\begingroup$

So let's simulate it, and see what happens:

First, I like to use NIST notations. (link) so I am going to use slightly different nomenclature.

The NIST form for the CDF of the exponential distribution is:
$$ F \left( x \right) = 1 - exp^{\frac{-x}{ \beta }}$$

In this case, then:
$$ \beta = \frac{1}{\lambda}$$

Here is how I generate, and confirm, that I am making the "non-rounded" case work properly.

I start out working in minutes. I want to make sure the mean happens when it should.

here is my code:

#libraries
library(psych) #for "describe" function

#reproducibility
set.seed(1)

#how many samples
N <- 20000

#your lambda
Lambda <- 1/(5)

#convert to NIST form
Beta <- 1/Lambda

#draw using "r exp" function
my_exact <- rexp(n = N,rate = 1/Beta )

#graphic confirm it behaves properly
par(mfrow=c(2,1))
hist(my_exact,breaks = 50,freq = F)
qqnorm(my_exact); grid()
par(mfrow=c(2,1))

#numeric summaries
describe(my_exact)

From this the plot is enter image description here

Inspection shows that it has the proper general form and scaling. I should overlay an exact line to compare actual to ideal.

And here is the text summary:

> # numeric summaries
> describe(my_exact)
   vars     n mean   sd median trimmed  mad min   max range skew kurtosis   se
X1    1 20000 4.98 4.98   3.49    4.14 3.59   0 55.98 55.98    2     5.95 0.04

Of first interest is that the mean and standard deviation are both very close to 5.0. Second is that the kurtosis is close to 6.0 and the skewness is close to 2.0. Finally the median is close to $ln \left(2 \right) \beta$.

It should be unlikely that something erroneous would have these statistics so close to the analytic values related to exact distribution. If such a thing did happen, it might be done by a decent approximating function.

Next we round to the nearest minute, and compute the results.

code2:

#rounded values
my_round <- round(my_exact)

#graphic confirm it behaves properly
par(mfrow=c(2,1))
hist(my_round,breaks = 50,freq = F)
qqnorm(my_round); grid()
par(mfrow=c(2,1))

#numeric summaries
describe(my_round)

result2:

> # numeric summaries
> describe(my_round)
   vars     n mean sd median trimmed  mad min max range skew kurtosis   se
X1    1 20000 4.98  5      3    4.16 2.97   0  56    56 1.98     5.88 0.04

The quantile plot (lower) shows the impact of rounding in terms of discretization while the upper histogram shows the change in bin sizes. The earliest bins have the highest change due to rounding.

enter image description here

From here we have mean and standard deviation that are .. very slightly different than above (we did transform numbers) but the same scale of difference from target. They are not substantially different. Skew is nearly 2.0 and kurtosis is nearly 6.0. These are slightly worse, but the rounding acts like a gaussian blur. The median is 3.0 instead fo 3.49, but that is also a consequence of rounding.

Bottom line: It is transformed - the median, skew, and kurtosis are farther than the non-transformed from the ideal. They are still "in the neighborhood".

Next step: If you wanted to, you could repeat this a number of times without the set-seed, and you could look at variation in mean of non-transformed with 1000 repeats, and then compare it to the variation in the transformed parameter with repeats.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy