Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Basic Bayesian Theory

Foreword

We will continue where we left off. In the last post, I introduced a few important observables along with the setup. We are interested in their asymptotics, and the behaviors of these random variables. But before we dive into them, we first see some motivation for their definitions, and how they are all connected to each other (the WAIC definition was pretty non-intuitive to me the first time I saw it). Somewhere along the middle, I will slightly detach from Watanabe’s notation to do this and approach this topic differently, before converging back to his notation. This is primarily done to make the relationships between the observables clearer, and to give a more detailed introduction. Once this is done, we will start with the asymptotics.

How do we see the relationships between those observables though, and even try to begin their asymptotics? To help you get settled with the mindset, I will give you the spoiler beforehand: Generating Functions.

For an arbitrary triple of a true distribution, a statistical model, and a prior, the behaviors of the free energy, the losses, and WAIC are derived by the following procedure:

  1. Firstly, we define the formal relation between a true distribution and a statistical model.

  2. Secondly, definitions of Bayesian observables and their normalized versions are introduced.

  3. Thirdly, the cumulant generating functions of the Bayesian prediction are defined.

  4. The Basic Theory of Bayesian Statistics is proved using the cumulant generating functions.

The Formal Relation

We make 4 main definitions right now.

Definition 1 (Realizability): Let WRdW \subset \mathbb{R}^d be the set of all parameters. If there exists w0Ww_0 \in W such that q(x)=p(xw0)q(x) = p(x|w_0) almost surely, then q(x)q(x) is said to be realizable by p(xw)p(x|w). For a given pair of true distribution and statistical model, the set of true parameters is defined by

W00={wW:q(x)=p(xw) for arbitrary x s.t. q(x)>0}W_{00} = \{w \in W: q(x) = p(x|w) \text{ for arbitrary } x \text{ s.t. } q(x) > 0\}

Thus, realizability holds iff the set of true parameters is not an empty set (one can see this by using the fact that the integral of both the functions is 1 and then using the almost sure condition).

We can alternatively write

W00={wW:q(x)logq(x)p(xw)dx=0}W_{00} = \{w \in W: \int q(x)\log\dfrac{q(x)}{p(x|w)}dx = 0\}

The average log loss function is defined by

L(w)=q(x)logp(xw)dxL(w) = -\int q(x) \log p(x|w) dx

It follows that

L(w)=S+K(q(x)p(xw))L(w) = S + K(q(x)\,\|\,p(x|w))

where S=q(x)logq(x)dxS = -\int q(x)\log q(x)dx is the entropy of the true distribution and K()K(\cdot\,\|\,\cdot) denotes the KL divergence. Hence, if q(x)q(x) is realizable by a statistical model, then the average log loss function is minimized iff wW00w \in W_{00}, and the minimum value is the entropy of the true distribution.

Some motivation: As we continue the learning process, our statistical model gets closer to the true distribution. The realizability assumption makes it simple for us and tells us that our statistical model can represent the true distribution, which need not be the case in general.

Definition 2 (Regularity): For a given pair of q(x)q(x) and p(xw)p(x|w), let W0={wW:L(w)=minwL(w)}W_0 = \{w \in W: L(w) = \min_{w'}L(w')\}, which is called the set of optimal parameters for the minimum average log loss. q(x)q(x) is said to be regular for p(xw)p(x|w) if the following three conditions hold:

  1. W0W_0 is a singleton set.

  2. w0W0w_0 \in W_0 is in the interior of WW (WW is equipped with the subspace topology from Rd\mathbb{R}^d).

  3. The Hessian matrix of the average log loss function at w0w_0 is positive definite.

Let us see a simple consequence of these definitions. If WW is a compact set and if L(w)L(w) is a continuous function, then L(w)L(w) has a minimum point, hence W0W_0 is not an empty set. In this case, q(x)q(x) is realizable by p(xw)p(x|w) iff W00=W0W_{00} = W_0 (reason this by yourself).

