Skip to main content
1 of 3
whuber
  • 333.6k
  • 63
  • 792
  • 1.3k

Because the characteristic function of an exponential distribution is

$$\phi(t) = \frac{1}{1 - it},$$

when $X_1,\ldots, X_4$ are independent exponentially distributed variables (all with the same rate, which with no loss of generality may be taken as unity), the characteristic function of $X = X_1+X_2+X_3-X_4$ is

$$\phi_X(t) = \phi(t)^3\phi(-t) = \frac{1}{(1-it)^3(1+it)}.$$

Using partial fractions this is easily decomposed and inverted (by inspection or direct calculation of the inverse Fourier transform) to give the density

$$f_X(x) = \frac{1}{8} \left(e^{x} \mathcal{I}(x\le 0) + e^{-x}(1 + 2x + 2x^2)\mathcal{I}(x\gt 0)\right).$$

This is recognizable as a mixture of a Laplace distribution, a Gamma$(2)$ distribution, and a Gamma$(3)$ distribution.

Figure

As a check, in R I generated a million independent $(X_1,X_2,X_3,X_4)$ tuples and plotted this histogram of $X_1+X_2+X_3-X_4$ to compare it to the graph of $f_X,$ as shown.

hist(c(1,1,1,-1) %*% matrix(rexp(1e6*4), 4), freq=FALSE, breaks=200, xlab="x", main="")
curve(1/8 * (dgamma(-x, 1) + dgamma(x, 1) + 2*dgamma(x, 2) + 4*dgamma(x, 3)))

Figure 2

The agreement is excellent.

whuber
  • 333.6k
  • 63
  • 792
  • 1.3k