Estimating a Visitation Interval: an Exercise in Bivariate Bayesian Statistics

by Justin Skycak (x.com/justinskycak) on

Loosely inspired by the German tank problem: several witnesses reported seeing a UFO during the given time intervals, and you want to quantify your certainty regarding when the UFO arrived and when it left.

Want to get notified about new posts? Join the mailing list.

Years ago, I came up with a neat problem while teaching Bayesian statistics. It’s loosely inspired by the German tank problem.

Several witnesses reported seeing a UFO during the following time intervals:

$\begin{align*} \text{data}=\bigg\{ [12,13], \, [12,13.5], \, [14,15], \, [14,16] \bigg\} \end{align*}$


The times represent hours in military time:

  • $12$ is noon,
  • $13$ is 1 pm,
  • $13.5$ is 1:30 pm,
  • ...

Suppose you want to quantify your certainty regarding when the UFO arrived and when it left.

Assume the data came from $\mathcal{U}[a,b],$ the uniform distribution on the interval $[a,b].$ This means the UFO arrived at time $a$ and left at time $b.$

Watch out! The data do NOT correspond to samples of $[a,b].$ Rather, the data correspond to subintervals of $[a,b].$



a. Compute the likelihood function $\mathcal{L}([a,b]\,\vert\,\text{data}).$

  • Your result should come out to $\frac{3}{(b-a)^4}.$
  • Hint: if the UFO was there from $t=a$ to $t=b,$ then what's the probability that a single random observation of the UFO would take place between 12:00 and 13:30? In other words, if you had to choose a random number between $a$ and $b,$ what's the probability that your random number would be between $12$ and $13.5?$


b. Normalize the likelihood function so that it can be interpreted as a probability density.

  • As an intermediate step to solve for the constant of normalization, you will have to take a double integral
    $\begin{align*} \displaystyle \int_{b_\text{min}}^{b_\text{max}} \int_{a_\text{min}}^{a_\text{max}} \mathcal{L}([a,b]\, \vert \,\text{data}) \, \text{d}a \, \text{d}b. \end{align*}$

    Two of the bounds will be infinite, and two of the bounds will be finite.
  • To figure out the appropriate intervals of integration for $a,b,$ ask yourself the following:
    • What is the highest possible value for $a$ (i.e. the latest the UFO could have arrived) given the data?
    • What is the lowest possible value for $b$ (i.e. the earliest the UFO could have left) given the data?


c. What is the probability that the UFO came and left sometime during the day that it was sighted? In other words, what is the probability that $0<a<a_\text{max}$ and $b_\text{min} < b < 24?$

  • Your answer should come out to $\frac{41}{48}.$


d. What is the probability that the UFO arrived before 10am?

  • Your answer should come out to $\frac{4}{9}.$



Want to get notified about new posts? Join the mailing list.