Some motivation: The regularity condition tells us that we can approximate the loss landscape near its minimum by a parabola. This follows by doing a Taylor approximation, doing an eigendecomposition of the Hessian, and then using the fact that all the eigenvalues are positive (do the exact calculations yourself). One of the main claims is that this is a terrible approximation in many cases and does not hold for the loss landscapes of general neural networks.

Definition 3 (Essential Uniqueness): Assume that W0W_0 is not an empty set. If there exists a unique probability density function p0(x)p_0(x) such that for arbitrary w0W0w_0 \in W_0, p(xw0)=p0(x)p(x|w_0) = p_0(x), then it is said that the optimal probability density function is essentially unique.

If q(x)q(x) is realizable by p(xw)p(x|w), then the optimal probability density function is essentially unique, because p0(x)=q(x)p_0(x) = q(x). Thus, realizability     \implies essential uniqueness.

Definition 4 (Relatively Finite Variance of Log Density Ratio Function): For a given pair w0W0w_0 \in W_0 and wWw \in W, the log density ratio function is defined by

>f(x,w0,w)=logp(xw0)p(xw)>> f(x, w_0, w) = \log \dfrac{p(x|w_0)}{p(x|w)} >

If there exists c0>0c_0 > 0 such that for an arbitrary pair w0,ww_0, w,

>EX[f(x,w0,w)]c0EX[f(x,w0,w)2]>> \mathbb{E}_X[f(x, w_0, w)] \geq c_0 \mathbb{E}_X[f(x, w_0, w)^2] >

then the function f(x,w0,w)f(x, w_0, w) has a relatively finite variance.

Remark: The function ff has a relatively finite variance iff

supwW0EX[f2]EX[f]<\sup_{w \notin W_0} \dfrac{E_X[f^2]}{E_X[f]} < \infty

Some motivation: What is the purpose of the theory that we are developing? We want to study the model’s distance from the truth, and how that develops over time. We want to abstract out the truth’s randomness from our process. Let us see what this condition is really about.

Let us look at the average log loss function (do you prefer to look at the asymptotics of a sum or a product? Take log.) whose definition is derived naturally from the average loss function.

EX[logp(Xw)]=EX[logq(X)]EX[logq(X)p(Xw)]\mathbb{E}_X[\log p(X|w)] = \mathbb{E}_X[\log q(X)] - \mathbb{E}_X\left[\log \dfrac{q(X)}{p(X|w)}\right]

=SK(w)= -S - K(w)

Removing the entropy considerations from SS, we get the “excess log loss over the truth per data point”, which is what the definition is in the realizable case (but look at the next lemma to understand the point in the general case). Thus the importance. This remark also says the mathematical statement to note, that the expectation of the log density ratio is the KL divergence between the true distribution and the model p(xw)p(x|w) in the realizable case. I have explained the ratio, I will explain the condition in a short while.

Lemma: Assume that w0W0w_0 \in W_0 and wWw \in W. If f(x,w0,w)f(x, w_0, w) has a relatively finite variance, then the optimal probability density is essentially unique.

Assume that w1w_1 and w2w_2 are arbitrary elements of W0W_0. By the definition of W0W_0, 0=L(w1)L(w2)=q(x)f(x,w1,w2)dxc0q(x)f(x,w1,w2)2dx0 = L(w_1) - L(w_2) = \int q(x)f(x, w_1, w_2)dx \geq c_0 \int q(x)f(x, w_1, w_2)^2 dx and as the integrand is non-negative, we get f(x,w1,w2)=0f(x, w_1, w_2) = 0 almost surely with respect to qq, hence p(xw1)=p(xw2)p(x|w_1) = p(x|w_2) almost surely with respect to qq. Do observe that this is not a clever proof, rather just making use of all the given information.

Thus, we may denote f(x,w0,w)=f(x,w)f(x, w_0, w) = f(x, w). It thus follows that p(xw)=p0(x)exp(f(x,w))p(x|w) = p_0(x)\exp(-f(x, w)).

