# Geometric Prior, Find Posterior

I'm struggling with a question worded as follows:

Suppose that there are $N$ buses in a town. These numbers are numbered sequentially from $1$ to $N$. Your prior distribution of $N$ is given by a geometric distribution with mean 100. i.e.

$$p(N) = 0.01(0.99)^{N-1}$$

If you see a bus at random and it is numbered 203, what is the posterior distribution for $N$?

I'm struggling to set up the likelihood function in order to find the posterior. Thanks

• Hint: $\mathbb P(\text{see }203 \mid N=n) = \frac1n$ provided that $n \ge 203$ Feb 22, 2017 at 21:44

The distribution for your data given $N$ is uniform, so the pmf of $X|N$ is given by $1_{N\geq x}\frac{1}{N}$. This gives a posterior distribution proportional to $1_{N\geq 203}\frac{1}{N}(0.99)^{N-1}$. This looks like the logarithmic distribution, but not quite. In fact, if $Y$ is logarithmic, your posterior is the distribution of $Y|Y\geq 203$.
• Using this i've calculated that my posterior (with an estimated normalising constant from evaluating the integral over the entire domain where $N >= 203$) is $21.73*1/N*0.99^{N-1}$. Is this correct? Feb 22, 2017 at 22:08
• I actually have $21.2536$, not $21.73$. Note that by conditioning on the event $a\leq N\leq b$ you never change the shape of the distribution, only the normalising constant and the range, so you just need a constant so that $\sum_{N=203}^\infty c\frac{1}{N}(0.99)^{N-1}=1$. Feb 22, 2017 at 22:22