mercredi 6 mai 2020

Gamma_inv returns error if random number is over 0.96

Gamma_inv returns an error if the random number passed to it is higher than roughly 0.96. This happens in both Excel and with VBA. I am running a Monte Carlo, and this only happens 10 or so times in over 40,000 runs. Here is how I am using it (alpha and beta are always >0):

     alpha = B * B * bsy2 ^ -2
     beta = bsy2 * bsy2 / B
     rand = Rnd
     B = WorksheetFunction.GAMMA_Inv(rand, alpha, beta)

Thanks




Aucun commentaire:

Enregistrer un commentaire