Thus, relatively finite variance     \implies essential uniqueness. However, the converse need not be true. It does hold with a few added conditions.

Lemma: Assume that WW is a compact set and that q(x)q(x) is realizable by p(xw)p(x|w) and that the log density ratio function f(x,w)=logq(x)p(xw)f(x, w) = \log \dfrac{q(x)}{p(x|w)} is a continuous function of (x,w)(x, w). If there exist c1,c2>0c_1, c_2 > 0 such that for an arbitrary wWw \in W,

x>c1q(x)f(x,w)2dxc2xc1q(x)f(x,w)dx\int_{|x| > c_1} q(x)f(x, w)^2dx \leq c_2\int_{|x| \leq c_1} q(x)f(x, w)dx

then f(x,w)f(x, w) has a relatively finite variance.

I refer the reader to the book for the proof. It is not important to the rest of the theory, just some technical details.

Lemma: Assume that WW is a compact set and that for an arbitrary pair w0W0w_0 \in W_0 and wWw \in W, the second derivatives of EX[f(x,w0,w)]E_X[f(x, w_0, w)] and EX[f(x,w0,w)2]E_X[f(x, w_0, w)^2] are continuous functions. If q(x)q(x) is regular for p(xw)p(x|w), then the log density ratio function has a relatively finite variance.

The proof of this lemma is alongside the proof of the previous lemma.

Assume that WW is compact. We thus have the following relations:

  1. {\{Regular}{\} \subset \{Relatively Finite Variance}\}.

  2. {\{Realizable}{\} \subset \{Relatively Finite Variance}\}.

  3. {\{Relatively Finite Variance}{\} \subset \{Essentially Unique}\}.

┌─────────────────────────────────────────────────────────────┐
│ Essentially Unique                                          │
│                                                             │
│   ┌─────────────────────────────────────────────────────┐   │
│   │ Relatively Finite Variance                          │   │
│   │                                                     │   │
│   │      ┌──────────────────────┐                       │   │
│   │      │ Realizable           │                       │   │
│   │      │                ┌─────┼────────────────┐      │   │
│   │      │                │     │ Regular        │      │   │
│   │      │                │     │                │      │   │
│   │      └────────────────┼─────┘                │      │   │
│   │                       │                      │      │   │
│   │                       └──────────────────────┘      │   │
│   │                                                     │   │
│   └─────────────────────────────────────────────────────┘   │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Normalized Variables

We have the average and empirical log loss functions:

L(w)=EX[logp(Xw)]L(w) = -E_X [\log p(X|w)]
Ln(w)=1ni=1nlogp(Xiw)L_n(w) = -\frac{1}{n} \sum_{i=1}^n \log p(X_i|w)

Assume now that f(x,w0,w)=logp(xw0)p(xw)f(x, w_0, w) = \log \frac{p(x|w_0)}{p(x|w)} has a relatively finite variance. Then the optimal probability density is essentially unique, so we may denote the log density ratio by f(x,w)f(x, w).

See that L(w)=EX[log1p(Xw)]=EX[logp(Xw0)p(Xw)]EX[logp(Xw0)]L(w) = E_X \left[ \log \frac{1}{p(X|w)} \right] = E_X \left[ \log \frac{p(X|w_0)}{p(X|w)} \right] - E_X [\log p(X|w_0)]

=EX[f(X,w)]EX[logp(Xw0)]= E_X [f(X, w)] - E_X [\log p(X|w_0)]
=EX[f(X,w)]+L(w0)= E_X [f(X, w)] + L(w_0)

We define the normalized average log loss function as EX[f(X,w)]=K(w)E_X[f(X, w)] = K(w). A key thing to note in all the definitions is that we will be rewriting them in terms of f(x,w)f(x, w). The formal advantage is explained in a short while, but the understanding is that we want to remove the entropy of the optimal probability density and consider only the KL divergence between p0(x)p_0(x) and the model p(xw)p(x|w), as that is what we want to analyse (how that changes over time and what are the asymptotics).

