{"issue":{"state":"closed","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/22559941fe65ac333fc57847c56e5c3c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"22559941fe65ac333fc57847c56e5c3c","url":"https://api.github.com/users/nygge","login":"nygge","id":57669},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-02T16:33:10Z","comments":1,"closed_at":"2011-11-02T16:33:10Z","url":"https://api.github.com/repos/boundary/folsom/issues/7","body":"folsom_sample_uniform does not generate a true random sampling of the values.\r\nOnce the reservoir is full each new value is replacing an existing value in the reservoir.\r\nThis causes a bias for later values.\r\ne.g.\r\n> lists:foldl(fun(V,A) -> folsom_sample_uniform:update(A,V) end, folsom_sample_uniform:new(5000),lists:seq(1,50000)).\r\n> lists:sum(folsom_sample_uniform:get_values(S))/5000.\r\n\r\ngives an arithmetic mean of ~45000 instead of the expected 25000\r\n\r\nExactly which algorithm in the Vitter paper is supposed to be implemented here?","html_url":"https://github.com/boundary/folsom/issues/7","number":7,"title":"folsom_sample_uniform sampling error","id":2099178,"created_at":"2011-10-31T16:54:26Z"},"action":"closed"}