We assume the letter x represents some observed data, and the Greek letter θ (theta) represents the value of a parameter Θ, and we wish to estimate θ by making use of the data x.
Independent Outcomes: If a set of individual outcomes are independent then the probability of that outcome set is obtained by multiplying the probabilities of each of the individual outcomes together.
For example, consider a coin for which the probability of a head x_{h} is p(x_{h}) = 0.9, and the probability of a tail x_{t} is therefore p(x_{t}) = (1 − 0.9) = 0.1. If we flip this coin twice then there are 4 possible pairs of outcomes: two heads (x_{h}, x_{h}), two tails (x_{t}, x_{t}), a head followed by a tail (x_{h}, x_{t}), and a tail followed by a head (x_{t}, x_{h}). In order to work out some averages, imagine that we flip this coin twice, 100 times. We label each flip according to whether it came first or second within a pair of flips, so we have 100 first flip outcomes, and 100 corresponding second flip outcomes (see Table C.1).
Given that p(x_{h}) = 0.9, we expect 90 heads and 10 tails within the set of 100 first flips, and the same applies to the set of 100 second flips. But what about the number of pairs of outcomes?
For each head obtained on the first flip, we can observe the corresponding outcome on the second flip, and then add up the number of pairs of each type (eg x_{h}, x_{h}). We already know that there are (on average)
$90=0.9\times 100,$ 
heads within the set of 100 first flip outcomes. For each of these 90 heads, the outcome of each of the corresponding 90 second flips does not depend on of the outcome of the first flip, so we would expect
$81=0.9\times 90,$ 
of these 90 second flip outcomes to be heads. In other words, 81 out of 100 pairs of coin flips should yield two heads. Notice that the figure of 90 heads was obtained from Equation C.1, so we can rewrite Equation C.2 as
81 
= 
0.9 × (0.9 × 100) 


= 
0.81 × 100, 
where 0.9 is the probability p(x_{h}) of a head, so the probability of obtaining two heads is p(x_{h})^{2} = 0.9^{2} = 0.81.
A similar logic can be applied to find the probability of the other pairs (x_{h}, x_{t}) and (x_{t}, x_{t}). For the pair (x_{t}, x_{t}), there are (on average) 10 tails observed in the set of 100 first flip outcomes. For each of these 10 flips, each of the corresponding 10 second flips also has an outcome, and we would expect 1 = 0.1 × 10 of these to be a tail too; so that 1 out of 100 pairs of coin flips should consist of two tails (x_{t}, x_{t}).
The final pair is a little more tricky, but only a little. For the ordered pair (x_{h}, x_{t}), as there are (on average) 90 heads from the set of 100 first flips, and we would expect 9 = 0.1 × 90 of the corresponding 90 second flips to yield a tail; so that 9 out of 100 pairs of coin flips should be (x_{h}, x_{t}) tails. Similarly, for the ordered pair (x_{t}, x_{h}), as there are (on average) 10 tails in the set of 100 first flips, we would expect 9 = 0.9 × 10 of the corresponding 10 second flips to yield a head; so that 9 out of 100 pairs of coin flips should be (x_{t}, x_{h}). If we now consider the number of pairs that contain a head and a tail in any order then we would expect there to be 18 = 9 + 9 pairs that contain a head and a tail. Notice that the figure of 90 heads was obtained from 90 = 0.9 × 100, so we can write this as 9 = (0.1 × 0.9) × 100, or p(x_{h})p(x_{t}) × 100.
In summary, given a coin that lands heads up on 90% of flips, in any given pair of coin flips we have (without actually flipping a single coin) worked out that there is an 0.81 probability of obtaining two heads, an 0.01 probability of obtaining two tails, and an 0.18 probability of obtaining a head and a tail. Notice that these three probabilities sum to one, as they should. More importantly, the probability of obtaining each pair of outcomes is obtained by multiplying the probability associated with each individual coin flip outcome.
We can apply this rule to any number of coin flips. For example, consider a coin flipped 5 times in succession, which yields the outcome sequence (x_{h}, x_{h}, x_{t}, x_{t}, x_{h}). Given that these individual outcomes are independent, the probability of the observed sequence is
p((x_{h}, x_{h}, x_{t}, x_{t}, x_{h})) 
= 
p(x_{h})p(x_{h})p(x_{t})p(x_{t})p(x_{h}) 


