Beta is a conjugate prior for binomial, normal is a conjugate for normal, and gamma is a conjugate prior for precision

· 675 words · 2 minute read

Binomial model 🔗

  1. posterior dist. of theta ~beta(alpha+y, beta)
  2. E(theta) = alpha/(alpha+beta), Var(theta) =(alpha*beta)/(..)

Normal model 🔗

  1. Assume tau known, mu: normal prior to normal posterior

  2. Assume mu known, tau: gamma(alpha,beta) prior to gamma posterior E(tau) = alpha/beta, var(tau) = beta/alpha

  3. both mu and tau unknown.

  • Prior :

    • conditional dist of mu prior is normal (conditional on tau)
    • marginal dist of tau prior is a gamma
  • Posterior:

    • conditional dist of posterior mu is normal; marginal dist of post mu is T dist.
    • marginal dist of posterior tau is gamma

2024-03-06 更新 🔗

#3 咱可以看到one way anova 里面因为关心2个东西:1)within group variance; 2) b/w group variance 所以可以看作是2层简单的模型。感兴趣的params那么就有4个:对于within group服从Normal的两个参数,以及b/w group的Normal dist.的两个参数。另外我们看到我们的模型里三组方差齐,用了同一个Tau参数。

2024-03-12 更新 🔗

  1. posterior of u_i –> Y_ij | u_i
  2. posterior of u_0 –> u_i|u_0
  3. 有时候在multilevel model里面,我们可能会不知道是否要加多少的hyper dist. 我们可以先分析一下param of interests.比如这里我们感兴趣的是mean/dist of Y_ij (1) 和 mean/dist of u_i(2).所以我们需要给Y_ij的分布里的均值ui (1)加prior dist,然后才能计算均值ui (1)的posterior;同样,ui的均值/分布(2)也是我们感兴趣的,所以我们先给ta加一个prior,代表我们对这个ui的均值/分布(2)的一些belief,然后再计算ui的均值/分布(2)的posterior.
  4. 或者我们在写model的时候,多用conditional prob, 比如我们Y_ij|ui, ui|u0; 那就代表我们感兴趣的是Y_ij的mean dist (which is ui),以及ui的mean dist(which is u0).
  5. 可以看一下Week5 ANOVA example (diamond example- color var with 5/6? categories) 当有很多个变量的时候,我们可以只分析一个然后做deduction。????

手机预览点这里

This browser does not support PDFs. Please download the PDF to view it: Download PDF.