(For this to make sense, note that EX[f(X,w)]=K(p0p(w))=K(w)E_X [f(X, w)] = K(p_0 \,\|\, p(\cdot|w)) = K(w), which equals K(qp(w))K(q \,\|\, p(\cdot|w)) in the realizable case.)

Similarly, we have the normalized empirical log loss function

Kn(w)=1ni=1nf(Xi,w)K_n(w) = \frac{1}{n} \sum_{i=1}^n f(X_i, w)

Furthermore, a key property of our normalized function is that K(w)0K(w) \ge 0, and K(w)=0    wW0K(w) = 0 \iff w \in W_0.

The partition function is defined as Zn=i=1np(Xiw)φ(w)dwZ_n = \int \prod_{i=1}^n p(X_i|w) \varphi(w) dw

Thus, Zn=exp(i=1nlogp(Xiw))φ(w)dwZ_n = \int \exp \left( \sum_{i=1}^n \log p(X_i|w) \right) \varphi(w) dw

=exp(i=1nlog1p(Xiw))φ(w)dw= \int \exp \left( - \sum_{i=1}^n \log \frac{1}{p(X_i|w)} \right) \varphi(w) dw

Thus, Zni=1np0(Xi)=exp(i=1nlog1p(Xiw))exp(i=1nlogp0(Xi))φ(w)dw\frac{Z_n}{\prod_{i=1}^n p_0(X_i)} = \int \exp \left( - \sum_{i=1}^n \log \frac{1}{p(X_i|w)} \right) \cdot \exp \left( - \sum_{i=1}^n \log p_0(X_i) \right) \varphi(w) dw

Zni=1np0(Xi)=exp(n1n(i=1nlogp0(Xi)p(Xiw)))φ(w)dw\Rightarrow \frac{Z_n}{\prod_{i=1}^n p_0(X_i)} = \int \exp \left( -n \cdot \frac{1}{n} \left( \sum_{i=1}^n \log \frac{p_0(X_i)}{p(X_i|w)} \right) \right) \varphi(w) dw
=exp(nKn(w))φ(w)dw= \int \exp ( -n K_n(w) ) \varphi(w) dw

We define this as the normalized marginal likelihood Zn(0)Z_n^{(0)}.

Thus, Zn=i=1np0(Xi)Zn(0)=exp(nLn(w0))Zn(0)Z_n = \prod_{i=1}^n p_0(X_i) \, Z_n^{(0)} = \exp(-n L_n(w_0)) Z_n^{(0)}.

Let us recall that the posterior is

p(wXn)=1Zni=1np(Xiw)φ(w)p(w|X^n) = \frac{1}{Z_n} \prod_{i=1}^n p(X_i|w) \varphi(w)
=exp(nLn(w))φ(w)exp(nLn(w0))Zn(0)= \frac{\exp(-n L_n(w)) \cdot \varphi(w)}{\exp(-n L_n(w_0)) Z_n^{(0)}}
=exp(nKn(w))φ(w)Zn(0)= \frac{\exp(-n K_n(w)) \cdot \varphi(w)}{Z_n^{(0)}}

Free energy is the negative log of the partition function. The normalized free energy is defined similarly.

Fn(0)=logexp(nKn(w))φ(w)dwF_n^{(0)} = -\log \int \exp(-n K_n(w)) \varphi(w) dw

Here is the table for the generalization, cross validation, and training losses and the WAIC, and also their normalized versions.

