I believe that by saying

X=drand48() Y=drand48()

because the drand48() function produces indep RVs you can say:

D=X^2+Y^2

Just like in problem 4 of homework 6.


Your suggestion isn't quite like problem 4 of homework 6. Recall that in the case of the problem cited, X and Y were Gaussian RV's.

HW6.4 generated an exponential RV from two Gaussian RV's. So, our strategy should be to go in reverse -- that is, to generate a Gaussian RV from one or more exponential RV's.

We can generate exponential RV's using the template established in HW7.1b:

  • Let $ F(x)=1-e^{-\lambda x} (x \geq 0) $
  • Then, as per HW7.1b, if we assign an RV $ D=F^{-1} (\text{drand48()}) $, we know that D will be ~exp($ \lambda $).
  • The only thing left in this step, then, is to find $ F^{-1}(x) $ for any x, so that we know what number we generate for a given input. Since we know that $ F(x)=1-e^{-\lambda x} $, it is easy to show that $ F^{-1}(x)=\frac{-\ln(1-x)}{\lambda} $
  • Thus, $ D=\frac{-\ln(1-\text{drand48()})}{\lambda} $

Does anybody have a suggestion on where to proceed from here?

--Thomas34 20:08, 20 October 2008 (UTC)

Alumni Liaison

Abstract algebra continues the conceptual developments of linear algebra, on an even grander scale.

Dr. Paul Garrett