Approximate Normal Distribution on Gamma Distribution

272 Views Asked by At

I have a question on approximate normal distribution on gamma distribution. Below is my task:

Suppose that requests to a web server follow the Poisson model with rate $$λ=\frac{1}{3.89}s$$

With a given starting time, find the following:

a)The mean of the time of the 20th request

b)The standard deviation of the time of the 20th request

c)The probability p that the 20th request arrives within the first 2 seconds

d)If an approximation of the involved distribution by an appropriate normal distribution (same mean and standard deviation) is used to estimate the probability p that the 20th request arrives within the first 2 seconds, find the estimation

My finding of each part:

a)$20 * (\frac{1}{3.89}s) = 5.1414s$

b)$sqrt(20) * (\frac{1}{3.89}s) = 1.1497$

c)using gamma distribution in excel function for parameter $x=2$ ,$alpha=20$, $beta=5.1414$, it gets $0.000178$

My question

d)I am referring this example to approximate normal distribution on gamma distribution where :

$$\begin{align} P(X<2) = P\biggl(Z < \frac{2-5.1414}{1.1497}\biggr) \\ = P (Z < -2.732)\\ = 1 - 0.99653\\ = 0.00347 \end{align} $$

Unfortunately, the anwser is not correct. Therefore, may I know what did I do wrong in approximate normal distribution on gamma distribution?

1

There are 1 best solutions below

0
On

As far as I can tell, your calculations are correct. Here is a check using R:

pp <- ppoints(10^6)
mean(qgamma(pp,20,rate=3.89))
# 5.141388
sd(qgamma(pp,20,rate=3.89))
# 1.149649
pgamma(2,20,rate=3.89)
# 0.0001776602
mean(qnorm(pp,20/3.89,sqrt(20)/3.89))
# 5.141388
sd(qnorm(pp,20/3.89,sqrt(20)/3.89))
# 1.149649
pnorm(2,20/3.89, sqrt(20)/3.89)
# 0.003143021

It is just that the approximation is not very good as the gamma distribution is slightly skewed, and this produced small absolute but large relative differences in the tail. Looking at the densities (Gamma in black, Normal in red), you can see that even with the same mean and standard deviation, there is not a perfect match

curve(dgamma(x,20,rate=3.89), from=0, to=10, add=TRUE)
curve(dnorm(x,20/3.89, sqrt(20)/3.89), from=0, to=10, add=TRUE, col="red")

density

and similarly not with the cumulative distribution functions

curve(pgamma(x,20,rate=3.89), from=0, to=10)
curve(pnorm(x,20/3.89, sqrt(20)/3.89), from=0, to=10, add=TRUE, col="red")

enter image description here