4
$\begingroup$

(I guess stats.SE is the right place for this)

I'm reading Albert's book "Bayesian computation with R". To get theprior predictive density, he extensively uses this formula

$$f(y) = \frac{f(y\mid \lambda) g(\lambda)}{g(\lambda | y)}, \qquad (1)$$

where $f(y\mid \lambda)$ is the (whatever model we have; in the specific example 3.3, Poisson) sampling density on $y$, $g(\lambda)$ prior density on parameter $\lambda$, and $g(\lambda \mid y)$ posterior density on $\lambda$.

Now, I'm thoroughly confused about this! Okay, the equation $$ f(y\mid \lambda) g(\lambda)) = g(\lambda \mid y) f(y) $$ is just the familiar Bayes' theorem rearranged, but I can't quite explain why we're using it, because don't we in the first place find the posterior by Bayes' theorem $$g(\lambda | y) = \frac{g(y\mid \lambda) g(\lambda)}{g(y)}$$ (or so, I'm not exactly sure about the notational logic behind $g$s and $f$s)? Why don't we end up with $f(y) = f(y)$?

I thought predictive distributions (prior and posterior) were solely attained by 'marginalizing', you know, this thing:

$$f(y) = \int_\Theta f(y\mid \theta) g(\theta) d \theta \qquad (2) $$

edit. (for prior predictive; and for posterior predictive something like $f(\tilde{y} \mid y) = \int_\Theta f(\tilde{y}\mid \theta) g(\theta \mid y) d \theta $)

$\endgroup$
2
$\begingroup$

The formulas$$f(y) = \frac{f(y\mid \lambda) g(\lambda)}{g(\lambda | y)}$$ for the prior predictive (or marginal) density and $$g(\lambda | y) = \frac{f(y\mid \lambda) g(\lambda)}{f(y)}$$for the posterior density are both derived from the joint distribution$$f(y\mid \lambda) g(\lambda)) = g(\lambda \mid y) f(y)$$which uses $f$ for densities of samples and $g$ for densities of parameters. They are simply used in different settings. For instance the prior predictive is useful to assess the fit of a given model.

$\endgroup$
2
  • $\begingroup$ Thank you! While your answer clarifies a bit, it doesn't answer all. for example, what's the difference between (1) and (2) (see edited question)? $\endgroup$
    – kekkonen
    May 23 '15 at 13:19
  • $\begingroup$ no difference at all. $\endgroup$
    – Xi'an
    May 23 '15 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.