= 
${p\left({x}_{h}\right)}^{3}\times {p\left({x}_{t}\right)}^{2}$ 


= 
0.007. 
Note that this is the probability of a particular sequence or permutation, and the probability of 3 heads and 2 tails in any order involves a constant in the form of a binomial coefficient (see Appendix E).
Conditional Probability: The conditional probability that X = x given that Θ = θ is defined as
$\begin{array}{ccc}p\left(x\right\phantom{\rule[0.0ex]{0.2em}{0.0ex}}\theta )& =& p(x,\theta )/p\left(\theta \right)\mathrm{.}\end{array}$ 
The Product Rule: Multiplying both sides of Equation C.8 by p(θ) yields the product rule (also known as the chain rule)
$\begin{array}{ccc}p(x,\phantom{\rule[0.0ex]{0.2em}{0.0ex}}\theta )& =& p\left(x\right\phantom{\rule[0.0ex]{0.2em}{0.0ex}}\theta )/p\left(\theta \right)\mathrm{.}\end{array}$ 
The Sum Rule and Marginalisation: The sum rule is also known as the law of total probability. In the case of a discrete variable,
$\begin{array}{ccc}p\left(x\right)& =& \underset{i=1}{\mathrm{\Sigma}}p(x,\phantom{\rule[0.0ex]{0.2em}{0.0ex}}{\theta}_{i}),\end{array}$ 
and, applying the product rule, yields
$\begin{array}{ccc}p\left(x\right)& =& \underset{i=1}{\mathrm{\Sigma}}p\left(x\right\phantom{\rule[0.0ex]{0.2em}{0.0ex}}{\theta}_{i})p\left({\theta}_{i}\right)\mathrm{.}\end{array}$ 
In the case of a continuous variable, the sum and product rules yield
$p\left(x\right)={\int}_{\theta}^{}\phantom{\rule[0.0ex]{0.2em}{0.0ex}}p(x,\theta )d\theta ={\int}_{\theta}^{}\phantom{\rule[0.0ex]{0.2em}{0.0ex}}p\left(x\right\phantom{\rule[0.0ex]{0.2em}{0.0ex}}\theta )p\left(\theta \right)d\theta \mathrm{.}$ 
This is known as marginalisation, and yields the marginal probability p(x) of the joint distribution p(X, Θ) at X = x. When applied to all values of X, marginalisation yields the marginal probability distribution p(X) of p(X, Θ).
Bayes’ Rule: If we swap θ for x in Equation C.9 then
$p(\theta ,x)=p\left(\theta \right\phantom{\rule[0.0ex]{0.2em}{0.0ex}}x)p\left(x\right),$ 
where p(θ, x) = p(x, θ). Thus,
$\begin{array}{ccc}p\left(\theta \right\phantom{\rule[0.0ex]{0.2em}{0.0ex}}x)p\left(x\right)& =& p\left(x\right\phantom{\rule[0.0ex]{0.2em}{0.0ex}}\theta )p\left(\theta \right)\mathrm{.}\end{array}$ 
Dividing both sides of Equation C.14 by p(x) yields Bayes’ rule
$\begin{array}{ccc}p\left(\theta \right\phantom{\rule[0.0ex]{0.2em}{0.0ex}}x)& =& \frac{p\left(x\right\phantom{\rule[0.0ex]{0.2em}{0.0ex}}\theta )p\left(\theta \right)}{p\left(x\right)}\mathrm{.}\end{array}$ 