ObservableDefinitionNormalized version
Generalization loss GnG_nEX[logp(XXn)]-E_X [\log p(X \mid X^n)]EX[logEw[exp(f(X,w))]]-E_X [\log E_w [\exp(-f(X,w))]]
Training loss TnT_n1ni=1nlogp(XiXn)-\frac{1}{n} \sum_{i=1}^n \log p(X_i \mid X^n)1ni=1nlogEw[exp(f(Xi,w))]-\frac{1}{n} \sum_{i=1}^n \log E_w [\exp(-f(X_i,w))]
Cross validation loss CnC_n1ni=1nlogEw[1p(Xiw)]\frac{1}{n} \sum_{i=1}^n \log E_w \left[ \frac{1}{p(X_i \mid w)} \right]1ni=1nlogEw[exp(f(Xi,w))]\frac{1}{n} \sum_{i=1}^n \log E_w [\exp(f(X_i,w))]
WAIC WnW_nTn+1ni=1nVw[logp(Xiw)]T_n + \frac{1}{n} \sum_{i=1}^n V_w [\log p(X_i \mid w)]Tn(0)+1ni=1nVw[f(Xi,w)]T_n^{(0)} + \frac{1}{n} \sum_{i=1}^n V_w [f(X_i,w)]

Let us connect all these observables.


Defn: For α0\alpha \neq 0, we define the α\alpha-predictive at xx as

p(α)(x)=(Ew[p(xw)α])1/αp^{(\alpha)}(x) = \left( E_w \left[ p(x|w)^\alpha \right] \right)^{1/\alpha}

Note that this is the α\alpha-power mean of p(xw)p(x|w) with respect to the posterior distribution. Essentially, the observables come from this family.

Recall that the moment generating function of a random variable XX with PDF p(x)p(x) is given by MX(α)=E[eαX]M_X(\alpha) = E[e^{\alpha X}] and the cumulant generating function is GX(α)=logE[eαX]G_X(\alpha) = \log E[e^{\alpha X}]

We will look at the cumulant generating function of the log likelihood at xx (with a little notational change) wrt the posterior, which is exactly the log of the (α\alpha-predictive)α^\alpha.

gx(α)=logEw[p(xw)α]=logEw[eαlogp(xw)]g_x(\alpha) = \log E_w [p(x|w)^\alpha] = \log E_w [e^{\alpha \log p(x|w)}]

We can now write the observables in terms of the CGF.

Gn=EX[logEw[p(Xw)]]=EX[gX(1)]G_n = -E_X [\log E_w [p(X|w)]] = -E_X [g_X(1)]
Tn=1ni=1ngXi(1)T_n = -\frac{1}{n} \sum_{i=1}^n g_{X_i}(1)
Cn=1ni=1nlog1Ew(p(Xiw)1)=1ni=1ngXi(1)C_n = \frac{1}{n} \sum_{i=1}^n \log \frac{1}{E_w(p(X_i|w)^{-1})} = \frac{1}{n} \sum_{i=1}^n g_{X_i}(-1)

Thus they are all derived from the CGF. We will discuss WAIC shortly, and also note how it comes about.


Let us discuss the normalization first.

We define FX(α)=logEw[eαf(x,w)]F_X(\alpha) = \log E_w [e^{\alpha f(x,w)}] in the normalized coordinates.

The corresponding definitions in terms of FX(α)F_X(\alpha) give the normalized variables.

Note that FX(α)=gx(α)+αlogp0(x)F_X(\alpha) = g_x(-\alpha) + \alpha \log p_0(x).

The point of introducing the CGF is to be able to do a Taylor expansion here.

Doing a Taylor approximation near 0 (here g(0)=logEw[1]=0g(0) = \log E_w[1] = 0),

g(α)=g(0)+αg(0)+α22!g(0)+g(\alpha) = g(0) + \alpha g'(0) + \frac{\alpha^2}{2!} g''(0) + \dots

where g(0)=Ew[logp(xw)]=C1g'(0) = E_w [\log p(x|w)] = C_1 g(0)=Vw[logp(xw)]=C2g''(0) = V_w [\log p(x|w)] = C_2

So, gx(1)+gx(1)=C2+g(4)(θ)24+g(4)(θ)24g_x(1) + g_x(-1) = C_2 + \frac{g^{(4)}(\theta)}{24} + \frac{g^{(4)}(-\theta)}{24}

Summing over the training points and writing RnR_n for the accumulated remainder terms, we get

