Cross-influences of priors

One might say that in the first case, that of Fig. [*], yielding Eq. ([*]) starting from $f_0(r_1)=f_0(r_2)=k$ there were no priors on $\rho$. But this is quite not true, because the flat priors on $r_1$ and $r_2$ impinge on the prior on $\rho$, due to the relation $\rho=r_1/r_2$. The easiest way to see what is going on is by Monte Carlo, that is, in R,
n = 10^7
rM = 100
r1 = runif(n, 0, rM)
r2 = runif(n, 0, rM)
rho = r1/r2
rho.h <- rho[rho<5] 
hist(rho.h, nc=200, col='blue', freq=FALSE)
abline(v=1, col='red')
where the selection of the values below $\rho\!=\!5$ is to visualize the more interesting region, shown in the top plot of Fig. [*] (a more complete script, which also performs the correct normalization of the histogram, is shown in Appendix B.4). The histogram is characterized by a plateau till $\rho=1$, followed by a slow decreasing. Curiously, the histogram does not depend on the maximum value rM.
Figure: Distribution of $\rho$ implied by flat priors on $r_1$ and $r_2$ in linear and log scale. The vertical line in the upper plot shows the discontinuity of the distribution at $\rho=1$.
\begin{figure}\begin{center}
\epsfig{file=pdf_rho_r_1_r2_unif.eps,clip=,width=\...
...,width=\linewidth}
\\ \mbox{} \vspace{-1.0cm} \mbox{}
\end{center}
\end{figure}

Although it might be bizarre, this histogram shows in essence the prior on $\rho$ we have been tacitly assumed, when flat priors on $r_1$ and $r_2$ were chosen (as a cross check, the commented instructions of the script of Appendix B.4, executed one by one, plot the distribution of $r_1$ assuming a flat prior for $r_2$ and the curious distribution of the top plot of Fig. [*] for $\rho$).

In order to have a better insight of what is going on, the bottom plot of the same figure shows the histogram of $\log_{10}\rho$. The maximum is at $\log\rho=0$ and it decreases symmetrically, exponentially,28as $\vert\log\rho\vert$ increases. This symmetry indicates that the probabilities to get a value of $\rho$ below or above 1 are the same. The same conclusion, within the uncertainties due to sampling, can be drawn from the histogram in linear scale, since $f(\rho)$ is `about $1/2$' for $0\le \rho \le 1$. Similarly, from the comparison of the two histograms we can evaluate, by symmetry arguments, that the probability that $\rho$ is between 0.1 and 10 is equal to 90% (exact value, indeed as we shall see in a while).

It is interesting to get the distribution shown in the top plot of Fig. [*] making a transformation of variables, as we have done in Eq. ([*]) and following equations:29

$\displaystyle f(\rho)$ $\displaystyle =$ $\displaystyle \int_0^{r_M}\!\!\int_0^{r_M}\!\delta(\rho-r_1/r_2)\cdot f(r_1)\cdot
f(r_2)\,$d$\displaystyle r_1\,$d$\displaystyle r_2$ (100)
  $\displaystyle =$ $\displaystyle \int_0^{r_M}\!\!\int_0^{r_M}\!r_2\cdot \delta(r_1-\rho\cdot r_2)\cdot
\frac{1}{r_M}\cdot \frac{1}{r_M} \,$d$\displaystyle r_1\,$d$\displaystyle r_2\,,$ (101)

where $r_M$ is the maximum value of $r_1$ and $r_2$.30

At this point, some care is needed with the limits of the integral over $r_2$, due to its `natural' upper limit at $r_M$ and to that given by the constraint $\rho\cdot r_2\le 1$, i.e. $r_2\le 1/\rho$. Therefore, after the trivial integration over $r_1$, we are left with

$\displaystyle f(\rho)$ $\displaystyle =$ $\displaystyle \frac{1}{r_M^2}\cdot \int_0^{r_2^u}\!r_2 \,$d$\displaystyle r_2\,,$ (102)

where the upper limit $r_2^u$ depends on $\rho$ in the following way:
$\displaystyle \rho \le 1$ $\displaystyle \longrightarrow$ $\displaystyle r_2^u = r_M$  
$\displaystyle \rho > 1$ $\displaystyle \longrightarrow$ $\displaystyle r_2^u = r_M/\rho\,.$  

