cjerdonek / quick-sampler

Browser implementation of Ronald L. Rivest's sampling algorithm using AngularJS
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Show multiplicity for sampling with replacement #5

Open nealmcb opened 6 years ago

nealmcb commented 6 years ago

Often when you sample items with replacement (as is done here), you need to know how many times each item is drawn. I.e. in the second tests.json test case "Test an example yielding a duplicate selection", item "1" is selected twice. If the sample was used in a risk-limiting audit, any discrepancies associated with the choice "1" would need to be factored in twice.

So when showing the results in Unique and Sorted forms, it would be handy to add an associated count for each item (sometimes called the multiplicity of the item in the selected multiset)

cjerdonek commented 6 years ago

Thanks for the suggestion, @nealmcb!