Tn+Cn=1ni=1nVw[logp(Xiw)]+Rn-T_n + C_n = \frac{1}{n} \sum_{i=1}^n V_w [\log p(X_i|w)] + R_n
Cn=Tn+1ni=1nVw[logp(Xiw)]+Rn\Rightarrow C_n = T_n + \frac{1}{n} \sum_{i=1}^n V_w [\log p(X_i|w)] + R_n

This gives rise to WAIC, and using the normalized CGF gives rise to the normalized WAIC.


Caveat: Watanabe does an abuse of notation (harmless) and defines it the following way. We will continue with this.

Gn(α)=EX[logEw[eαlogp(Xw)]]G_n(\alpha) = E_X \left[ \log E_w [ e^{\alpha \log p(X|w)} ] \right]
Tn(α)=1ni=1nlogEw[eαlogp(Xiw)]T_n(\alpha) = \frac{1}{n} \sum_{i=1}^n \log E_w [ e^{\alpha \log p(X_i|w)} ]

Thus, his definition is just the mean of our definitions. However, do note that the two means are different, since EXE_X and EwE_w do not commute.

I will now state the result which explains why we need to look at the normalized observables.

Fn/n=Ln(w0)+Op(logn/n)F_n/n = L_n(w_0) + O_p(\log n / n)
Gn=L(w0)+Op(1/n)G_n = L(w_0) + O_p(1/n)
Cn=Ln(w0)+Op(1/n)C_n = L_n(w_0) + O_p(1/n)
Tn=Ln(w0)+Op(1/n)T_n = L_n(w_0) + O_p(1/n)
Wn=Ln(w0)+Op(1/n)W_n = L_n(w_0) + O_p(1/n)

All these asymptotics abstract away from the prior. In the realizable case, they abstract away from the statistical model as well. We need to clarify the behavior of these random variables, look at higher order terms. The normalized versions of these all converge to 0 in probability, removing the effects of Ln(w0)L_n(w_0) and L(w0)L(w_0) and focusing on what is necessary.


We will now explain the asymptotics. We will be considering the normalized observables (and drop the (0) superscript):

Theorem: Let G(0),T(0),G(0),T(0)G'(0), T'(0), G''(0), T''(0) be random variables, and assume that

supα1(ddα)3Gn(α)=Op(1n)\sup_{|\alpha| \le 1} \left| \left( \frac{d}{d\alpha} \right)^3 G_n(\alpha) \right| = O_p\left(\frac{1}{n}\right)
supα1(ddα)3Tn(α)=Op(1n)\sup_{|\alpha| \le 1} \left| \left( \frac{d}{d\alpha} \right)^3 T_n(\alpha) \right| = O_p\left(\frac{1}{n}\right)

(That is inside radius 1, the third derivatives of the Taylor expansion are bounded).

Then

Gn=Gn(1)=Gn(0)12Gn(0)+Op(1/n)G_n = -G_n(1) = -G_n'(0) - \frac{1}{2} G_n''(0) + O_p(1/n)

Tn=Tn(1)=Tn(0)12Tn(0)+Op(1/n)T_n = -T_n(1) = -T_n'(0) - \frac{1}{2} T_n''(0) + O_p(1/n)

Cn=Tn(1)=Tn(0)+12Tn(0)+Op(1/n)C_n = T_n(-1) = -T_n'(0) + \frac{1}{2} T_n''(0) + O_p(1/n)

Wn=Tn(1)+Tn(0)=Tn(0)+12Tn(0)+Op(1/n)W_n = -T_n(1) + T_n''(0) = -T_n'(0) + \frac{1}{2} T_n''(0) + O_p(1/n)

Proof: By Taylor’s theorem with the Lagrange remainder, given α\alpha, there exists α\alpha^* s.t. αα|\alpha^*| \le |\alpha| and

Gn(α)=Gn(0)+αGn(0)+12α2Gn(0)+16α3Gn(α)G_n(\alpha) = G_n(0) + \alpha G_n'(0) + \frac{1}{2} \alpha^2 G_n''(0) + \frac{1}{6} \alpha^3 G_n'''(\alpha^*)

