Distribuciones exponenciales se ajustaron $\chi^2(2)$ distribuciones. Vamos a suponer que la escala ha sido a la inversa (que se realiza a través de una constante de multiplicación) y todos los medios son iguales a $2$.
Una solución empieza por la generación de un modelo a escala de $\chi^2(1)$ varia $A$ a partir de dos independientes $\chi^2(2)$ varia $U$ $V$ a través de
$$A = U\left(\cos(2\pi\exp(-V/2))\right)^2.$$
This is equivalent to the Box-Mueller transform, which is a well-known way of generating a pair of (independent) standard normal variates from two independent uniform variates. One of those normals, when squared, equals $A$ and therefore has a $\chi^2(1)$ distribution.
The rest is easy given two more independent exponential variates $W$ and $Y$: $W+A$ has a $\chi^2(3)$ distribution and $Y$ independently has a $\chi^2(2)$ distribution, whence (practically from the definition of $F$ as a ratio of scaled $\chi^2$ variables) $$F=\frac{(W+A)/3}{Y/2} = \frac{2}{3}\frac{W+U\cos^2(2\pi e^{-V/2})}{Y}$$ does the trick.
Note that only four of the five exponential variables are needed.
Here is R
code comparing $100,000$ realizations of $F$ to corresponding quantiles of the $F(3,2)$ distribution:
n <- 1e5
set.seed(17)
v <- matrix(rgamma(4*n, 1, scale=2), ncol=4)
a <- v[, 1] * cos(2*pi*exp(-v[, 2]/2))^2
x <- v[, 3] + a
y <- v[, 4]
f <- 2*x/(3*y)
f.q <- qf((1:n - 1/2)/n, 3,2)
plot(f.q, sort(f), log="xy", pch=19, cex=0.5,
xlab="F quantile", ylab="Data",
main="F probability plot")
abline(c(0,1), col="Blue", lwd=2)
The probability plot shows a close correspondence:
As a double-check, we can verify that a
, y
, and x
average close to their expectations of $1$, $2$, and $3$ respectively:
> mean(a)
[1] 0.9948789
> mean(x)
[1] 3.003484
> mean(y)
[1] 1.986864
Finally, probability plots confirm that a
, y
, and x
appear to have $\chi^2$ distribuciones con la deseada grados de libertad (y corregir las escalas):
pp <- function(x, df, ...) {
x.q <- qchisq((1:n - 1/2)/n, df)
plot(x.q, sort(x),
xlab="Quantile", ylab="Data",
main=paste("Chi^2(", df, ") probability plot", sep=""), ...)
abline(c(0,1), col="Red", lwd=2)
}
par(mfrow=c(1,3))
pp(a, 1, pch=19, cex=3/4)
pp(y, 2, pch=19, cex=3/4)
pp(x, 3, pch=19, cex=3/4)
Por construcción x
y y
son independientes, así que no hay necesidad de probar este.