Professional Documents
Culture Documents
Chapter 1 Basic Concepts: Thomas Bayes (1702-1761)
Chapter 1 Basic Concepts: Thomas Bayes (1702-1761)
Example 1:
Assume y i ~ N , 2 . Then,
1 n 2
p y | , 2 n exp 2 yi , y y1 , , yn .
t
2 i1
To obtain the information about the values of and 2 , two methods are
available:
yi y y
2
, ˆ2 i
.
ˆ y y i 1
y i 1
n n 1
s s
y z 2 , y z , P Z z , Z ~ N (0,1).
n 2 n 2 2
1
(b) Bayesian approach:
Introduce a prior density , 2 for and 2 . Then, after some
manipulations, the posterior density (conditional density given y)
f , 2 | y can be obtained. Based on the posterior density, inferences
about and 2 can be obtained.
Example 2:
X ~ b10, p : the
number of wins for some gambler in 10 bets,
where p is the probability of winning.
Then,
10
f x | p p x 1 p
10 x
, x 1,2, ,10.
x
x
.
For example, as x 10 ,
10
l p | x l p | 10 p 10 1 p
10 10
p 10 .
10
Thus, pˆ 1 . It is a sensible estimate. Since we can win all the time, the
sensible estimate of the probability of winning should be 1. On the other
hand, as x 0 ,
10
l p | x l p | 0 p 0 1 p 1 p .
10 0 10
0
Thus, pˆ 0 . Since we lost all the time, the sensible estimate of the
probability of winning should be 0. In general, as x n ,
n
pˆ , n 0,1, ,10,
10
2
p : prior density for p, i.e., prior beliefs in terms of probabilities of
various possible values of p being true.
Let
r a b a 1
p p 1 p Beta a, b .
b 1
r a r b
Thus, if we know the gambler is a professional gambler, then we can use
the following beta density function,
p 2 p Beta 2,1 ,
to describe the winning probability p of the gambler.
The plot of the density function is
Beta(2,1)
2.0
1.5
prior
1.0
0.5
0.0
If we know the gambler is a gambler with bad luck, then we can use the
following beta density function,
p 21 p Beta 1,2 ,
to describe the winning probability p of the gambler. The plot of the
density function is
3
Beta(1,2)
2.0
1.5
prior
1.0
0.5
0.0
0.5
0.0
If we don’t have any information about the gambler, then we can use the
following beta density function,
p 1 Beta 1,1 ,
to describe the winning probability p of the gambler. The plot of the
4
density function is
Beta(1,1)
1.2
1.1
prior
1.0
0.9
0.8
r a r b x
c a , b, x p 1 p
x a 1 b 10 x 1
In fact,
r a b 10
f p | x p x a1 1 p
b 10 x 1
r x a r b 10 x
Beta x a, b 10 x
Then, we can use some statistic based on the posterior density, for
example, the posterior mean
xa
E p | x pf p | x dp
1
0 a b 10
.
As x n ,
an
pˆ E p | n
a b 10
5
Note:
f p | x pl p | x
the original informatio n about p the informatio n from the data
the new informatio n about p given the data