I have a question which goes like this.

Two analysts are in dispute about some data they expect to arise in an experiment. In total, they will receive 20 observations. One analyst believes that these should be a random sample from an exponential distribution with mean 1. The second analyst believes instead that the data come from a normal distribution with mean 2 and standard deviation 1. They come to you for advice on how to use the data to resolve their dispute.

(you can assume that the sum of 20 independent observations from a unit exponential distribution has a Gamma(20,1) distribution)

Your first suggestion is to calculate the average of the observations. You will endorse the first analyst’s view if the average is less than 1.5, and endorse the second analyst’s view of the average is greater than this.

Calculate the probability that you will endorse the second analyst’s view if, in fact, the first analyst is correct.

Is it correct to apply the central limit theorem here since we only have 20 observations? So far I have considered standardizing the sum of the random variables and using the CLT but unsure if this was correct.

If anyone could point me in the right direction, I will be extremely thankful.

  • $\begingroup$ The mean of an exponential sample of size $n = 20$ is not well approximated by the normal distribution. One could find the likelihood ratio test. But your Question focuses on a test with a critical value 1.5 for the sample mean. Exact error probabilities can be found using software, so there is no need to use a normal approximation. $\endgroup$
    – BruceET
    Mar 23 '18 at 0:05
  • $\begingroup$ How does one go about doing that with such information? So my method of standardizing the variables is wrong? $\endgroup$
    – user12321
    Mar 23 '18 at 0:10
  • $\begingroup$ What do you think would be the best way to proceed with the question? $\endgroup$
    – user12321
    Mar 23 '18 at 0:11

First, if you have a random sample $X_i$ of size $n = 20$ from $\mathsf{Exp}(\text{rate}= 1),$ then the sample mean has $\bar X \sim \mathsf{Gamma}(\text{shape}=20,\text{rate}=20).$

Consider the following simulation in R statistical software, where the sample average is denoted a.

m = 10^5; n = 20; x = rexp(m*n)
MAT = matrix(x, nrow=m)  # 100,000 by 20 matrix of std exponential data
a = rowMeans(MAT)        # 100,000 sample means
mean(a);  sd(a)
## 0.9994324    # aprx E(samp mean) = 1 
## 0.2242217    # aprx SD(samp mean) = 1/sqrt(20)
hist(a, prob=T, col="skyblue2")
curve(dgamma(x,20,20), add=T, lwd=2, col="blue")

enter image description here

Second, here are plots of the density functions for $\bar X \sim \mathsf{Gamma}(20,20)$ in blue and $\bar Y \sim \mathsf{Norm}(\mu=2, \sigma=1/\sqrt{20}).$

curve(dnorm(x, 2, 1/sqrt(20)), 0,3, col="maroon", lwd=2, lty="dashed", ylab="Density")
curve(dgamma(x, 20, 20), add=T, lwd=2, col="blue")

enter image description here

So it does seem reasonable to distinguish between the distributions according as the sample mean is above or below $1.5.$

Specifically, the probability of judging the population distribution to be normal when in fact it is exponential is $P(\bar X > 1.5) = 0.022.$

1 - pgamma(1.5, 20, 20) 
## 0.02187347

The separation is better than I expected, so no great harm would be done using a less-than perfect normal approximation to the above probability. The approximate probability is about 0.013.

1 - pnorm(1.5, 1, 1/sqrt(20))
## 0.01267366

But I persist in my campaign to use software to get exact probabilities instead of using questionable normal approximations.

  • $\begingroup$ This is great. I think the rate of the gamma is 1 not 20 $\endgroup$
    – user12321
    Mar 23 '18 at 1:04
  • $\begingroup$ Can't be. First simulation shows good fit to GAMMA(20,20) which has mean 1 and variance 1/20. (Easy to get confused about gamma distn's. Some sources use rate, some use scale, for 2nd parameter.) If we add exponentials, then gamma rate matches exponential, but not if we avarage. For means and variances of gamma, see Wikipedia on 'gamma distribution'. $\endgroup$
    – BruceET
    Mar 23 '18 at 1:11
  • $\begingroup$ Okay but the question asks me to assume that the sum of the 20 independent random variables from a unit exponential distribution has a gamma(20,1) $\endgroup$
    – user12321
    Mar 23 '18 at 2:21
  • $\begingroup$ As I said earlier it's the difference between sum and average. Gamma(20,1) has mean 20. It's true that $\sum_{i=1}^{20} X_i$∼ Gamma(20,1). But for the test we're dealing with $\bar X$ ~ Gamma(20,20). $\endgroup$
    – BruceET
    Mar 23 '18 at 7:43
  • $\begingroup$ Could you explain why the the mean of the 20 rvs have a gamma(20,20) because I don't seem to understand why this is the case $\endgroup$
    – user12321
    Mar 23 '18 at 13:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.