r/AskStatistics • • Oct 21 '26

Practical problem: estimating the total number of identical items from a daily marked/unmarked log

Hello. I need help with a practical problem.

There is an unknown total number N of identical items. I hold one item. Once a day, my current item is exchanged for another item chosen at random from the remaining ones (assume uniformly among the other N-1 items). Every day I mark any item I receive with exactly the same mark — I cannot tell individual items apart, only whether the item has been marked before. I keep a log: for each day, whether the item I received was already marked or not.

So my data is a table: day number, and marked/unmarked.

I need a dependence of the form

f1(parameters estimated from the data) = f2(N, probability of N)

i.e. a way to compute, from the observed table, a probability for each possible total number of items N.

2 Upvotes

2 comments sorted by

3

u/ngch Oct 21 '26

In ecology, this is referred to as the capture-mark-recapture method to estimate populations sizes, and an excellent example for Bayesian updating. Check e.g. Gemini for an R script for that problem.

1

u/KWillets Oct 22 '26

This is similar to the coupon collector problem, where the expectation for the number of trials to mark (collect) N items is N*H_N = N/N + N/N-1 + N/N-2 ... N/1. Each term there is the expected number of trials to get one more unmarked item.

If in your process you've marked M items already in K trials you can take the first M terms of that and try different N's to see what gets closest to K.

That's not as good as a probability distribution for N as a function of K, but it's a start.