2
Probability density functions
A crucial part of experimental work involves estimating the value of some
parameter. For instance, a physicist may used experimental measurements to
estimate the mass of the neutron in order to compare with theoretical predic-
tions. An astronomer may estimate the mass and radius of a white dwarf to
test if they are consistent with white dwarfs being held up by electron degen-
eracy pressure. Estimation problems are common place even outside academic
research. A stock broker may estimate the value of some stock, a restaurant
owner must estimate the number of customer she expects on a given evening,
a football stadium must estimate the number of fans they expect to buy tickets
at their price point and so on. In chapter 1 we solved an estimation problem
by using Bayes’ theorem to estimate the bias of a coin. We wrote down an
equation to calculate the posterior probability for the bias. In this chapter, we
will first learn to interpret this posterior distribution. This will allow us to make
pithy statements about what we believe the bias to be based on the shape of the
posterior distribution. We will then learn that there are some probability distri-
bution shapes that keep appearing in so many problems. These shapes and their
properties deserve special attention. We will finally learn how we can translate
our belief in the value of some parameter to other parameters that are related
to the first parameter.
2.1 Probability density functions
Let us start with the coin toss example from Chapter 1 where we wanted to
estimate the bias of a coin, b using data from an experiment (8 tails out of 13
tosses). We wrote en expression for the posterior probability of b having some
16
2.1 Probability density functions 17
value using Bayes’ theorem as
Prob(E|b) ⇥ Prob(b)
Prob(b|E) =
Prob(E)
which given the experimental outcome we have amounts to
13
C8 b8 (1 b)13 8
⇥1
Prob(b|E) = R .
db13C 8 b8 (1 b)13 8
Notice that we have assumed the so-called ‘flat prior’ on the parameter b, That
is P(b) = 1; b 2 (0, 1], to account for a lack of any prior belief on the value of
b. We will return to why the prior probability must equal unity soon.
For every choice for the value of b the posterior probability can be cal-
culated. The largeness of smallness of this posterior probability tells us how
likely it is for the true value of b to be equal to the chosen value. Figure 2.1 is
the output of a program that calculates the posterior probability on an array of
choices for b ranging from 0 to 1.
Figure 2.1 Posterior distribution of the bias of a coin (towards tails) that gave 8
tails out of 13 tosses.
We notice that the posterior curve has attains very low values for very small
and very large values of b which means that the coin is unlikely to be extremely
biased towards heads or towards tails. The curve also peaks around a bias of
18 Probability density functions
0.6 which makes sense because we obtained more tails than heads in the ex-
periment so the coin is likely to be slightly biased towards tails. How slightly?
notice that the peak is also quite broad which tells us that other values around
0.6 could also be the true value. In fact, the y-axis value of the curve at b = 0.5
(unbiased coin) is also quite high so the coin could be a fair one. Here we no-
tice the first important aspect of such probability curves: that the location of
the peak and the width of the peak tell us about the most likely value of the
parameter and the range within which its value could lie, respectively.
The curve such as the ones in Figure 2.1 and Figure 2.2 are called probabil-
ity density functions, or PDFs. They are called density functions because they
show us the probability of a continuous variable as opposed to discrete vari-
able. What we mean by this is that because the set of real number is infinite
it does not make sense to ask what is the probability of b being a particular
value, say b = 0.60178. With infinitely many possibilities, the probability of
a particular value will tend to zero. Instead, it only makes sense to assign a
probability for a finite range of values of b. The value of the posterior curve
at some value b0 should therefore be interpreted as the probability that b lies
within an infinitesimal range db around the value b0 . With this definition, the
probability that the value of b lies in the interval (b1 , b2 ) is simply the integral
Z b2
P(b1 < b < b2 ) = db PDF(b)
b1
In this sense, what we have is a probability density curve which must be inte-
grated to get actual probabilities.
Notice that because b must lie between 0 and 1, the integral for b1 = 0 and
b2 = 1 must be equal to unity. In fact, all properly normalized PDFs should
integrate to unity. This is why we chose out prior density function as P(b) =
1; b 2 (0, 1] such that it has a flat shape and integrates to unity.
Now that we know how to interpret PDFs, let us consider what happens if
we ran the experiment much longer. Figure 2.2 shows what would the posterior
PDF curve look like if say we did 100 tosses and got 63 tails. We see that the
curve is more narrowly peaked around 0.6. This makes sense as it was possible
for an unbiased coin to give you 8 tails in 13 tosses (instead of 6 or 7) just out
of random chance, but is very unlikely for an unbiased coin to keep giving an
excess of tails again and again for 100 tosses just out of random chance. The
more data we have, the more certain we become of our estimate. The width of
the peak is really a measure of the uncertainty in our estimated value for the
parameter.
So far we have only made qualitative statements. Can we be more quantita-
tive about our statements on the likely value of the parameter— let us call this
2.2 Central value, dispersion and confidence intervals 19
Figure 2.2 Same as Fig. 2.1 but for the case of 63 tails in 100 tosses.
the central value, and our measure of uncertainty of this value— let us call this
the dispersion or just uncertainty?
2.2 Central value, dispersion and confidence intervals
Suppose, someone wants to know the answer to the question: ‘what is the prob-
ability that the coin is biased towards tails?’ We may show this person the PDF
curve but that would be one step away from answering the question. The ques-
tion really is ‘what is the probability that b lies in the interval [0.5, 1]. That is
simply
Z 1
P(tails bias = db PDF(b)
0.5
For the case of the curve in Figure 2.2 this works out to be 0.9954. So our reply
would be ‘We am 99% certain that this coin is biased towards tails.’ For the
curve in Figure 2.1 this value works out to be only 0.78801. So with just 13
tosses we can only be around 79% certain that the coin is biased towards tails.
This is called assigning a confidence interval to the value of some parameter,
the interval here being (0.5, 1) and the degree of confidence being 79%.
20 Probability density functions
Another question we may get is “By how much is it biased?” We now have
to find the central or most representative value for b. We could just pick out
the peak of the curve. This is called the ‘most likely’ value. Alternatively, we
could calculate the ‘average’ value of the bias— analogous to the average of a
population. When we calculate the average of a list of measurements, we add
up all the measurements and divide by the number of measurements. Similarly
to find the average value of a PDF, we divide the PDF curve into N equal inter-
vals between (b0 , b1 ), (b1 , b2 ) and so on till (bn 1 , bn ) and assign the constant
values of PDF(b0 ), PDF(b1 ) and so on until PDF(bn 1 ) to the value of the PDF
within these intervals. The average value of b then becomes the weighted mean
1 X
avg(b) = PDF(bi ).
N i
where the weights are given by the PDF values.
The above equation can be written in integral form by taking the limit as the
interval length goes to zero. The resulting value is called the ‘expected value’
of b and it is customary to denote it using angular brackets:
Z
average(b) ⌘ hbi ⌘ db PDF(b)
The most likely and expected value are good enough for probability curves
that have a nice symmetric peak. Sometimes we are dealing with curves that
are very lopsided, that is, they run down the peak abruptly on one side and
very gradually on the other. A commonplace example of this is the PDF of
incomes of households as shown in Fig. 2.3. As you can see there is so much
area under the curve right of the peak that choosing the likely value or even
the expected value may give a misleading impression on the central value of
the income. In other words, if there are a small number of extraordinarily rich
people, then they will drag the mean value upwards but that does not make an
average person feel rich. This is why rarely hear the terms ‘most likely’ income
or ‘expected’ or ‘mean’ income on the news. Instead we often hear about the
median income. Median is the 50th percentile value by which we mean that
half of the people have income above the median (and half below, of course).
For a PDF, we mean to say that the median is the dividing line placed such that
half of the area under the curve is to the right of the line (and the other half is
to the left).
It makes sense to use median in this case not only because the curve is lop-
sided but also because humans subjectively evaluate their financial position in
comparison to the number of people around them who are richer or poorer than
them and not necessarily by the number of people weighted by their respective
2.2 Central value, dispersion and confidence intervals 21
Figure 2.3 PDF of a hypothetical income distribution with the likely, mean and
median values indicated.
incomes. We must pay close attention to the choice of statistic we quote to
minimize the chances of misleading others.
In astronomy, we use median as a measure of central value in cases where
the underlying distribution is highly skewed. For instance if a survey detects
sources over a large redshift range, then we quote the median redshift of sources
detected in the survey. This is because a redshift interval of say z = 0.1 has
much less volume at z = 0.5 then at z = 1. If the survey is sufficiently sensi-
tive then it will detect many more sources at higher redshifts simply because
there exist many more of them and not necessarily because they have di↵erent
properties. Median of the resulting skewed distribution is a better measure of a
typical source in the survey than the mean. Median is used often in astronomy
also because physical properties of astrophysical objects span many orders of
magnitude. A rare ultra-bright object that happened to be in our survey will bias
the mean brightness of objects in our survey to very large values and give the
wrong impression about the brightness of objects we have detected. Quoting
the median insures against the overbearing influence of such outliers. There are
other measures of central value such as the ‘mode’ of a distribution but these
are very rarely used in astronomy. Mean for symmetric PDFs and median for
22 Probability density functions
skewed PDFs or for parameters that span many orders of magnitude are the
most common choices.
Let us return to our interlocutor who is asking us questions about the bias.
Suppose the next question is“What is the range within which we are fairly
certain that the bias lies?” We would then evaluate so-called ‘confidence inter-
vals’. This is usually the interval around the central value of b within which
we are say 99% certain that the value of b lies. Suppose we choose the central
value to be the location of the peak— the most likely value, which in the case
of Figure 2.2 is about 0.63. Now let us find a range of b centred around this
value such that the integral of the curve in this range is 0.99. This would give
us a range within which we are 99% sure that the value of b lies. For the case
of the curve in Fig. 2.2 this range works out to be between 0.51 and 0.75. We
call this the 99% confidence interval for the parameter b.
The confidence interval tells us about the uncertainty in the estimate of b’s
value. Another common way to quote this uncertainty is via a di↵erent measure
of the width of the curve called the standard deviation which is analogous to
the sample standard deviation of a list of numbers. Just like we defined the
mean value above as a weighted average, we can write the standard deviation
to be
sX
1 ⇥ ⇤2
std(b) = b avg(b) PDF(b)
N i
which in integral form is
sZ
std(b) ⌘ (b) ⌘ db [b hbi]2 PDF(b)
The square of the standard deviation is called the variance. It is customary to
use the symbols and 2 for the standard deviation and variance, respectively.
As an interesting aside, another formal method to specify the properties of
the function PDF(b) is the value of the so-called moments of the function. The
nth moment of the function is defined as
Z
n n
M (PDF) ⌘ hb i ⌘ db bn PDF(b)
It is clear that the 0th moment of any probability density function must be
equal to 1. The first moment is the mean or expected value of the parameter
that the function describes. The equation for the second moment looks like
the equation for the variance but with the expected value subtracted from b
in the integrand. This is called the central moment where the qualifier central
2.2 Central value, dispersion and confidence intervals 23
specifies that the expected has been subtracted which is equivalent to centring
the PDF curve on an x-axis value of 0. The variance is therefore the second
central moment of the PDF and is a measure of the width of the peak. The third
central moment is called skewness and measure the degree of lopsidedness of
the peak. A common use of skewness in astronomy is to measure the extent
of gravitational collapse in the large-scale structure of the Universe. Because
gravitational collapse that forms bound objects such as galaxies leads to large
outliers in the matter density, skewness is a measure of departure from initial
symmetry in the PDF of density fluctuations to later asymmetry caused by
gravity.
Let us now summarize all the ways we can quantify the shape of the PDF of
a parameter we have just estimated.
• Central value:
(i) Most likely value — location of the peak of the PDF.
(ii) Expected value — First moment.
(iii) Median value — value above which the area under the curve is half.
• Dispersion:
(i) Confidence level— Fraction of the area under the PDF that lies in a given
range.
(ii) X% Confidence interval — Interval around the central value within which
X% of the area under the PDF lies.
(iii) Variance — second central moment of the PDF.
(iv) standard deviation — square root of the variance.
• Skewness — third central moment of the PDF. Quantify the degree of as-
symetry of the PDF peak
Finally, here are examples of statistical statements that can be made about
what we have learnt about the bias parameter b from our coin-toss experiment.
• “We place the constraint b > 0.5 with a confidence of 99.54%.”
• “The most likely value of b is 0.6296.”
• “The expected value and standard deviation of b are 0.627 and 0.002 respec-
tively. ”
• “We estimate the bias to be b = 0.627 ± 0.002.”
• “We estimate the bias to be b = 0.627(2).”
• “The 99% confidence interval of b is [0.5065, 0.7527].”
Coin tosses and dice rolls make for good starting points to appreciate the
power of PDFs and parameter estimates. Let us now advance closer to real-
world uses with two examples. The first one concerns to efficacy of a new
24 Probability density functions
medical intervention and the second one concerns a question of defence pro-
duction during world war II.
2.3 Example: Use of estimation in scientific experiment
Suppose the standard intervention for some scary-disease has a 87% chance of
success. There is a new proposed medical intervention which has been tried on
10 volunteer patients and they all recovered. It is a 100% success rate! The old
procedure with its 87% odds of success would have left 1 or 2 of the 10 patients
still su↵ering. The new procedure appears to be better but how sure can we be
that it is better and that the 100% cure rate is not due to pure chance?
Let us cast this as an estimation problem. We wish to estimate the success
rate of an intervention, say b. The outcome is binary: either the patents are
cured (success) or not (failure). b must lie between 0 (intervention always fails)
and 1 (intervention always succeeds). The situation is mathematically identical
to estimating the bias of a coin.
Let us write down the posterior of b, the probability of the new procedure
succeeding in curing the illness given the volunteer experiment, E.
P(E|b)P(b)
P(b|E) =
P(E)
You know from the coin-toss example that P(E|b) =13 C0 b13 = b13 . What is
the prior, P(b)?. Because it is a new intervention, so you have no prior knowl-
edge of b so we will assign a uniform distribution as the prior:
P(b) = 1 b 2 (0, 1]; = 0, otherwise
Remember that the denominator, the evidence is just the integral of the numer-
ator taken over the variable b. We can code all of this in a computer and get the
black curve in Fig. 2.4
We now have to calculate the probability that the new intervention is an
improvement over the old which is P(b > 0.87). This can be obtained by
numerically integrating the curve between 0.87 and 1. It turns out to be 0.79.
So there is a 79% chance that the new intervention is better and a 21% chance
that it is as good or worse than the old intervention.
Because there is still a substantial chance that the new intervention is not
better, it cannot be made into standard practice yet. More volunteers are needed
to bring down the uncertainty in our estimate of its true efficacy just like more
coin tosses were needed to narrow down the possible range for the coin’s bias.
2.3 Example: Use of estimation in scientific experiment 25
Figure 2.4 Posterior distribution of the chance of success of the new intervention
(black) and the area under the curve where the new intervention is better than the
standard intervention (cyan).
Suppose 40 more volunteers were signed up out of which 38 recovered giv-
ing a total of 48 recoveries out of 50. The new posterior is shown in Fig. 2.5
and the area under the curve above 0.87 is 97%.
In fact we can pre-calculate what our conclusions will be for di↵erent ex-
perimental outcomes as shown in table 2.3.
Number that recover Confidence that intervention is better
50 99.9%
49 99.3%
48 97%
47 91.4%
46 81.3%
45 67%
We see that not only the central value but our confidence in the new inter-
vention being better depends on the outcome of the experiment. This is the
26 Probability density functions
Figure 2.5 Same as Fig. 2.4 but assuming 48 out of 50 recover.
because the area under the posterior curve to the right of 0.87 depends on what
the real chance of success of the new intervention is. If the real chance of suc-
cess if close to that of the old intervention, it will take many more trials to
statistical separate their potency in curing the illness.
There is an interesting aside here. We have assumed that we know the suc-
cess rate of the old intervention with zero uncertainty. In reality even the po-
tency of the old intervention is only known with some uncertainty as it was
also estimated from experiment. Suppose the posterior PDF for the efficacy
of the old intervention (i.e. probability of patient being cured) be PDFold (b)
and the posterior density for the new intervention be called PDFnew (b). Be-
cause we are now dealing with two unknown efficacy estimates, we must work
with their joint PDF, say f (bold , bnew ) which is the probability that the old and
new efficacies are lie in an infinitesimal area dbold ⇥ dbnew around the point
(bold , bnew ). If the outcomes of the old and new interventions are indepen-
dent of one another then the joint density will just reduce to f (bold , bnew ) =
PDFold (bold ) ⇥ PDFnew (bnew ).
Then the probability that the new intervention is better is given by integrat-
2.4 Example: The German tank problem 27
ing over a region in the (bold , bnew ) plane where bnew > bold , which is
Z 1 Z 1
P(bnew > bold ) = dx dy PDFold (x)PDFnew (y).
0 x
2.4 Example: The German tank problem
Now let us consider a fascinating example of paramter estimation from the
second world war (WW2). During WW2, the Allies needed to estimate the
number of tanks produced by the German military producing per month. Every
time a German tank was captured in battle, the allied soldiers could read o↵
the serial number on the gearbox of the tank. By looking at the serial numbers,
perhaps they could estimate the maximum serial number, N?
As a start, N must be larger than the maximum serial number of all the
captured tanks. But how much larger? Let us assume that each tank is equally
likely to be captured. If say three tanks were captured with serial numbers 2,
4, and 7. Then N cannot be very large, because, if N were say 1000, as the
intelligence reports claimed, then why are all the captured serial numbers so
small? So we can say something more than the obvious N 7 after all.
The mathematical statement of the problem is: If k numbers are drawn at
random from the set 1,2,3...N and the maximum of the k numbers is n then es-
timate the PDF of N. Let us apply Bayes’ theorem to estimate N. We start with
the prior. Suppose we have no other information about N before the experiment
(tank capture), so we must choose a uniform prior.
P(N) = W 1 ; N 1
and 0 otherwise. Here W is some large number which we believe if the upper
limit of how many tanks can possibly be produced per month.
What is the likelihood? It is the probability, given N, of finding the maxi-
mum number n in k random draws. The number of all possible draws is N Ck . Of
these, how many satisfy the observation? The number n must be in the draws
that satisfy the observations. So we are only left with choosing k 1 numbers
out of the n 1 numbers that are smaller than n. This can be done in (n 1)C(k 1)
ways. OK so we have the likelihood:
(n 1)
C(k 1) k2 (n 1)!(N k)!
P(N|E) = NC
=
k (n k)!N!
which is
k(n 1)(n 2)....(n k + 1)
P(N|E) =
N(N 1)(N 2)....(N k + 1)
28 Probability density functions
The evidence is just the summation of the numerator over all possible values
of N. So we have everything we need to calculate the posterior. Suppose 3 tanks
were captured (k = 3) and their serial numbers were 43, 87, 112, so n = 112.
The numerically calculated posterior is shown in the top panel of Fig. 2.6.
The 50th percentile (i.e the median) and 90th percentile values work out to
be 159 and 351 tanks per month, respectively. If say the peak serial number
were the same but we had k = 20 captured tanks, then the posterior is given in
the bottom panel of the figure. Now we have the 50th and 90th percentile values
of 117 and 127. Even with just 3 tanks captured, our estimation of the number
of tanks manufactured per month is surprisingly good.
As an aside, notice that the likelihood converges to zero as N is increased
to very large values. This means that if a sufficiently large value for W is cho-
sen it will not a↵ect the posterior significantly. So if we indeed have no prior
information on W then we can experiment with increasingly larger values of
W and settle when increasing W further does not substantially change the 50th
and 90th percentile values.
Obviously, this example omits messy details inherent in the real world and
the values we used for k and n are hypothetical ones. But the proper analy-
sis was actually done by the Allies’ statisticians during WW2. Here are three
median estimates for three di↵erent months of the war1 : 169, 244, and 327
tanks. The intelligence departments disagreed with the statisticians and stated
estimates of 1000, 1550 and 1550 tanks, respectively. Who was right? After
the war, with access to German records, the real numbers were revealed to
the Allies. For these three months, they were: 122, 271, 342. What a world of
di↵erence proper statistical calculations can make!
2.5 PDF of functions of parameters
We have so far learnt to carry out parameter estimation by constructing their
posterior PDFs. We have also learnt how to interpret these PDFs based on their
shapes. But what if experiment gave us the posterior PDF for some parameter
but we are really interested in a second parameter related to the one you have
just estimated? For example suppose we measure the speed of some funda-
mental particle, v. We have a posterior PDF for v but we are really interested in
the PDF for Energy, E = 1/2 ⇥ mv2 where m is known. The general statement
1 I have taken these figures from An Empirical Approach to Economic Intelligence in World War
II by Ruggles and Brodie, published in Journal of the American Statistical Association,
42(237), pp. 72–91.
2.5 PDF of functions of parameters 29
of the problem is: If the PDF of a random variable x is given by f x (x), what is
the PDF, fy (y) of the random variable y that is related to x by y = g(x)?
Let us return to the definition of probability density functions. Consider a
small range of values around x0 given by the interval [x0 dx/2, x0 + dx/2].
Let us assume that there is a monotonic mapping between the variable x and
y, that is the function g is such that if x increases, y either always increases or
always decreases. The probability that x lies in the interval [x0 dx/2, x0 +
dx/2] is given by f x (x0 )dx. Because of the monotonic criterion, this must be
the probability that y lies in the corresponding range [g(x0 dx), g(x0 + dx)]
which by definition of the PDF is fy (y)|g(x0 dx) g(x0 + dx)|. Note that
we have taken the absolute value to handle both monotonically increasing and
decreasing relationships while keeping the PDF always positive. We now we
have the relationship we seek:
f x (x)dx = fy (y)|g(x0 dx) g(x0 + dx)|
which in di↵erential form is
dg(x)
f x (x) = fy (y)
dx
or
1
dy
fy (y) = f x (x)
dx
dy
In our example, x = v and y = 12 mv2 . So dx = mv. The PDF of the energy is
therefore
⇣p ⌘
fv (v) fv 2E/m
fE (E) = = p
mv 2Em
Suppose the particles in the experiment had a thermal velocity distribution,
also called the Maxwell-Boltzmann distribution, the posterior PDF will be
!3/2 " #
m 2 mv2
fv (v) = 4⇡v exp
2⇡kB T 2kB T
The corresponding distribution for energy is
!3/2 " #
m 8⇡E E 1/2
fE (E) = exp (2Em) ,
2⇡kB T m kB T
which simplifies to
!1/2 " #
2 E E
fE (E) = p exp
kB T ⇡ kB T kB T
30 Probability density functions
The exponent of E/(kB T ) is the well-known Boltzmann factor from sta-
tistical mechanics and determines the properties of the energy distribution for
high energies.
Finally, in case we have a multi-variate function going from variables x, y
to l, m of the form l, m = f (x, y) then the di↵erential must be replaced by the
determinant of the Jacobian matrix when transforming between the joint PDF
of (x, y) and that of (l, m):
" @x @x #
flm (l, m) = f xy (x, y) det @l
@y
@m
@y
@l @m .
2.6 Example: Probability of exoplanet transit
One of the methods to detect the presence of exoplanets around stars is the
co-called transit method. In this method we detect ‘dips’ in the stars brightness
as the exoplanet passes in front of the stellar disc, obscuring a part of the disc.
Of course, not all exoplanets will transit in front of their stars as viewed from
the Earth. So the probability of a transit is an important factor when we (a)
plan experiments and when (b) we use detections of transiting exoplanets and
extrapolate to the properties of the overall exoplanet population.
Suppose a star with radius R⇤ has an exoplanet with radius R p in a circular
orbit at an orbital distance a. If all orientations of the orbital plane are equally
likely, then what is the probability that the exoplanet will transit the stellar
disc?
The first thing to appreciate is that stars are at great distances from us com-
pared to typical orbital distances. So we can simplify the calculations by as-
suming that the rays reaching the Earth are plane-parallel (see Fig. 2.7 left-
panel). In other words, all rays reaching us from the star are parallel to one
another regardless of where on the visible stellar disc they originate. With this
assumption, a transit requires the lateral distance between the centre of the stel-
lar disc and the exoplanet’s path, called the impact parameter b, to be less than
R⇤ + R p (see Fig. 2.7 right-panel). The probability of transit is therefore
P(transit) = P(b < r⇤ + R p )
The impact parameter depends on the orbital distance, a, and the inclination
of the orbital plane, i via the relationship b = a cos i. If the inclination is i = 0
then transit is impossible and if i = ⇡/2 then transit is guaranteed. Because
2.6 Example: Probability of exoplanet transit 31
R⇤ , R p , a are fixed in the problem, to calculate
!
R⇤ + R p
P(transit) = P(b < r⇤ + R p ) = P cos i < ,
a
we only need to know the PDF of cos i.
To assign a PDF to cos i we appeal to the theoretical method to assign
probabilities. The orbital inclination is determined by the orientation of a 3-
dimensional unit vector. The probability of finding the end of this vector within
some elemental area dA on the unit sphere must be the ratio of the area to the
total area which is 4⇡. The elemental area can be written in terms of the polar
angle, i and the azimuth angle as dA = d di sin i. Because the choice of i
places no restrictions (or provides no information) on the choice of , the two
angles are independent variables and their joint PDF can be written as
sin i
PDF(i, ) = PDF(i)PDF( ) = ; i 2 (0, ⇡), 2 (0, 2⇡).
4⇡
Notice that the distribution PDF( ) is uniform but not the distribution PDF(i).
This is because for a given interval di there is little area at small values of i (i.e.
near the poles) compared to larger values of i (i.e. near the equator). So it would
be a mistake to assume a uniform distribution for i. Because is not part of the
problem, we can marginalize over by integrating the joint PDF with respect
to . The integral yields 2⇡ and we get
sin i
PDF(i) = ; i 2 (0, ⇡)
2
Now that we have PDF(i) we must convert it to PDF(cos i) using the change of
variable i ! y = cos i. The Jacobian is
d(cos i)
= sin i.
di
However, the relationship is not monotonic if i is let to vary from 0 to ⇡. It is
monotonic in the interval (0, ⇡/2) and the interval (⇡/2, ⇡) is identical for the
purpose of this problem as it only changes the direction in which the planet
will transit. Hence we have restrict the interval to (0, ⇡/2) and multiply the
PDF by 2 to account for the contribution of the interval (⇡/2, ⇡). We can then
use the change of variable law and get
sin i
PDF(cos i) = = 1; cos i 2 (0, 1).
sin i
cos i is uniformly distributed. We now have the final transit probability as
the integral of the uniform distribution between 0 and (R⇤ + R p )/a which is
!
R⇤ + R p R⇤ + R p
P(transit) = P cos i < = .
a a
32 Probability density functions
In most cases, planets are much smaller than their host stars (R p ⌧ R⇤ and
the probability is approximately R⇤ /a. In case of the Earth-Sun system, we
have R⇤ /a ⇡ 0.005 which means that if alien civilizations exists then only
0.5% of them will see the Earth transit in front of the solar disc.
2.6 Example: Probability of exoplanet transit 33
Figure 2.6 Posterior distribution of the number of tanks in the German tank prob-
lem. Top panel is for the case of k = 3, n = 112 and the bottom panel is for the
case of k = 20, n = 112. Note the di↵erent x-axis extents of the two plots.
34 Probability density functions
Figure 2.7 Left-panel: Schematic description of the plane-parallel assumption
that simplifies our geometric calculations of planetary transit. The disc shown
is the star and the Earth is outside the field of view to the top-right. Right-panel:
Transit as viewed from the Earth where the smaller circle is the planetary disc and
the largher circle is the stellar disc.