7
$\begingroup$

My friend and I recently saw our old passions for Kinder Surprise toys reignited with a new animal toy line which resembled the old toys we were missing. To our dismay, however, this series did not include a "check-list" of toys to be collected. Hence arose the natural problem of estimating the number of distinct toys in the series, and when to stop buying. (We have an embarrassing amount of data.)

As neither of us has much experience with this type of problem, we do not know any standard approaches. That being said, here is what we cooked up: Suppose that there are $N$ distinct toys in the series. We can calculate the probability of observing $v_1$ toys repeated once ("singles"), $v_2$ toys repeated twice ("doubles"), etc. If this were indeed our data, we assume the most likely thing happened, and maximize the calculated probability as a function of $N$. I recognize that there are problems with this approach. Could anyone suggest alternatives?

The data is sourced only from purchases in the supermarket. For fun, here is some data, presented as a quintuple with the number of singles, doubles, etc.: $(5,2,3,2,0)$ was a week ago, $(5,2,3,1,1)$ and $(5,2,2,2,1)$ are more recent.

This question is similar, except here we assume that the value labelled $S$ there is infinite.

$\endgroup$
14
  • 2
    $\begingroup$ This sounds like a mark and recapture problem: en.wikipedia.org/wiki/Mark_and_recapture $\endgroup$ Jun 28, 2022 at 20:37
  • $\begingroup$ How are you making observations, exactly? What does a "single," "double," etc. actually mean? How one would model and analyze this situation ought to depend substantially on, say, whether you are searching through catalogs, buying toys as you encounter them, sampling databases, or whatever else it is you might be doing. $\endgroup$
    – whuber
    Jun 28, 2022 at 21:11
  • 1
    $\begingroup$ Please add thgis new information as an edit to the post. We want posts to be self-contained, as comments are easily missed, and can be deleted. $\endgroup$ Jun 28, 2022 at 22:56
  • 1
    $\begingroup$ Does this answer your question? How can I estimate unique occurrence counts from a random sampling of data? $\endgroup$ Jun 29, 2022 at 7:34
  • 1
    $\begingroup$ @whuber while I think you are generally correct that these may not be a random sample think only your first point (1) applies here; the toys in question are hidden inside a chocolate egg and so local preferences and marketing strategies probably don't apply, but I suspect that batch distribution still could be not random $\endgroup$
    – bdeonovic
    Jun 30, 2022 at 19:36

1 Answer 1

4
$\begingroup$

You could potentially approach this as an inference from an occupancy problem, depending on the sampling method. For simplicity, let's assume that there are $N$ types of toys and your sampling method gives you an IID sample of $n$ toys that are equiprobable over the different types. Let $K_n$ denote the number of disinct toys in your sample. Given the values $N$ and $n$ this =random variable follows the classical occupancy distribution (see e.g., O'Neill 2019), with probability mass function:

$$\mathbb{P}(K_n = k) = \text{Occ}(k|n,N) = \frac{(N)_k \cdot S(n,k)}{N^n} \quad \quad \quad \text{for all } 1 \leqslant k \leqslant \min(n,N).$$

Observing the occupancy value $K_n=k$ gives you the log-likelihood function:

$$\ell_k(N) = \sum_{i=1}^k \log (N-i+1) - n \log(N) \quad \quad \quad \quad \quad \text{for all } N \geqslant k.$$

You can find the details for computing the MLE and MoM estimators for $N$ in this related question. If you can specify the number of toys you've collected and the number of distinct toys you got I can complete the estimation. (I'm impressed that you have an embarrassing amount of data on Kinder egg toys; if you'd be interested in sharing that data, it would make a nice example for inferences in occupancy problems.)

$\endgroup$
3
  • $\begingroup$ Thanks for the answer! The question has been updated to include data now. $\endgroup$
    – N.N.
    Jun 29, 2022 at 20:05
  • 2
    $\begingroup$ @N.N. Your data is unclear. Can you please aggregate it so that there is a single set of results for all time periods (it is unclear what the category overlaps is in the different time periods). $\endgroup$
    – Ben
    Jun 29, 2022 at 22:31
  • $\begingroup$ My apologies. I think the most recent one is also the most relevant. Namely, (5,2,2,2,1) should be most accurate. $\endgroup$
    – N.N.
    Jul 1, 2022 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.