Of Notes

Completing the square for the Gaussian conditional and marginal

1 min read · revised 18 October 2026 · ·

Table of Contents

Problem

Use completing the square in the exponent to derive the results in PRML Eqs. (2.141)-(2.142), the conditional and marginal Gaussian formulae.

Solution

First problem:

Likelihood and prior:

Bayes, dropping the normalising constants:

Expand both squares:

Collect by power of :

so the exponent is , with collecting everything free of :

Complete the square:

doesn't depend on , so it goes into the constant; what remains is a Gaussian kernel:

Match coefficients:

Precision:

Mean (multiply top and bottom by , then use ):

/ or Ctrl K
search; empty, it shows notes to revise and lately read
m
mark this note to revise, or unmark it
c
cover maths, proofs and solutions to test yourself
n
uncover the next covered item
y
copy this note’s org-roam link
e
copy this note as markdown, LaTeX kept as TeX
p
the next problem to work; there h hints, s shows the solution, x passes it for today
→ ← j k space
turn the page, when reading in pages
l
on the map, trace the greatest distance, then the longest path
double-click
a formula, to copy its TeX
rest on maths
bind a part of a formula and open the wheel of notes it comes from; scroll or ↑ ↓ widens it, 1–6 goes
?
this card