α=1\alpha = 1 gives the theorem (similar method for dealing with TnT_n).


We thus get the theoretical behaviors of the free energy, generalization loss, and the rest by the following procedure.

Recipe For Bayesian Theory Construction

  1. An arbitrary triple of (q(x),p(xw),φ(w))(q(x), p(x|w), \varphi(w)) is fixed. The set of parameters is denoted WW, and X1,,Xni.i.d.q(x)X_1, \dots, X_n \overset{\text{i.i.d.}}{\sim} q(x).

  2. The empirical and average log loss functions are defined by

    Ln(w)=1ni=1nlogp(Xiw)L_n(w) = -\frac{1}{n} \sum_{i=1}^n \log p(X_i|w)

    L(w)=q(x)logp(xw)dxL(w) = -\int q(x) \log p(x|w) dx

Find the optimal parameters minimizing L(w)L(w).

W0={wW:L(w)=minwWL(w)}W_0 = \{ w \in W : L(w) = \min_{w' \in W} L(w') \}
  1. Check that the log density ratio function has a relatively finite variance. Then we have essential uniqueness.

  2. Define

    K(w)=f(x,w)q(x)dxK(w) = \int f(x,w) q(x) dx

    Kn(w)=1ni=1nf(Xi,w)K_n(w) = \frac{1}{n} \sum_{i=1}^n f(X_i,w)

The normalized partition function is given by

Zn(0)=exp(nKn(w))φ(w)dwZ_n^{(0)} = \int \exp(-n K_n(w)) \varphi(w) dw

Then the free energy Fn=nLn(w0)logZn(0)F_n = n L_n(w_0) - \log Z_n^{(0)}.


  1. The average by the posterior is equal to

Ew[]=()exp(nKn(w))φ(w)dwexp(nKn(w))φ(w)dwE_w[ \cdot ] = \frac{\int (\cdot) \exp(-n K_n(w)) \varphi(w) dw}{\int \exp(-n K_n(w)) \varphi(w) dw}

Calculate Ew[f(x,w)]E_w[f(x,w)] and Vw[f(x,w)]V_w[f(x,w)]. From these we obtain

Ew[K(w)]=EXEw[f(X,w)]E_w[K(w)] = E_X E_w[f(X,w)]
Ew[Kn(w)]=1ni=1nEw[f(Xi,w)]E_w[K_n(w)] = \frac{1}{n} \sum_{i=1}^n E_w[f(X_i,w)]

and the empirical variance term 1ni=1nVw[f(Xi,w)]\frac{1}{n} \sum_{i=1}^n V_w[f(X_i,w)], which estimates EXVw[f(X,w)]E_X V_w[f(X,w)].

Finally, based on the basic theorem,

Gn=L(w0)+Ew[K(w)]12EXVw[f(X,w)]+Op(1/n)G_n = L(w_0) + E_w[K(w)] - \frac{1}{2} E_X V_w[f(X,w)] + O_p(1/n)
Cn=Ln(w0)+Ew[Kn(w)]+12ni=1nVw[f(Xi,w)]+Op(1/n)C_n = L_n(w_0) + E_w[K_n(w)] + \frac{1}{2n} \sum_{i=1}^n V_w[f(X_i,w)] + O_p(1/n)
Tn=Ln(w0)+Ew[Kn(w)]12ni=1nVw[f(Xi,w)]+Op(1/n)T_n = L_n(w_0) + E_w[K_n(w)] - \frac{1}{2n} \sum_{i=1}^n V_w[f(X_i,w)] + O_p(1/n)

and WnW_n has the same expansion as CnC_n (which by the way proves that Cn=Wn+Op(1/n)C_n = W_n + O_p(1/n)).

Further Steps

We have already set up the framework and the basic theory, and also discovered important results (which were not restricted to regular models). We are now ready to find the behavior of the regular posterior distribution, and then generalize that behavior to the general case.