4

Suppose we are told that the weight of each gum ball (in centigrams) is given by the gamma distribution function, with $α=25$ and $β=2$. Find the probability that 100 gum balls will go over the limit of a standard package of $52g$.

I use central limit theorem to normalize to random variable Z, and I get the probability is around $0.42$, while my solution says $0.0228$.

Xoque55
  • 4,384
PersonaA
  • 959
  • Check your calculations. Average of $100$ balls is $12.5g$ with a small variance. – A.S. Dec 10 '15 at 03:18
  • 1
    According to the definition of the Gamma distribution given in Wikipedia, The mean of the distribution is $\frac\alpha\beta=\frac{12}5$ and the variance is $\frac\alpha{\beta^2}=\frac{12}{25}$. For $100$ samples, the mean would be $240$ and the variance would be $48$. A value of $5200$ centigrams is over $715$ standard deviations above the mean. This seems pretty extreme. Are you using the $k,\theta$ parameterization? – robjohn Dec 10 '15 at 03:19
  • I think I did this already here. – Em. Dec 10 '15 at 03:19
  • 1
    Sorry we were told mean is $\alpha\beta$ , variance $\alpha \beta ^{2}$ and @probablyme yes thanks but with diffirent numbers, I also have the same book and did that and got the same solution but this is slightly diffirent – PersonaA Dec 10 '15 at 03:22

2 Answers2

2

Let's try to avoid confusion about parameterizations, centigrams vs. grams, and normal approximation.

When using a gamma distribution, you need to start by being clear about the parameterization. You seem to be using $\alpha$ for the shape parameter and $\beta$ for the scale parameter. The rate parameter $\lambda$ is the reciprocal of the scale parameter: $\lambda = 1/\beta.$

If $X_i$ are iid $\text{Gamma}(\text{shape} = \alpha = 25, \text{scale} = \beta = 2),$ then $T = \sum_{i=1}^{100} X_i \sim \text{Gamma}(\text{shape} = 2500, \text{scale} = 2),$ which can be seen by looking at moment generating functions.

Let's use centigrams throughout. In R statistical software, it is possible to get exact probabilities associated with a gamma distribution. You seek $$P(T > 5200) = 1 - P(T \le 5200) = 0.023819.$$

This exact probability (not using a normal approximation) is found in R as follows:

 alpha = 25;  beta = 2
 1 - pgamma(5200, 100*alpha, 1/beta)
 ## 0.023819

Notice that the second gamma parameter in R is the rate. So what I take to be the 'answerbook answer' 0.02275 is accurate to about three places. (I suppose it is found from a normal approximation.) In the graph below, the area you seek is under the gamma density curve to the right of the vertical line.

enter image description here

BruceET
  • 51,500
  • +1 for getting me to check for an exact answer using Mathematica. – robjohn Dec 11 '15 at 02:01
  • @Robjohn. Good to get into a habit of using modern software. Normal approximations often make interesting textbook problems and are sometimes good enough in practice. But nowadays applied statisticians prefer to move directly to software to get exact answers. – BruceET Dec 11 '15 at 07:22
1

Assuming you are using the $k,\theta$ parameterization given on the Wikipedia page, then the mean would be $50$ centigrams and the variance would be $100$ centigrams$^2$. For $100$ samples the mean would be $50$ grams and the variance would be $1$ grams$^2$. $52$ grams would be $2$ standard deviations above the mean. This gives a probability of approximately $0.02275$ using the Normal distribution.

Your solution looks right. The answer you got would be right if the variance were $100$ grams$^2$, but $10000$ centigrams$^2=1$ grams$^2$.


After seeing BruceET's answer, I looked to see if Mathematica also had the ability to compute the Gamma distribution, and indeed it does.

N[1 - CDF[GammaDistribution[2500, 2], 5200]] gives $0.023819$

However, since the answer in the book matches the approximation using the Normal distribution, I assume they wanted it worked that way.

robjohn
  • 345,667
  • 1
    Sorry I dont get, you say the answer 0.02275 is right, but then mine is to? which is right?? – PersonaA Dec 10 '15 at 04:27
  • 1
    In your question, you said "my solution". It would be clearer if you said something like "the solution in the book". – robjohn Dec 10 '15 at 10:01