0
$\begingroup$

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

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

1 Answer 1

1
$\begingroup$

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$.

$\endgroup$
3
  • $\begingroup$ 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? $\endgroup$ Feb 22, 2017 at 22:08
  • $\begingroup$ 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$. $\endgroup$ Feb 22, 2017 at 22:22
  • $\begingroup$ My mistake I typed the calculation in wrong! Thanks $\endgroup$ Feb 23, 2017 at 8:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .