# Estimating number of types of things, from many observations

I go on a safari. Each day, I see various animals, and a keep track of all of my observations. Assume that each time I make an observation I see a single animal. At one point, I've made a total of 153 observations and I've seen 127 rabbits, 22 gazelle, 3 lions, and 1 tiger (4 different species). This makes me curious: what is the probability that the next animal I observe will be from a new species, i.e., not one of the 4 I've already seen?

Is there a way to get an estimate or bound on this probability? If not, is there a pragmatic way to get an estimate, perhaps making some additional assumptions that might potentially be reasonable in practice?

I'm not trying to estimate the total number of species, but just that the next observation is from a species I haven't seen yet. I feel like I might have read about this problem somewhere in a paper long ago, but I can't remember the details -- and now I've run across a practical situation where I need to solve it. It feels like it ought to be possible to make some deduction by applying exchangeability, but I can't manage to make the details work out.

• Cool, that looks relevant! So if we knew that the process was a Chinese Restaurant Process with parameter $\theta$ (and discount $\alpha=0$), then the probability that the next observation is from a new species would be $1/(153+\theta)$. But we're not given $\theta$, so I guess that's something we need to estimate from the data. Question: If we assume that the observations follow a CRP with (unknown) $\theta$, given the 153 observations so far, how should we estimate the (posterior) for $\theta$? – D.W. Jan 26 '17 at 22:09
• OK, thank you for the pointer to relevant material! Small correction: the $1/(153+\theta)$ above was a typo and should have been $\theta/(153+\theta)$. – D.W. Jan 26 '17 at 22:19
Assuming that each observation is independent, then maybe we can model this using Bernoulli. The Bayesian approach would be that, Let $X$ be number of observation that doesn't belong to the 4 species you mentioned. Assume that, $$X \sim Bin(n,p)$$ $$p_{prior} \sim Beta(1, 1)$$ prior distribution of p is uniform here, i.e. any probability is equally possible. Then posterior probability of $p$ would be $$p_{posterior} \sim Beta(1+n_{success}\ , 1+n_{failure})$$ In your case posterior p has distribution of $Beta(1, 154)$. Expectation of probability of seeing a "new species" in the next observation should be $1/155$. And if you failed to observe a new species in your next observation, you can update this distribution to $Beta(1, 155)$ and the expectation of this distribution becomes $1/156$.
• I thought about this approach, but I don't think it can be right. The final answer you got is completely independent of the observations: it doesn't matter how many species we've seen so far (or how many times we've seen each species), and the answer depends only on $n$, the number of observations. If I had seen a total of 1 species so far, the answer would be $1/155$; and if I had 100 species so far, the answer would still be $1/155$. That can't be right. I think the problem is that the definition of $X$ isn't defined in advance before seeing the data. – D.W. Jan 27 '17 at 22:09