Online, incremental calculation of statistics in a sample with replacement | Hacker News Reader