Skip to main content
added 71 characters in body
Source Link
ColorStatistics
  • 4.8k
  • 1
  • 19
  • 54

I was reading this question about the algorithm that R uses to sample from the Exponential($\lambda$) distribution. It looks like R uses the Ahrens-Dieter algorithm to sample from the exponential distribution. The reference for it is a paper from 1972 that makes a surprising claim that this algorithm is a little faster (in terms of microseconds, not in terms of Big O computational cycles) than just delivering $\frac{-\ln(u)}{\lambda}$ (where U~Uniform(0,1); as the Inverse Transform would have us do).

I find this very surprising. First of all, I am not sure the results from 1972 carry much weight in 2022. Secondly, why the need for an algorithm in the first place as opposed to just delivering $\frac{-\ln(u)}{\lambda}$ (as the Inverse Transform would have us do)? How slow can calculating $\frac{-\ln(u)}{\lambda}$ be? Maybe it was slow in 1972. Or maybe there is another reason?

I was reading this question about the algorithm that R uses to sample from the Exponential($\lambda$) distribution. It looks like R uses the Ahrens-Dieter algorithm to sample from the exponential distribution. The reference for it is a paper from 1972 that makes a surprising claim that this algorithm is a little faster than just delivering $\frac{-\ln(u)}{\lambda}$ (where U~Uniform(0,1); as the Inverse Transform would have us do).

I find this very surprising. First of all, I am not sure the results from 1972 carry much weight in 2022. Secondly, why the need for an algorithm in the first place as opposed to just delivering $\frac{-\ln(u)}{\lambda}$ (as the Inverse Transform would have us do)? How slow can calculating $\frac{-\ln(u)}{\lambda}$ be? Maybe it was slow in 1972. Or maybe there is another reason?

I was reading this question about the algorithm that R uses to sample from the Exponential($\lambda$) distribution. It looks like R uses the Ahrens-Dieter algorithm to sample from the exponential distribution. The reference for it is a paper from 1972 that makes a surprising claim that this algorithm is a little faster (in terms of microseconds, not in terms of Big O computational cycles) than just delivering $\frac{-\ln(u)}{\lambda}$ (where U~Uniform(0,1); as the Inverse Transform would have us do).

I find this very surprising. First of all, I am not sure the results from 1972 carry much weight in 2022. Secondly, why the need for an algorithm in the first place as opposed to just delivering $\frac{-\ln(u)}{\lambda}$ (as the Inverse Transform would have us do)? How slow can calculating $\frac{-\ln(u)}{\lambda}$ be? Maybe it was slow in 1972. Or maybe there is another reason?

added 7 characters in body; edited tags
Source Link
Richard Hardy
  • 69.5k
  • 13
  • 126
  • 278

I was reading this question about the algorithm that R uses to sample from the Exponential($\lambda$) distribution. It looks like R uses the Ahrens-Dieter algorithm to sample from the exponential distribution. The reference for it is a paper from 1972 that makes a surprising claim that this algorithm is a little faster than just delivering $\frac{-ln(u)}{\lambda}$$\frac{-\ln(u)}{\lambda}$ (where U~Uniform(0,1); as the Inverse Transform would have us do). 

I find this very surprising. First of all, I am not sure the results from 1972 carry much weight in 2022. Secondly, why the need for an algorithm in the first place as opposed to just delivering $\frac{-ln(u)}{\lambda}$$\frac{-\ln(u)}{\lambda}$ (as the Inverse Transform would have us do)? How slow can calculating $\frac{-ln(u)}{\lambda}$$\frac{-\ln(u)}{\lambda}$ be? Maybe it was slow in 1972. Or maybe there is another reason?

