# Why is the bottom limit of the conditional probability $x$ in Bayesian Statistics?

I am learning bayesian statistics and was stuck when trying to understand the following example:

Romeo and Juliet start dating, but Juliet will be late on any date by a random amount X, uniformly distributed over the interval [0, $$\theta$$]. The parameter $$\theta$$ is unknown and is modelled as the value of a random variable $$\Theta$$, uniformly distributed between zero and one hour. Assuming that Juliet was late by an amount $$x$$ on their first date, how should Romeo use this information to update the distribution of $$\Theta$$?

The sample solution is as follows:

$$f_\Theta(\theta)$$ = 1 if $$0 \leq \theta \leq 1$$, 0 otherwise

$$f_{X|\Theta}(x|\theta) = \frac{1}{\theta}$$ if $$0 \leq x \leq \theta$$, 0 otherwise

The posterior pdf is:

$$f_{\Theta|X} = \frac{f_{\Theta}(\theta)f_{X|\Theta}(x|\theta)}{\int_0^1{f_\Theta(\theta')f_{X|\Theta}(x|\theta')d\theta'}}$$

The following step is where I have a problem:

$$\frac{1/\theta}{\int_x^1{1/\theta'}d\theta'}$$

How did the limits for the integeral go from (0, 1) to (x, 1). I cannot find the justification for this step or why the limits is changing. Thank you for your help.

Romeo now knows that Juliet can be $$x$$ or more late, i.e $$\theta \ge x$$ and so that $$x \le \theta \le 1$$.

In likelihood terms, the likelihood for $$\theta$$ given an observation of $$x$$ is proportional to $$\frac{1}{\theta}$$ when $$\theta \ge x$$ and is $$0$$ when $$\theta \lt x$$, which we can combine, writing with an indicator function, as $$\frac1\theta I_{\theta \ge x}$$

With your prior density for $$\theta$$ of $$1$$ when $$0 \le \theta \le 1$$ and $$0$$ otherwise,

the posterior density for $$\theta$$ is $$\dfrac{\frac1\theta I_{\theta \ge x}}{\int\limits_0^1 \frac1{\theta'} I_{\theta' \ge x}\, d\theta'}$$ when $$0 \le \theta \le 1$$ and $$0$$ otherwise,

and you can simplify the numerator to $$\frac1\theta$$ when $$x \le \theta \le 1$$ and $$0$$ otherwise and similarly the integrand of the the denominator, making the whole expression for the posterior $$\dfrac{\frac1\theta}{\int\limits_x^1 \frac1{\theta'} \, d\theta'} =-\dfrac{1 }{\theta\log_e(x)}$$ when $$x \le \theta \le 1$$ and $$0$$ otherwise

• Oh ok. That makes sense. Thanks a lot :D Commented Apr 30, 2019 at 14:12
• So, what is the probability of Juliet coming on time? Is it $\ln(0)=\infty$?
– Yola
Commented Jun 4, 2022 at 12:39
• @ Yola The probability of Juliet coming on time if you know the value of $\theta$ is $\int_{x=0}^0 \frac1\theta \,dx= 0$. If you do not, then using the prior distribution for $\theta$, it is $\int_{x=0}^0\int_{\theta=0}^1\frac{1 }{\theta} \, d\theta \,dx = 0$, while using the posterior distribution for $\theta$ having previously observed $x_0$, it is $\int_{x=0}^0\int_{\theta=x}^1 -\frac{1 }{\theta^2\log_e(x_0)} \, d\theta \,dx = 0$. This is what happens with continuous distributions: the probability of any particular value is $0$. Commented Jun 4, 2022 at 17:42

As you correctly stated,

$$f_{X|\Theta}(x|\theta) = \frac{1}{\theta}$$ if $$0 \leq x \leq \theta$$, 0 otherwise

the pdf is zero for $$\theta. So the lower limit of the integral over $$\theta'$$ can be replaced by $$x$$.