This module introduces conditional probabilities and Bayes' rule.
If
$A$ and
$B$ are two separate but possibly
dependent random events, then:
Probability of
$A$ and
$B$ occurring together =
$(,(A, B))$
The conditional probability of
$A$ , given that
$B$ occurs =
$(B, A)$
The conditional probability of
$B$ , given that
$A$ occurs =
$(A, B)$
From elementary rules of probability (Venn diagrams):
$(,(A, B))=(B, A)(B)=(A, B)(A)$
Dividing the right-hand pair of expressions by
$(B)$ gives Bayes' rule:
$(B, A)=\frac{(A, B)(A)}{(B)}$
In problems of probabilistic inference, we are often trying to
estimate the most probable underlying model for a randomprocess, based on some observed data or evidence. If
$A$ represents a given set of model
parameters, and
$B$ represents the
set of observed data values, then the terms in
are given the following terminology:
$(A)$ is the
prior probability of the model
$A$ (in the absence of any evidence);
$(B)$ is the probability
of the
evidence$B$ ;
$(A, B)$ is the
likelihood that
the evidence
$B$ was
produced, given that the model was
$A$ ;
$(B, A)$ is the
posterior probability of the model being
$A$ , given that the evidence is
$B$ .
Quite often, we try to find the model
$A$ which maximizes the posterior
$(B, A)$ . This is known as
maximum a posteriori or
MAP model selection.
The following example illustrates the concepts of Bayesian model
selection.
Loaded dice
Problem:
Given a tub containing 100 six-sided dice, in which one die
is known to be loaded towards the six to a specified extent,derive an expression for the probability that, after a given
set of throws, an arbitrarily chosen die is the loaded one?Assume the other 99 dice are all fair (not loaded in any
way). The loaded die is known to have the following pmf:
$${p}_{L}(1)=0.05$$$$\{{p}_{L}(2), \dots , {p}_{L}(5)\}=0.15$$$${p}_{L}(6)=0.35$$ Here derive a good strategy for finding the loaded die from
the tub.
Solution:
The pmfs of the fair dice may be assumed to be:
$$\forall i, i=\{1, \dots , 6\}\colon {p}_{F}(i)=\frac{1}{6}$$ Let each die have one of two states,
$S=L$ if it is loaded and
$S=F$ if it is fair. These are our two possible
models for the random process and they have
underlying pmfs given by
$\{{p}_{L}(1), \dots , {p}_{L}(6)\}$ and
$\{{p}_{F}(1), \dots , {p}_{F}(6)\}$ respectively.
After
$N$ throws of the chosen
die, let the sequence of throws be
${\Theta}_{N}=\{{\theta}_{1}, \dots , {\theta}_{N}\}$ , where each
${\theta}_{i}\in \{1, \dots , 6\}$ . This is our
evidence .
We shall now calculate the probability that this die is the
loaded one. We therefore wish to find the
posterior$({\Theta}_{N}, S=L)$ .
We cannot evaluate this directly, but we can evaluate the
likelihoods ,
$(S=L, {\Theta}_{N})$ and
$(S=F, {\Theta}_{N})$ , since we know the expected pmfs in each case. We
also know the
prior probabilities
$(S=L)$ and
$(S=F)$ before we have carried out any throws, and these
are
$\{0.01, 0.99\}$ since only one die in the tub of 100 is
loaded. Hence we can use Bayes' rule:
The denominator term
$({\Theta}_{N})$ is there to ensure that
$({\Theta}_{N}, S=L)$ and
$({\Theta}_{N}, S=F)$ sum to unity (as they must). It can most easily be
calculated from:
To calculate the likelihoods,
$(S=L, {\Theta}_{N})$ and
$(S=F, {\Theta}_{N})$ , we simply take the product of the probabilities
of each throw occurring in the sequence of throws
${\Theta}_{N}$ , given each of the two modules respectively (since
each new throw is independent of all previous throws, giventhe model). So, after
$N$ throws,
these likelihoods will be given by:
We can now substitute these probabilities into the above
expression for
${R}_{N}$ and include
$(S=L)=0.01$ and
$(S=F)=0.99$ to get the desired a
posteriori probability
$({\Theta}_{N}, S=L)$ after
$N$ throws using
.
where
${R}_{0}=\frac{(S=F)}{(S=L)}=99$ . If we calculate this after every throw of the
current die being tested (i.e. as
$N$ increases), then we can either
move on to test the next die from the tub if
$({\Theta}_{N}, S=L)$ becomes sufficiently small (say
$<(10^{-4})$ ) or accept the current die as the loaded one when
$({\Theta}_{N}, S=L)$ becomes large enough (say
$>(0.995)$ ). (These thresholds correspond approximately to
${R}_{N}> 10^{4}$ and
${R}_{N}< 5E-3$ respectively.)
The choice of these thresholds for
$({\Theta}_{N}, S=L)$ is a function of the desired tradeoff between
speed of searching versus the probability of failure to findthe loaded die, either by moving on to the next die even
when the current one is loaded, or by selecting a fair dieas the loaded one.
The lower threshold,
${p}_{1}=10^{-4}$ , is the more critical, because it affects how long
we spend before discarding each fair die. The probability ofcorrectly detecting all the fair dice before the loaded die
is reached is
$(1-{p}_{1})^{n}\approx 1-n{p}_{1}$ , where
$n\approx 50$ is the expected number of fair dice tested before
the loaded one is found. So the failure probability due toincorrectly assuming the loaded die to be fair is
approximately
$n{p}_{1}\approx 0.005$ .
The upper threshold,
${p}_{2}=0.995$ , is much less critical on search speed, since the
loaded result only occurs once, so it is
a good idea to set it very close to unity. The failureprobability caused by selecting a fair die to be the loaded
one is just
$1-{p}_{2}=0.005$ . Hence the
$\mathrm{overallfailureprobability}=0.005+0.005=0.01$
In problems with significant amounts of evidence (e.g. large
$N$ ), the evidence probability
and the likelihoods can both get very very small, sufficientto cause floating-point underflow on many computers if
equations such as
and
are computed
directly. However the ratio of likelihood to evidenceprobability still remains a reasonable size and is an
important quantity which must be calculatedcorrectly.
One solution to this problem is to compute only the ratio of
likelihoods, as in
. A
more generally useful solution is to computelog(likelihoods) instead. The product operations in the
expressions for the likelihoods then become sums oflogarithms. Even the calculation of likelihood ratios such
as
${R}_{N}$ and comparison with appropriate thresholds can be
done in the log domain. After this, it is OK to return tothe linear domain if necessary since
${R}_{N}$ should be a reasonable value as it is the
ratio of very small quantities.
Questions & Answers
where we get a research paper on Nano chemistry....?
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest.
Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.?
How this robot is carried to required site of body cell.?
what will be the carrier material and how can be detected that correct delivery of drug is done
Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?