Suppose \(X_i\) are an i.i.d. random sample or \(i = 1,...,n\) where \(X_i \sim \sf{Gamma}(\alpha,\beta)\). Find the \(P(\overline{X_n} \leq x)\) both directly and using a CLT approximation when
\(\nu\)
By example on page 215 in Casella and Berger, \(\overline{X_n} \sim \sf{Gamma}\left(n \alpha,\frac{\beta}{n}\right)\). Thus, the exact value is
## Exact value
alpha1 = 4
beta1 = 2
n = 25
x = 9
pgamma(x, shape =n*alpha1, scale = beta1/n)
## [1] 0.8914768
The CLT appoximations is
## CLT approximation
alpha1 = 4
beta1 = 2
n = 25
x = 9
zval = (sqrt(n)*(x-alpha1*beta1))/(sqrt(alpha1)*beta1)
pnorm(zval)
## [1] 0.8943502
Rhe exact value is
## Exact value
alpha1 = 1
beta1 = 2
n = 25
x = 2.5
pgamma(x, shape =n*alpha1, scale = beta1/n)
## [1] 0.8895701
The CLT appoximations is
## CLT approximation
alpha1 = 1
beta1 = 2
n = 25
x = 2.5
zval = (sqrt(n)*(x-alpha1*beta1))/(sqrt(alpha1)*beta1)
pnorm(zval)
## [1] 0.8943502
Thus, the exact value is
## Exact value
alpha1 = 1
beta1 = 2
n = 9
x = 2.5
pgamma(x, shape =n*alpha1, scale = beta1/n)
## [1] 0.7894591
The CLT appoximations is
## CLT approximation
alpha1 = 1
beta1 = 2
n = 9
x = 2.5
zval = (sqrt(n)*(x-alpha1*beta1))/(sqrt(alpha1)*beta1)
pnorm(zval)
## [1] 0.7733726