Monday, April 26, 2021

[mlrfzbfu] shifted approximate Zipf 2

sample uniformly x in (0,1] then compute floor(1/x).  this approximately samples the Zipf distribution with exponent 2.

let s > 1.  sample uniformly x in (0,1/s] then compute floor(1/x).  this samples between s and infinity.  subtract s to sample between 0 to infinity, because infinity - finite = infinity.  this distribution has a fatter tail -- it less heavily favors smaller values -- than s=1 above.

No comments :