Lecture Notes on Dirichlet Distribution, Bayesian Analysis | STAT 310, Study notes of Mathematical Statistics

Material Type: Notes; Class: Introduction to Mathematical Statistics; Subject: STATISTICS; University: University of Wisconsin - Madison; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-42v-1
koofers-user-42v-1 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
STAT 310 DISCUSSION 9
TA: Yi Chai
Office: 1335N MSC
Webpage: http://www.stat.wisc.edu/chaiyi
Office Hours: 11:00-12:00pm T and 1:00-2:00pm Th or by appointment
1. Bayesian analysis
The Bayesian model for inference contains the statistical model fθ:θ for the data sSand
the prior probability distribution Π for θ.
The prior describes the statistician’s beliefs about the true value of the parameter θbefore ob-
serving the data.
Then one can compute the conditional density which is called the posterior distribution of θ
π(θ|s) = π(θ)f(s|θ)
m(s)
where m(s) = Z
π(θ)fθ(s).
2. Dirichlet distribution
Notation: θ= (θ1,· · · , θk1)Dirichlet(α1,··· , αk);
Probability density function:
p(θ) = Γ(α1+· · · +αk)
Γ(α1)· · · Γ(αk)θα11
1· · · θαk1
k
where, αi>0, θi>0, α0=Pk
i=1 αi,Pk
i=1 θi= 1.
E(θi) = αi
α0
;V ar(θi) = αi(α0αi)
α2
0(α0+ 1) ;Cov(θi, θj) = αiαj
α2
0(α0+ 1)
specially when k=2, it reduces to Beta(α1, α2) distribution.
3. Examples
Example 1 (7.1.1) Suppose that S={1,2}, = {1,2,3}, and the class of probability distributions
for the response sis given by the following table.
s= 1 s= 2
f1(s) 1/2 1/2
f2(s) 1/3 2/3
f3(s) 3/4 1/4
If we use the prior π(θ) given by the table
θ= 1 θ= 2 θ= 3
π(θ) 1/5 2/5 2/5
then determine the posterior distribution of θfor each possible sample of size 2.
1
pf2

Partial preview of the text

Download Lecture Notes on Dirichlet Distribution, Bayesian Analysis | STAT 310 and more Study notes Mathematical Statistics in PDF only on Docsity!

STAT 310 DISCUSSION 9

TA: Yi Chai Office: 1335N MSC Email: [email protected] Webpage: http://www.stat.wisc.edu/∼chaiyi Office Hours: 11:00-12:00pm T and 1:00-2:00pm Th or by appointment

  1. Bayesian analysis
    • The Bayesian model for inference contains the statistical model fθ : θ ∈ Ω for the data s ∈ S and the prior probability distribution Π for θ.
    • The prior describes the statistician’s beliefs about the true value of the parameter θ before ob- serving the data.
    • Then one can compute the conditional density which is called the posterior distribution of θ

π(θ|s) =

π(θ)f (s|θ) m(s)

where m(s) =

Ω

π(θ)fθ(s)dθ.

  1. Dirichlet distribution
    • Notation: θ = (θ 1 , · · · , θk− 1 ) ∼ Dirichlet(α 1 , · · · , αk);
    • Probability density function:

p(θ) = Γ(α 1 + · · · + αk) Γ(α 1 ) · · · Γ(αk)

θ 1 α 1 −^1 · · · θα kk^ −^1

where, αi > 0, θi > 0, α 0 =

∑k i=1 αi,^

∑k i=1 θi^ = 1.

  • E(θi) =

αi α 0 ; V ar(θi) =

αi(α 0 − αi) α^20 (α 0 + 1) ; Cov(θi, θj ) = −

αiαj α^20 (α 0 + 1)

  • specially when k=2, it reduces to Beta(α 1 , α 2 ) distribution.
  1. Examples
  • Example 1 (7.1.1) Suppose that S = { 1 , 2 }, Ω = { 1 , 2 , 3 }, and the class of probability distributions for the response s is given by the following table.

s = 1 s = 2 f 1 (s) 1/2 1/ f 2 (s) 1/3 2/ f 3 (s) 3/4 1/

If we use the prior π(θ) given by the table θ = 1 θ = 2 θ = 3 π(θ) 1/5 2/5 2/ then determine the posterior distribution of θ for each possible sample of size 2.

  • Example 2 (7.1.3) In Example 7.1.2, what’s the posterior probability that θ is positive, given that n = 10, x¯ = 1 when σ^20 = 1, θ 0 = 0, and τ 02 = 10? Compare this with the prior probability of this event.
  • Example 3 (7.1.4) Suppose that (x 1 , · · · , xn) is a sample from a Poisson(λ) distribution with θ > 0 unknown. If the prior distribution for λ given by the Gamma(α, β) distribution, then determinethe posterior distribution of λ.
  • Example 4 (7.2.1) For the model discussed in Example 7.1.1, derive the posterior mean of ψ = θm where m > 0.
  • Example 5 (7.1.8) In Example 7.1.2, when μ 0 = 2, τ 02 = 1, σ^20 = 1, n = 20, and ¯x = 8.2, generate a sample of 10^4 (or as large as possible) from the posterior distribution of μ and estimate the posterior probability that the coefficient of variation is greater than 1, i.e the posterior probability that σ 0 /μ < 0 .125. Estimate the error in your approximation. #7.1. #compute posterior distribution mu=1/(1/1+20/1)(2/1+20/18.2) sigma=sqrt(1/(1/1+20/1))

#generate randome variables random.mu=rnorm(10000, mu, sigma)

cov=1/random.mu #coefficient of variation = sigma/mu n=sum(cov>0.125) p=n/10000 #posterior probability p

d=1.96sqrt(p(1-p))/sqrt(10000) #margin of error c(p-d,p+d) #0.95 confidence interval for p