I was reading this question about the algorithm that R uses to sample from the Exponential($\lambda$) distribution. It looks like R uses the Ahrens-Dieter algorithm to sample from the exponential distribution. The reference for it is a paper from 1972 that makes a surprising claim that this algorithm is a little faster than just delivering $\frac{-ln(u)}{\lambda}$ (where U~Uniform(0,1); as the Inverse Transform would have us do). I find this very surprising. First of all, I am not sure the results from 1972 carry much weight in 2022. Secondly, why the need for an algorithm in the first place as opposed to just delivering $\frac{-ln(u)}{\lambda}$ (as the Inverse Transform would have us do)? How slow can calculating $\frac{-ln(u)}{\lambda}$ be? Maybe it was slow in 1972. Or maybe there is another reason?

I was reading this question about the algorithm that R uses to sample from the Exponential($\lambda$) distribution. It looks like R uses the Ahrens-Dieter algorithm to sample from the exponential distribution. The reference for it is a paper from 1972 that makes a surprising claim that this algorithm is a little faster than just delivering $\frac{-\ln(u)}{\lambda}$ (where U~Uniform(0,1); as the Inverse Transform would have us do). 

I find this very surprising. First of all, I am not sure the results from 1972 carry much weight in 2022. Secondly, why the need for an algorithm in the first place as opposed to just delivering $\frac{-\ln(u)}{\lambda}$ (as the Inverse Transform would have us do)? How slow can calculating $\frac{-\ln(u)}{\lambda}$ be? Maybe it was slow in 1972. Or maybe there is another reason?

Tweeted twitter.com/StackStats/status/1575047663002820610
Became Hot Network Question
edited body
Source Link
ColorStatistics
  • 4.8k
  • 1
  • 19
  • 54

I was reading this question about the algorithm that R uses to sample from the Exponential($\lambda$) distribution. It looks like R uses the Ahrens-Dieter algorithm to sample from the exponential distribution. The reference for it is a paper from 1972 that makes a surprising claim that this algorithm is a little faster than just delivering $\frac{-ln(u)}{\lambda}$ (where U~Uniform[0U~Uniform(0,1];1); as the Inverse Transform would have us do). I find this very surprising. First of all, I am not sure the results from 1972 carry much weight in 2022. Secondly, why the need for an algorithm in the first place as opposed to just delivering $\frac{-ln(u)}{\lambda}$ (as the Inverse Transform would have us do)? How slow can calculating $\frac{-ln(u)}{\lambda}$ be? Maybe it was slow in 1972. Or maybe there is another reason?

I was reading this question about the algorithm that R uses to sample from the Exponential($\lambda$) distribution. It looks like R uses the Ahrens-Dieter algorithm to sample from the exponential distribution. The reference for it is a paper from 1972 that makes a surprising claim that this algorithm is a little faster than just delivering $\frac{-ln(u)}{\lambda}$ (where U~Uniform[0,1]; as the Inverse Transform would have us do). I find this very surprising. First of all, I am not sure the results from 1972 carry much weight in 2022. Secondly, why the need for an algorithm in the first place as opposed to just delivering $\frac{-ln(u)}{\lambda}$ (as the Inverse Transform would have us do)? How slow can calculating $\frac{-ln(u)}{\lambda}$ be? Maybe it was slow in 1972. Or maybe there is another reason?

I was reading this question about the algorithm that R uses to sample from the Exponential($\lambda$) distribution. It looks like R uses the Ahrens-Dieter algorithm to sample from the exponential distribution. The reference for it is a paper from 1972 that makes a surprising claim that this algorithm is a little faster than just delivering $\frac{-ln(u)}{\lambda}$ (where U~Uniform(0,1); as the Inverse Transform would have us do). I find this very surprising. First of all, I am not sure the results from 1972 carry much weight in 2022. Secondly, why the need for an algorithm in the first place as opposed to just delivering $\frac{-ln(u)}{\lambda}$ (as the Inverse Transform would have us do)? How slow can calculating $\frac{-ln(u)}{\lambda}$ be? Maybe it was slow in 1972. Or maybe there is another reason?

added 348 characters in body
Source Link
ColorStatistics
  • 4.8k
  • 1
  • 19
  • 54
Loading
Source Link
ColorStatistics
  • 4.8k
  • 1
  • 19
  • 54
Loading