3
$\begingroup$

Let $X_1$, $X_2$ be two independent random variables with different gamma distributions, and $X = \max\{X_1, X_2\}$.

Are there known results for the distribution of $X$? Actually I only need to know $\mathrm E[X]$ (exact value or approximation).

In case there are no known results for that, I would still find it useful to consider the particular case that the two distributions have the same scale (or rate) parameter (but different shape parameters).

$\endgroup$

1 Answer 1

3
$\begingroup$

The Wikipedia entry for order statistics give some analytic results for the probability density function for various order statistics.

Given $X_1, X_2 \sim \operatorname{Gamma}(\alpha, \beta)$, and define $X_{(2)} = \max\left\{ X_1, X_2 \right\}$. Then, the distribution for $X_{(2)}$ is

$$ f_{X_{(2)}}(x)=\dfrac{\Gamma(3)}{\Gamma(2)} f_X(x) F_X(x)$$

Where $f_X$ is the density for the gamma distribution and $F_X$ is the cumulative distribution function. This should be fairly easy to simulate in R to

x <- replicate(100000, {
   max(rgamma(2, 2, 1))
})

hist(x, probability = TRUE, ylim = c(0, 0.5))
curve(
  gamma(3) / gamma(2) * dgamma(x, 2, 1)*(pgamma(x, 2, 1)), from = 0, 
                         to = max(x), add=TRUE
)

enter image description here


Now consider the case where

$$ X_1 \sim \operatorname{Gamma}(\alpha, \beta) $$ $$ X_2 \sim \operatorname{Gamma}(\alpha ^\prime, \beta^\prime) $$

and again define $X_{(2)} = \max\left\{ X_1, X_2 \right\}$ where $X_1 \perp X_2$.

This means we can write the joint CDF as

$$ F_{X_{(2)}}(x) = \Pr(X_1 \lt x \cap X_2 \lt x) = F_{X_1}(x)F_{X_2}(x)$$

The joint density is then obtained by differentiating the above expression to yield

$$ f_{X_{(2)} } = f_{X_1}(x)F_{X_2}(x) + F_{X_1}(x)f_{X_2}(x) $$

Again, we can simulate this in R

x <- replicate(100000, {
  x1 <- rgamma(1, 2, 1)
  x2 <- rgamma(1, 2, 3)
  max(c(x1, x2))
})

hist(x, probability = TRUE, ylim = c(0, 0.5), breaks = 100)
curve(
   dgamma(x, 2, 1)*pgamma(x, 2, 3) + pgamma(x, 2, 1)*dgamma(x, 2, 3), 
     from = 0, to = max(x), add=TRUE
)

enter image description here

$\endgroup$
2
  • $\begingroup$ @LuisMendo I've added the case where the two random variables are independent and have different parameterizations. $\endgroup$ Commented Sep 25 at 0:34
  • $\begingroup$ Thank you. The derivation is more straightforward than I thought, although the expression is less simple than I hoped for $\endgroup$
    – Luis Mendo
    Commented Sep 25 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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