and therefore
$\displaystyle \rho \le 1$ $\displaystyle \longrightarrow$ $\displaystyle f(\rho) =
\frac{1}{r_M^2}\cdot \int_0^{r_M}\!\!r_2 \,$d$\displaystyle r_2
= \frac{1}{r_M^2}\cdot \frac{r_M^2}{2} = \frac{1}{2}$  
$\displaystyle \rho > 1$ $\displaystyle \longrightarrow$ $\displaystyle f(\rho) =
\frac{1}{r_M^2}\cdot \int_0^{r_M/\rho}\!\!r_2 \,$d$\displaystyle r_2
= \frac{1}{r_M^2}\cdot \frac{r_M^2}{2\,\rho^2} =
\frac{1}{2\,\rho^2}\,,$  

that we summarize as31
$\displaystyle f\left(\rho\,\,\vert\,\,f(r_1)\!\!=\!\!\frac{1}{r_M},f(r_2)\!\!=\!\!\frac{1}{r_M}\right)$ $\displaystyle =$ \begin{displaymath}\left\{
\begin{array}{ll} \frac{1}{2} & \ \ \ \ \ \ (0 \le \r...
...c{1}{2\,\rho^2} & \ \ \ \ \ \ (\rho > 1) \,,
\end{array}\right.\end{displaymath} (103)

which, indeed, does not depend on the the maximum values of $r_1$ and $r_2$, as we had already learned playing with Monte Carlo simulations.32

For completeness, let also make the game of seeing how flat priors on $r_2$ and $\rho$ (up to $r_{2_M}$ and $\rho_M$, respectively) are reflected into $r_1$ in the model of Fig.[*]:

$\displaystyle f(r_1)$ $\displaystyle =$ $\displaystyle \int_0^{\rho_M}\!\int_0^{r_{2_M}}\!\delta(r_1-\rho\,r_2)\cdot
f(\rho)\cdot f(r_2)\,$d$\displaystyle \rho\,$d$\displaystyle r_2$ (104)
$\displaystyle f(r_1)$ $\displaystyle =$ $\displaystyle \int_0^{\rho_M}\!\int_0^{r_{2_M}}
\frac{\delta(\rho-r_1/r_2)}{r_2}\cdot
\frac{1}{\rho_M}\cdot \frac{1}{r_{2_M}}\,$d$\displaystyle \rho\,$d$\displaystyle r_2$ (105)
  $\displaystyle =$ $\displaystyle \frac{1}{\rho_M\cdot r_{2_M}}\cdot
\int_{r_{2_L}}^{r_{2_U}}\frac{1}{r_2}\,$d$\displaystyle r_2$ (106)

where the extremes of integration are $r_{2_L}=r_1/\rho_M$ and $r_{2_U}=r_{2_M}$. Here is, finally, the pdf of $r_1$, in which we have written explicitly the conditions:
$\displaystyle f\left(\!r_1\,\,\vert\,\,f_0(r_2)\!\!=\!\!\frac{1}{r_{2_M}}, %non è una prior
f_0(\rho)\!\!=\!\!\frac{1}{\rho_M}\!\right)
\!\!\!$ $\displaystyle =$ $\displaystyle \frac{1}{\rho_M\cdot r_{2_M}}\!\cdot\!
\log\left( \frac{r_{2_M}\!\cdot\! \rho_M}{r_1} \right)
\hspace{0.5cm}(0<r_1\le r_{2_M}\cdot\rho_{M})\ \ \ \ $  
      $\displaystyle $ (107)

Figure: Histogram of $r_1$ implied by priors on $r_2$ and $\rho$ flat up to $\rho_M=r_{2_M}/$s$^{-1}\!=10$, compared to the exact evaluation of the pdf (solid line). Dashed lines: pdf of $r_1$ for $\rho_M=r_{2_M}/$s$^{-1}\!=30, 100, 300$ (higher to lower, that is from steeper to flatter).
\begin{figure}\begin{center}
\epsfig{file=pdf_r1-flat_rho_r2.eps,clip=,width=1.025\linewidth}
\\ \mbox{} \vspace{-1.2cm} \mbox{}
\end{center}
\end{figure}
An example with $\rho_M=1$ and $r_{2_M}=10\,$s$^{-1}$ is reported in Fig. [*], in which the exact pdf (blue solid line) is compared with the Monte Carlo result. The plot also shows the pdf's of $r_1$ for increasing maximum values ( $\rho_M=r_{2_M}/$s$^{-1}=30, 100, 300$, from higher to lower curves). We see that for $\rho_M\rightarrow \infty$ and $r_{2_M}\rightarrow \infty$ also the distribution of $r_1$ becomes flat. This is an interesting result, showing that, contrary to the model of Fig. [*], the model of Fig. [*] can accommodate in practice flat prior distributions for the three quantities of interest.33