St · Statistics & Probability

How to Test the Mean of an Exponential Distribution

Published By the 9to5Science editorial team

At a glance

  1. 1. State the model

    Assume independent observations follow an exponential distribution with unknown mean μ.

  2. 2. Compute the statistic

    Under the null mean μ₀, calculate T = 2 times the sample sum divided by μ₀.

  3. 3. Use the chi-square law

    Compare T with a chi-square distribution with 2n degrees of freedom.

  4. 4. Decide and interpret

    Use the alternative hypothesis to choose a tail or two-sided p-value, then report the conclusion.

If you have a sample from an exponential distribution and want to test a proposed population mean, you can use an exact test rather than relying on a normal approximation. The method follows from the distribution of the sample sum.

Assume throughout that X1,…,XnX_1,\ldots,X_n are independent observations from an exponential distribution with mean μ\mu. Its density is

f(x;μ)=1μe−x/μ,x≥0.f(x;\mu)=\frac{1}{\mu}e^{-x/\mu},\qquad x\ge 0.

The exact test statistic

Suppose the null hypothesis is H0:μ=μ0H_0:\mu=\mu_0. Under this null, each observation has mean μ0\mu_0, and the sum S=∑i=1nXiS=\sum_{i=1}^n X_i has a gamma distribution with shape nn and scale μ0\mu_0. Equivalently, the scaled sum has a chi-square distribution:

T=2Sμ0=2∑i=1nXiμ0∼χ2n2under H0.T=\frac{2S}{\mu_0}=\frac{2\sum_{i=1}^n X_i}{\mu_0}\sim\chi^2_{2n}\quad\text{under }H_0.

The degrees of freedom are 2n2n, not nn. This is an exact result for exponential data; it does not require a large sample.

Choose the alternative before calculating the p-value:

  • For H1:μ>μ0H_1:\mu>\mu_0, unusually large sums count against the null. The p-value is P(χ2n2≥Tobs)P(\chi^2_{2n}\ge T_{\mathrm{obs}}).
  • For H1:μ<μ0H_1:\mu<\mu_0, unusually small sums count against the null. The p-value is P(χ2n2≤Tobs)P(\chi^2_{2n}\le T_{\mathrm{obs}}).
  • For a two-sided alternative H1:μ≠μ0H_1:\mu\ne\mu_0, an ordinary exact choice is the equal-tail p-value: twice the smaller of the two tail probabilities, capped at 1.

There is more than one possible definition of a two-sided test for a discrete distribution. The chi-square distribution here is continuous, but different two-sided rules can still differ. State the rule you use; equal-tail testing is a common, straightforward choice.

Worked example

Suppose n=5n=5 independent waiting times have a total of S=24S=24 time units. Test H0:μ=2H_0:\mu=2 against H1:μ≠2H_1:\mu\ne 2 at significance level α=0.05\alpha=0.05.

First calculate the statistic:

Tobs=2(24)2=24.T_{\mathrm{obs}}=\frac{2(24)}{2}=24.

Under the null, TT follows χ102\chi^2_{10}. For an equal-tail test, the 5% critical values are approximately 3.2473.247 and 20.48320.483. Since 24>20.48324>20.483, reject H0H_0.

The upper-tail probability is approximately 0.00760.0076, while the lower-tail probability is about 0.99240.9924. The equal-tail two-sided p-value is therefore approximately 2(0.0076)=0.01522(0.0076)=0.0152. This is below 0.050.05, so the data provide evidence that the mean differs from 2; because the observed sum is high, the sample points toward a larger mean. The sample mean is 24/5=4.824/5=4.8.

Using a confidence interval instead

The same pivot produces an exact confidence interval for the mean. Let χν,p2\chi^2_{\nu,p} denote the pp quantile of a chi-square distribution with ν\nu degrees of freedom (the probability to its left is pp). A two-sided 100(1−α)%100(1-\alpha)\% interval is

[2Sχ2n,1−α/22,  2Sχ2n,α/22].\left[\frac{2S}{\chi^2_{2n,1-\alpha/2}},\;\frac{2S}{\chi^2_{2n,\alpha/2}}\right].

For the example, a 95% interval uses the 97.5th and 2.5th percentiles of χ102\chi^2_{10}:

[48χ10,0.9752,  48χ10,0.0252]≈[2.34,14.78].\left[\frac{48}{\chi^2_{10,0.975}},\;\frac{48}{\chi^2_{10,0.025}}\right] \approx [2.34,14.78].

The null value 22 is outside this interval, consistent with rejecting the two-sided null at the 5% level. A one-sided test corresponds to a one-sided confidence bound rather than this two-sided interval.

If the parameter is the rate

Some texts write the exponential density as f(x;λ)=λe−λxf(x;\lambda)=\lambda e^{-\lambda x}, where λ\lambda is the rate. The mean is μ=1/λ\mu=1/\lambda. To test a proposed rate λ0\lambda_0, use

2λ0S∼χ2n2under H0:λ=λ0.2\lambda_0 S\sim\chi^2_{2n}\quad\text{under }H_0:\lambda=\lambda_0.

Be careful about the direction: a larger rate means a smaller mean. Thus, testing λ>λ0\lambda>\lambda_0 corresponds to sums that are unusually small, not large.

Common mistakes

  • Using the wrong degrees of freedom: the statistic based on the sum has 2n2n degrees of freedom.
  • Mixing up mean and rate: the mean is 1/λ1/\lambda in the rate parameterization.
  • Choosing the tail after seeing the data: specify whether the alternative is greater, less, or different before interpreting a p-value.
  • Assuming the model fits automatically: the exact result assumes independent, identically distributed exponential observations with complete measurements. Censoring, dependence, or a poor exponential fit requires a model and test that account for those features.
  • Treating a non-significant result as proof: failure to reject means the data did not provide enough evidence against the proposed mean; it does not establish that the mean equals μ0\mu_0.

References

  1. Statistical Inference, George Casella and Roger L. Berger
  2. Probability and Statistics, Morris H. DeGroot and Mark J. Schervish

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.