algorithm - running estimates of empirical PMF and variation therein, given a RNG -


suppose black-box random number generator continually emits integer values in interval (for case of immediate interest, [0, 255]). want estimate probability mass function , measure of variation, , want periodically update these estimates new samples come in, without having store entire set of samples far.

  • please suggest numerically stable algorithms computing , updating these estimates.
  • please suggest appropriate measure of variation in pmf.

the pmf of discrete distribution relative proportion of each outcome. create array of length 256, initialized zeros. each value, increment array @ index. scale total number of observations express result relative proportion (estimated probability). voila, instant empirical pmf, , you're storing 256 values if have millions or billions of observations. if outcomes limited small subset, use hash rather array.

given values , associated counts, can construct whatever measures central tendency or variation. variation can consider range, inter-quartile range, or variance and/or standard deviation.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -