Table of contents
1 From perturbations to statistical observables
 1.1 What do CMB experiments measure?
 1.2 The CMB powerspectrum
 1.3 Line of sight integration
 1.4 The matter powerspectrum
 1.5 Polarisation and gravitational waves
2 Physical understanding of the observables
 2.1 The CMB powerspectrum
 2.1.1 What the line of sight integrals tell us
 2.1.2 Acoustic oscillations
 2.1.3 Peak positions
 2.1.4 Diffusion damping
 2.1.5 Cosmological parameter dependence
 2.2 Matter powerspectrum
 2.2.1 Growth of matter perturbations
 2.2.2 Perturbations in real space
 2.3 Summary
From perturbations to statistical observables
What do CMB experiments measure?
There has to date been over $50$ experiments to measure the cosmic microwave background using telescopes on Earth, balloon experiments high in the atmosphere and satellites in space (COBE, WMAP, Planck). Telescopes on earth usually focus on measuring CMB in small patches on the sky whereas the satelitte experiments have mapped out the CMB over the whole sky (or as much as we can see; we cannot see through the galaxy). Telescope and balloon experiments also have to deal with all the issues of having the light go through the atmosphere, but on the other hand they are much cheaper than sending a satelitte into space and they can choose to scan the same part of the sky many many times to beat down the noise and get better resolution than what we would get from a fixed time allsky satellite experiment. Both of these therfore play an important role in measuring the CMB. The observational status today is that we have managed to measure the CMB temperature to as good precision as its almost possible to get and we have also good measurements on Emode polarisation. The main piece missing now, which is the main goal of future CMB experiments, is to measure the missing piece  the socalled Bmode polarisation  that are generated by gravitational waves in the early Universe (but we don't know in what amount). One can give several courses in the history of these experiments, how to do these kinds of experiments (scanning strategy, detector technology), dealing with foregrounds (the CMB is not the only source of photons in our Universe) and how to do the data analysis in the best possible way (see e.g. BeyondPlanck), but we won't go into more details in this course. The data analysis part is what the CMB group at our insitiute is great at and if you want to work on this we have many master projects on this topic availiable every year. Anyway this course is (luckily) about theory so lets move on to that.
So what do these experiments really measure and how do we connect this to the theory we have gone through? They measure the temperature of CMB photons $T(\hat{n})$ as functions of direction on the sky (which is the same as saying we measure the temperature as a function on the unit sphere). Subtracting off the mean temperature over all directions what we get is therefore $\frac{\delta T}{T} = \Theta(\vec{x}, \hat{p},t)$ where $\Theta$ is the perturbation we solved for (though we have this in fourierspace), $\vec{x}$ is our positon, $\hat{p}$ is the direction on the sky the photons hits the detectors and the time $t$ is obviously today. We can expand this in spherical harmonics as $$\Theta(\vec{x},\hat{p},t) = \sum_{\ell=1}^\infty\sum_{m=\ell}^{\ell} a_{\ell m}(\vec{x},t) Y_{\ell m}(\hat{p})$$ The goal of an experiment is to accurately measure the $a_{\ell m}$'s. However what the temperature is in any given direction is not something the theory can tell us (the initial conditions are that of a random field). To make a connection to the theory we derived we need to look at the statistical properties of this temperature field.
The CMB powerspectrum
The expansion of $\Theta(\vec{x},\hat{p},t)$ above implies that $$a_{\ell m}(\vec{x},t) = \int d\Omega_{\hat{p}} Y_{\ell m}^*(\hat{p})\Theta(\vec{x},\hat{p},t)$$ Expressing $\Theta$ in terms of its Fourier components this becomes $$a_{\ell m}(\vec{x},t) = \int\frac{d^3k}{(2\pi)^3}e^{i\vec{k}\cdot\vec{x}}\int d\Omega_{\hat{p}} Y_{\ell m}^*(\hat{p})\Theta(\vec{k},\hat{p},t)$$
Inflation predicts that the initial perturbations (like $\Theta$) is (very close to being) a gaussian random. Consequently the $a_{\ell m}$'s will also be a gaussian random field with mean $0$ and some variance $C_\ell$, i.e. $$\left<a_{\ell m}a^*_{\ell' m'}\right>= \delta_{\ell\ell'}\delta_{mm'}C_\ell$$ where the brackets denotes an ensamble average (average over many different realizations of our Universes). And since its gaussian all the statistical information about $\Theta$ is contained in $C_\ell$ (in practice there will be some deviations from pure gaussianity depending on the model of inflation so higher order moments does potentially contain interesting information). For a fixed $\ell$, each $a_{\ell m}$ have the same variance and for each value of $\ell$ there are $2\ell+1$ possible values of $m$. Thus in an experiment after measuring the $a_{\ell m}$'s we can estimate the powerspectrum as $$\hat{C}_\ell = \frac{1}{2\ell +1}\sum_{m=\ell}^\ell a_{\ell m}^2$$ There is an important difference with what we measure and what the theory says. The theory is formulated in terms on an ensamble average (average of many Universes) whereas we only have one Universe to measure in. This is where the ergothic assumption comes into play (see the section "PowerSpectrum" in the Appendix for more info) which tells us that as long as we have enough modes the mean of these will be the same as the ensamble average. This means that for large $\ell$'s we have enough statistical power to accurately estimate $C_\ell$, while for very low $\ell$ we will run into cosmic variance: we have very few $m$'s to estimate $C_\ell$ from so there is a fundamental uncertainity that is due to us only having one single Universe to measure this in that we cannot get around. The variance of this uncertanity is given by $\frac{\text{Var}(C_\ell)}{C_\ell^2} = \frac{2}{2\ell+1}$ (we have $C_\ell = \frac{1}{2\ell +1}\sum_m a_{\ell m}^2$ which follows a $\chi^2$ distribution). This uncertanity is what is depicted by the green shaded region (and the large red errorbars) for low $\ell$ in Figure 1 and shows that our current measurements for temperature fluctuations is close to as good as we can get.
To derive an expression for $C_\ell$ we expand $\Theta$ in multipoles $$a_{\ell m}(\vec{x},t) = \sum_\ell (2\ell + 1)(i)^\ell\int\frac{d^3k}{(2\pi)^3}e^{i\vec{k}\cdot\vec{x}}\int d\Omega_{\hat{p}} Y_{\ell m}^*(\hat{p})\mathcal{P}_\ell(\mu)\Theta_\ell(\vec{k},t)$$ where $\mu = \hat{p} \cdot \hat{k}$ which gives us $$a_{\ell m}a_{\ell' m'}^* = \sum_{\ell_1,\ell_2} (2\ell_1 + 1)(2\ell_2+1)(i)^{\ell_1\ell_2}\int\frac{d^3kd^3k'}{(2\pi)^6}e^{i(\vec{k}  \vec{k}')\cdot\vec{x}}\int d\Omega_{\hat{p}} d\Omega_{\hat{p}'} Y_{\ell m}^*(\hat{p}) Y_{\ell'm'}(\hat{p}')\mathcal{P}_{\ell_1}(\mu)\mathcal{P}_{\ell_2}(\mu')\Theta_{\ell_1}(\vec{k},t) \Theta_{\ell_2}^*(\vec{k}',t)$$
Now remember that when we solve this numerically we put $\Theta_\ell(\vec{k},t) = \Theta^{\rm code}_\ell(k,t) \mathcal{R}_{\rm ini}(\vec{k})$ where the initial value of the curvature perturbation $\mathcal{R}_{\rm ini}\propto \Psi$ was set to unity, i.e. we factored out the common initial condition from inflation before solving (which is perfectly fine since the equation system is linear). We must now put it back in. When we take the ensamble average of the above this will lead to a term $\left<\mathcal{R}_{\rm ini}(\vec{k})\mathcal{R}^*_{\rm ini}(\vec{k}')\right> = (2\pi)^3\delta(\vec{k}  \vec{k}')P(k)$ with $P(k) = \frac{2\pi^2}{k^3}\mathcal{P}_\mathcal{R}(k)$ being the primordial powerspectrum (with $\mathcal{P}_\mathcal{R}(k) = A_s(k/k_{\rm pivot})^{n_s1}$) and the deltafunction will enforce $\vec{k} = \vec{k}'$ taking care of one of the integrals. $$\left<a_{\ell m}a_{\ell' m'}^*\right> = \sum_{\ell_1,\ell_2} (2\ell_1 + 1)(2\ell_2+1)(i)^{\ell_1\ell_2}\int\frac{d^3k}{(2\pi)^3}\int d\Omega_{\hat{p}} d\Omega_{\hat{p}'} Y_{\ell m}^*(\hat{p}) Y_{\ell'm'}(\hat{p}')\mathcal{P}_{\ell_1}(\mu)\mathcal{P}_{\ell_2}(\mu')\Theta^{\rm code}_{\ell_1}(k,t)\Theta^{\rm code}_{\ell_2}(k,t) \frac{2\pi^2\mathcal{P}_\mathcal{R}(k)}{k^3}$$
For the next step we need $\int d\Omega_{\hat{p}} \mathcal{P}_\ell(\mu) Y_{\ell'm}^*(\hat{p}) = \delta_{\ell\ell'} \frac{4\pi}{2\ell+1} Y^*_{\ell m}(\hat{k})$ which takes care of two of the integrals (and the two Kroneker delta kills both of the sums) leaving us with $$\left<a_{\ell m}a_{\ell' m'}^*\right> = \delta_{\ell\ell'}(4\pi)^2\int\frac{d^3k}{(2\pi)^3}Y_{\ell m}(\hat{k})Y_{\ell m'}^*(\hat{k})\Theta^{\rm code}_\ell(k,t)^2 \frac{2\pi^2\mathcal{P}_\mathcal{R}(k)}{k^3}$$
Finally splitting the $k$integral into an integral over angles ($\Omega_{\hat{k}}$ now means over the angles of $k$) using that $\int d\Omega_{\hat{k}} Y_{\ell m}(\hat{k})Y_{\ell m'}^*(\hat{k}) = \delta_{mm'}$ we get $$\left<a_{\ell m}a_{\ell' m'}^*\right> = \delta_{\ell\ell'}\delta_{mm'}4\pi\int\frac{dk}{k}\mathcal{P}_\mathcal{R}(k)\Theta^{\rm code}_\ell(k,t)^2$$ so $$C_\ell = 4\pi \int \mathcal{P}_\mathcal{R}(k)\Theta^{\rm code}_\ell(k)^2\frac{dk}{k}$$ where the time is taken to be today (which is the time when we observe the CMB, so $\Theta^{\rm code}_\ell(k) = \Theta^{\rm code}_\ell(k,t=t_{\rm today})$). The difference wrt what is in Chapter 8.5.2 in Dodelson is that he expresses this in terms of $P(k) = \frac{2\pi^2}{k^3}\mathcal{P}_\mathcal{R}(k)$ which gives us the equivalent formulation $$C_\ell = \frac{2}{\pi}\int k^2 P(k)\Theta^{\rm code}_\ell(k)^2 dk$$
The expression above tells us how to go from the stuff we computed numerically, the temperature multipoles $\Theta_\ell$, to the theoretical prediction for the CMB angular powerspectrum. This can be directly compared to the equivalent quantity measured in experiments.
Line of sight integration
If you have seen the CMB powerspectrum you might have noticed that we are able to measure it up to $\ell \sim \mathcal{O}(1000)$'s. The formula we derived for $C_\ell$ requires us to know $\Theta_\ell$ and we also remember that to solve the equations for a given $\Theta_\ell$ requires us to solve all the previous $\Theta_0,\Theta_1,\ldots,\Theta_\ell$'s. This is a bit of an issue: do we need to solve a coupled system of $1000$'s of equation? The answer used to be yes! In principle its not bad. If you have coded up the equations for a general $\ell_{\rm max}$ then you just have to set one number to do so. However this makes it an expensive calculation. Lucikly there is a way around this and this technique is called lineofsight integration. Not only is it going to help us compute the CMB spectrum much much faster, but it is also the key to a simple understanding of the CMB powerspectrum. This is covered in Chapter 8.5 in Dodelson.
Remember after having found the equation for the photon temperature perturbation $\Theta = \Theta(t,\vec{k},\hat{p})$ $$\frac{\partial \Theta}{\partial t} + \frac{ik\mu}{a} \Theta + (\frac{\partial \Phi}{\partial t} + \frac{i k\mu}{a}\Psi) = \frac{d\tau}{dt}[\Theta_0  \Theta + i\mu v_b  \frac{3\mu^21}{4}\Pi]$$ the first thing we did was to expand it in multipoles. However this is quite a simple ODE so we can first formally integrate it by writing it as $$\frac{\partial (\Theta + \Psi)}{\partial \eta} + \left(ik\mu  \frac{d\tau}{d\eta}\right)(\Theta + \Psi) + \frac{\partial (\Phi\Psi)}{\partial \eta} = \frac{d\tau}{d\eta}[\Theta_0 + \Psi + \frac{\Pi}{4} + i\mu v_b  \frac{3\mu^2}{4}\Pi]$$ and introducing an integrating factor $e^{ik\mu(\eta  \eta_0)  \tau}$ where $\eta_0$ is the conformal time today. The equation then becomes $$ \begin{align} \frac{\partial [(\Theta + \Psi)e^{ik\mu(\eta  \eta_0)  \tau}]}{\partial \eta} &= \frac{\partial (\Psi\Phi)}{\partial \eta}e^{\tau}e^{ik\mu(\eta  \eta_0)} \\ &\frac{d\tau}{d\eta}e^{\tau}e^{ik\mu(\eta  \eta_0)}[\Theta_0 + \Psi + \frac{\Pi}{4}] \\ & \frac{d\tau}{d\eta}e^{\tau}e^{ik\mu(\eta  \eta_0)} i\mu v_b \\ &+ \frac{d\tau}{d\eta}e^{\tau}e^{ik\mu(\eta  \eta_0)} \frac{3\mu^2}{4}\Pi \end{align} $$ Introducing the visibility function $g = \frac{d\tau}{d\eta}e^{\tau}$ this becomes $$ \begin{align} \frac{\partial [(\Theta + \Psi)e^{ik\mu(\eta  \eta_0)  \tau}]}{\partial \eta} &= \frac{\partial (\Psi\Phi)}{\partial \eta}e^{\tau}e^{ik\mu(\eta  \eta_0)} \\ &+ g e^{ik\mu(\eta  \eta_0)}[\Theta_0 + \Psi + \frac{\Pi}{4}] \\ &+ ge^{ik\mu(\eta  \eta_0)} i\mu v_b \\ & e^{ik\mu(\eta  \eta_0)} \frac{3\mu^2}{4}g\Pi \end{align} $$ Integrating it from the early Universe till today we obtain $$ \begin{align} (\Theta + \Psi)_{\rm today}  (\Theta + \Psi)_{\rm ini} e^{ik\mu(\eta_{\rm ini}  \eta_0)}e^{\tau_{\rm ini}} &= \int_{\eta_{\rm ini}}^{\eta_0}d\eta \, g e^{ik\mu(\eta  \eta_0)}[\Theta_0 + \Psi + \frac{\Pi}{4}] \\ &+ \int_{\eta_{\rm ini}}^{\eta_0}d\eta \, \frac{\partial (\Psi\Phi)}{\partial \eta}e^{\tau}e^{ik\mu(\eta  \eta_0)} \\ &+ \int_{\eta_{\rm ini}}^{\eta_0}d\eta \, ge^{ik\mu(\eta  \eta_0)} i\mu v_b \\ & \int_{\eta_{\rm ini}}^{\eta_0}d\eta \, e^{ik\mu(\eta  \eta_0)} \frac{3\mu^2}{4} g\Pi \end{align} $$ where we have used $\tau_0 = 0$. The contribution from the second term on the left hand side is irrelevant since its weighted by $e^{\tau_{\rm ini}} \approx 0$ since the optical depth is huge early on. We are almost ready to take multipoles. The terms that have a $e^{ik\mu(\eta  \eta_0)}$ term is easy to deal with as they are directly related to the definition of the socalled spherical bessel function, but the terms with $\mu$ and $\mu^2$ is a bit annoying in this respect so first lets talk about how we can get ridd of them whih will simplify everything as we will see. For these we can use a similar trick as when working with the Fourier transform. Recall that when taking the Fourier transform of a gradient $\nabla f$ we simply get a factor $i\vec{k}$ times $\hat{f}$. The integral we have here is similar to a Fourier transforms so the same thing applies here: we can replace $\mu$ by $\frac{1}{ik}\frac{d}{d\eta}$ where the derivative will apply to anything $\mu$ multiplies expect the exponential, i.e. in the integrand $\mu f e^{ik(\eta\eta_0)} \to \frac{1}{ik}\frac{df}{d\eta} e^{ik(\eta\eta_0)}$ and similarly $\mu^2$ can be replaced by $\frac{1}{k^2}\frac{d^2}{d\eta^2}$ and so on. The formal justification for this is the same as we used for proving the Fourier transform derivative relation which is good old integration by parts (also here the boundary terms vanish). Writing out the argument in detail: start by using $(ik \mu)^n e^{ik\mu(\eta  \eta_0)} = \frac{d^n}{d\eta^n} e^{ik\mu(\eta  \eta_0)}$ to get $$ \begin{align} (\Theta + \Psi)_{\rm today} &= \int_{\eta_{\rm ini}}^{\eta_0}d\eta \, ge^{ik\mu(\eta  \eta_0)}[\Theta_0 + \Psi + \frac{\Pi}{4}]\\ & + \int_{\eta_{\rm ini}}^{\eta_0}d\eta \, \frac{\partial (\Psi\Phi)}{\partial \eta}e^{\tau}e^{ik\mu(\eta  \eta_0)} \\ & {\color{red}{+ \int_{\eta_{\rm ini}}^{\eta_0}d\eta \,[\frac{d}{d\eta}e^{ik\mu(\eta  \eta_0)}] \frac{1}{k}gv_b}} \\ & {\color{blue}{+ \int_{\eta_{\rm ini}}^{\eta_0}d\eta \,[\frac{d^2}{d\eta^2}e^{ik\mu(\eta  \eta_0)}] \frac{3}{4k^2}g\Pi}} \end{align} $$ then do integration by parts on the two terms that have derivatives of the exponential to get $$ \begin{align} (\Theta + \Psi)_{\rm today} &= \int_{\eta_{\rm ini}}^{\eta_0}d\eta \, g e^{ik\mu(\eta  \eta_0)}[\Theta_0 + \Psi + \frac{\Pi}{4}] \\ &+ \int_{\eta_{\rm ini}}^{\eta_0}d\eta \,\frac{\partial (\Psi\Phi)}{\partial \eta}e^{\tau}e^{ik\mu(\eta  \eta_0)} \\ &{\color{red}{ \int_{\eta_{\rm ini}}^{\eta_0}d\eta \,e^{ik\mu(\eta  \eta_0)} \frac{1}{k}\frac{d}{d\eta}(gv_b)}}\\ &{\color{blue}{+ \int_{\eta_{\rm ini}}^{\eta_0}d\eta \,e^{ik\mu(\eta  \eta_0)} \frac{3}{4k^2}\frac{d^2}{d\eta^2}(g\Pi)}} \end{align} $$ We can now finally take multipoles of this expression by multiplying by $\frac{i^\ell}{2}P_\ell(\mu)$ and integrate $\mu$ over $[1,1]$. The term on the left is easy: by definition of the multipoles we just get $\Theta_\ell$. The $\Psi$term does not have a directional ($\mu$) dependence so this term will only give a nonzero term for $\ell=0$ which is nothing but an (unobservable) shift in the CMB temperature. The other terms give rise to spherical bessel functions: $j_\ell(x) = \frac{i^\ell}{2}\int_{1}^1 P_\ell(x) e^{ix\mu} d\mu$. The end result is simply $$\Theta_\ell^{\rm today}(k) = \int_{\eta_{\rm ini}}^{\eta_0}d\eta\left[g[\Theta_0 + \Psi + \frac{\Pi}{4}] + \frac{\partial (\Psi\Phi)}{\partial \eta}e^{\tau}  \frac{1}{k}\frac{d}{d\eta}(gv_b) + \frac{3}{4k^2}\frac{d^2}{d\eta^2}(g\Pi)\right]j_\ell(k(\eta_0\eta))$$ or in the form we will implement it in the code where derivatives are written in terms of $x = \log a$ $$\Theta_\ell^{\rm today}(k) = \int_{x_{\rm ini}}^{0}dx\left[\tilde{g}[\Theta_0 + \Psi + \frac{\Pi}{4}] + \frac{\partial (\Psi\Phi)}{\partial x}e^{\tau}  \frac{1}{k}\frac{d}{dx}(\mathcal{H}\tilde{g}v_b) + \frac{3}{4k^2}\frac{d}{dx}(\mathcal{H}\frac{d}{dx}(\mathcal{H}\tilde{g}\Pi))\right]j_\ell(k(\eta_0\eta))$$ where $\tilde{g} = \frac{d\tau}{dx} e^{\tau} = \mathcal{H} g$ is the visibility function in terms of $x$. Let's reflect a bit on this formula: it tells us that we can compute any multipole $\Theta_\ell$ from simply knowing $\Pi,\Phi,\Psi,\Theta_0,v_b$ and its time derivatives and performing this integral. The highest photon multipole that enter the equation above is $\Theta_2$ (in $\Pi$) so we only have to choose $\ell_{\rm max}$ large enough to ensure that this one is computed accurately which is typically something like $\ell_{\rm max} = 68$. This simple calculation have reduced the computational needs of having $1000$'s of coupled ODEs down to a few dusin! We'll get back to the physical interpretation of this formula.
The only downside here is that we also need to know how to compute the spherical bessel function. See the math notes for this.
In hinsight this is a very obvious solution, however it was not realized until 1996 when Uros Seljak and Matias Zaldarriaga pointed this out in the seminal paper "A Line of Sight Approach to Cosmic Microwave Background Anisotropies". Every single EinsteinBoltzmann solver ever made since then have implemented this technique.
The matter powerspectrum
Computing the matter powerspectrum is much easier than the CMB powerspectrum, its simply the square of the fourier components of the matter overdensity field: $$P(k,x) = \Delta_M(k,x)^2$$ where $\Delta_M(k,x) \equiv \frac{c^2k^2\Phi(k,x)}{\frac{3}{2}\Omega_{M 0} a^{1} H_0^2}$ and $\Omega_{M 0}$ is the total matter density parameter today. This is often plotted as $k$ in units of $h/\text{Mpc}$ versus $P(k)$ in units of $(\text{Mpc}/h)^3$. For what we compute in the numerical project (where the curvature perturbations are normalized to $1$ at the initial time) we must multiply this by the primordial powerspectrum to get the full result so $$P(k,x) = \Delta_M^{\rm code}(k,x)^2 P(k) = \Delta_M^{\rm code}(k,x)^2\frac{2\pi^2}{k^3} \left(\frac{k}{k_{\rm pivot}}\right)^{n_s1}$$
Polarisation and gravitational waves
Where does polarization enter the Bolzmann formalism and how do we get the equations needed to compute its predictions? Recall when we wrote down the distribution function for photons $f_\gamma$ and later we computed stuff like the energy density from $E = \frac{g_\gamma}{(2\pi)^2}\int E f_\gamma d^3p$ where $g_\gamma = 2$ is the number of polarizaton states. What we implicitly did there was to assume that there is no net polarization both initially and that none is generated in the evolution so that each of the two polarization states are equally common. The former is true (or atleast we have no reason to think otherwise), however the latter is not. In general we should write $f_\gamma = f_\gamma^{(1)} + f_\gamma^{(2)}$ where each of the two polarization states gets a perturbation $\Theta^{(i)}$. The total temperature perturbation is just $\Theta = \Theta^{(1)} + \Theta^{(2)}$. The collision term for Thompson scattering does generate a net polarization if there is a nonzero quadrupole moment $\Theta_2$ so in general $\Theta^{(1)} \not= \Theta^{(2)}$. Previous in the course when we wrote down the Boltzmann equation for the polarization without justification this is how we would compute it. The equations we presented for polarization is (very roughly) for $\Theta_P = \frac{1}{2}(\Theta^{(1)}  \Theta^{(2)})$. This was just to give you some idea on how polarization enters in the mathematical formalism we have gone through. Doing the actual calculations is beyond what we will go through in this course (though PhD students have to implement this in the numerical project and discuss the results) and we will instead focus on the physical understanding below. You can find more details about this in Wayne Hu's lecture notes. This is also covered in Chapter 10.5 in Dodelson.
To completely describe a radiation field we in general needs four numbers  the socalled Stokes parameters. These are the temperature $T$, the linear polarization $Q$ and $U$ along two different directions, and circular polarization $V$. $T$ and $V$ are rotationally invariant and can therefore be expanded in spherical harmonics. $Q$ and $U$, on the other hand, transform under rotations in the plane perpendicular to the direction of the photons. It turns out that the linear combination $Q\pm iU$ transforms in a particularly simple way and we can define rotational invariant quantities $E$ and $B$  the socalled $E$mode and $B$mode polarization patterns. When we are only considering scalar perturbations, we can choose a coordinate system for each Fourier mode where $U=0$ and $Q=\Theta_P$ for which $B = 0$ and $E$ is given by $\Theta_P$. The nice thing about this is that scalar perturbations only produces one particular polarization pattern and the other pattern  the $B$mode patttern  can be produced by two things 1) tensor perturbations, i.e. gravitational waves and 2) by gravitational lensing of $E$ modes, but this is mainly on small scales. Thus a large scales $B$mode pattern is considered strong evidence for gravitational waves (and inflation which produces them).
In our treatment of the collision term we ignored the angular dependence. The full expression for the differential crosssection is $$\frac{d\sigma}{d\Omega} = \frac{3}{8\pi}\hat{E}'\cdot \hat{E}^2\sigma_T$$ where $\hat{E}'$ and $\hat{E}$ are the incoming and outgoing directions of the polarization vector (electric field). This direcional dependence will mix the two polarization states and is what can generate a net polarization. The Boltzmann equation gives us the following evolution equation for the polarization $\Theta_P$ $$\frac{\partial \Theta_P}{\partial \eta} + ik\mu \Theta_P = \frac{\partial \tau}{\partial \eta}[\Theta_P + \frac{1}{2}(1P_2(\mu))\Pi]$$ where $\Pi = \Theta_2 + \Theta_{P0} + \Theta_{P2}$. One thing to notice from this straight away is that we have no $\Phi,\Psi$ terms to source it. And this is as expected: a net polarization is a consequence of Thompson scattering and not a gravitational effect. The only thing that connects this equation to the rest of the EinsteinBolzmann system we have derived is the presence of $\Theta_2$  the temperature quadrupole. If $\Theta_2=0$ and $ \Theta_{P} \approx 0$ initially then we will have $ \Theta_{P} \approx 0$ for all times so no net polarization is ever generated. We therefore need a temperature quadrupole to generate polarization.
To add: more about graviational waves.
Physical understanding of the observables
We will now try to understand all the features in the CMB and matter powerspectrum based on the physics we know is going on and the equations we have derived. From this we will also discuss how varying each cosmological parameter changes the observables and how this can be used togeather with observations to tell us detailed information about our Universe.
For getting a deeper physical intuition about the CMB and how different physical processes manifests themselves in the powerspectra there are no better online resource than Wayne Hu's CMB tutorials so I suggest you also check that out (better than what I will do here  and I will probably borrow a lot of that material as its very good!).
For seeing how the CMB and matter power spectra change with varying cosmological parameters see this great animation by Max Tegmark (click on the parameter of choice to see the effect).
For a more analytical approach to the evolution of perturbations and powerspectra see the great papers by Hu & Sugiyama, Hu, Sugiyama & Silk and Eisenstein & Hu ([1], [2], [3], [4], [5]) These papers are great for getting a deeper understanding of the features in the powerspectra and the results in these papers can also be used to check that the results we get from our code are reasonable.
The CMB powerspectrum
What the line of sight integrals tell us
Recall the line of sight integral solution to the temperature multipoles $$\Theta_\ell^{\rm today}(k) = \int_{x_{\rm ini}}^{0}dx\left[\tilde{g}[\Theta_0 + \Psi + \frac{\Pi}{4}] + \frac{\partial (\Psi\Phi)}{\partial x}e^{\tau}  \frac{1}{k}\frac{d}{dx}(\mathcal{H}\tilde{g}v_b) + \frac{3}{4k^2}\frac{d}{dx}(\mathcal{H}\frac{d}{dx}(\mathcal{H}\tilde{g}\Pi))\right]j_\ell(k(\eta_0\eta))$$ Lets try to understand the CMB from this equation. The dominant term is the first one, the socalled SachsWolfe term, so lets start by studying this one. As we saw earlier in this course the visibility function sharply peaks at recombination so a rough approximation is $\tilde{g} \approx \delta(xx_{\rm rec})$ and in the line of sight integral this gives us $$\Theta_\ell^{\rm today}(k) \approx [\Theta_0 + \Psi + \frac{\Pi}{4}]_{\rm rec}\cdot j_\ell(k(\eta_0\eta_{\rm rec})) \approx [\Theta_0 + \Psi]_{\rm rec}\cdot j_\ell(k\eta_0)$$ since $\eta_{\rm rec} \ll \eta_0$ and the final term is very small. Recall photons in a gravitational well gets a gravitational redshift given by $\Psi$ so the term in the brackets is nothing but an effective photon temperature (with a tiny quadrupolar correction). What this tells us is that the CMB anisotropies we observe today comes from temperature inhomogenities that were present at recombination and froze in when the Universe became transparent. The last factor $j_\ell(k(\eta_0\eta_{\rm rec}))$ comes from the fact that these inhomogenities are freestreamed to the current time and then projected on a sphere. The other terms that we ignored in this simplified discussion represents additional physical effects: the second term is the integrated SachsWolfe effect. Photons might move down through gravitational potentials that change in time. If a gravitational well has deepened when the photon has been traveling through it the photon will loose extra energy when climbing out. Next recall that baryons and photons are tightly coupled early on so $v_b \sim v_\gamma$ so the third term is nothing but a Doppler term. The last one I don't know a simple physical explanation for.
The final part we need to understand is how features in $\Theta_\ell(k)$ gets mapped into the powerspectrum. We know that $$C_\ell = \frac{2}{\pi}\int k^2 P(k)\Theta_\ell^2\frac{dk}{k}$$ The spherical bessel function $j_\ell(x)$ has a maximum around $x\sim \ell$ and since $\Theta_\ell \propto j_\ell(k\eta_0)$ the value of $C_\ell$ will very roughly be proportional to $\Theta_\ell(k = \ell / \eta_0)$. Don't take this too literally  its a rough approximation  but what this argument is telling us is that a feature on some scale $k$ will get mapped into a feature on an angular scale $\ell \sim k \eta_0$. Thus we can understand the basic structure of the CMB powerspectrum by studying how the effective temperature perturbation $(\Theta_0 + \Psi)(k,t)$ evolves up until recombination. This is what we will look at next.
Acoustic oscillations
From the line of sight integral we see that we need to know the value of the effective temperature perturbation at recombination $$(\Theta_0+\Psi)(k, t = t_{\rm rec})$$ to understand the CMB spectrum. This is the aim here. Start with the continuity equation and Euler equation $$\frac{\partial \Theta_0}{\partial \eta} = k\Theta_1  \frac{\partial \Phi}{\partial \eta}$$ $$\frac{\partial \Theta_1}{\partial \eta} = \frac{k}{3}(\Theta_0  2\Theta_2 + \Psi) + \frac{\partial \tau}{\partial \eta}(\Theta_1 + \frac{v_b}{3})$$ Take the $\eta$derivative of the first equation and use the second one to simply and we end up with $$\frac{\partial^2 (\Theta_0 + \Psi)}{\partial \eta^2} + \frac{k^2}{3}(\Theta_0+\Psi) = F$$ where $$F = \frac{k^2}{3}(2\Theta_2)  k\frac{\partial \tau}{\partial \eta}(\Theta_1 + \frac{v_b}{3}) + \frac{\partial^2 (\Psi\Phi)}{\partial \eta^2}$$ This is the equation of a simple driven harmonic oscillator where $F$ is the driving force. If the driving force is irrelevant then the solution is simply $$\Theta_0 + \Psi = (\Theta_0 + \Psi)_{\rm ini}\cos(ks) + \frac{1}{kc_s}(\Theta_0 + \Psi)^\prime_{\rm ini}\sin(ks)$$ where $s = \int_0^\eta c_s d\eta$ and $c_s$ is the sound speed (in this case $c_s^2 = \frac{1}{3}$ and $s = \eta / \sqrt{3}$). Note that $s$ is nothing but the distance a sound wave have travelled since the big bang. With the usual adiabatic initial conditions that we are assuming then the last term above is zero and $(\Theta_0 + \Psi)_{\rm ini} = \frac{\Psi_{\rm ini}}{2}$ and we are left with $$\Theta_0 + \Psi = \frac{\Psi_{\rm ini}}{2}\cos(ks)$$ For a given $k$, the effective temperature in fourier space is initially outside the horizon and will stay frozen (here $ks \ll 1$ so $\cos(ks) \approx 1$) and then start to oscillate when it enters the horizon. The modes $k$ for which the temperature perturbation is at a maximum at recombination will then correspond to a peak in the powerspectrum at an $\ell \sim k /\eta_0$. The maxima of $\cos(x) = 1$ is $x = n\pi$ so the peaks of the powerspectrum will be at $$\ell_{\rm peak} \sim n\frac{\eta_0}{r_s}$$ for $n=1,2,3,\ldots$ where $r_s = s(\eta=\eta_{\rm rec})$ is the soundhorizon at recombination. Note that there are a few $O(1)$ constants flying around here that I have ignored for simplicity. What about the troughs? Those correpond to modes for which the temperature perturbation is close to zero at recombination. Since $\cos(x) = 0$ for $x = \frac{\pi}{2} + n\pi$ this gives us $$\ell_{\rm trough} \sim (n + \frac{1}{2})\frac{\eta_0}{r_s}$$ This gives us the basic picture of the acoustic oscillations we see in the CMB powerspectrum and this is illustrated in the figures below. There are things we did not cover yet: the full discussion about assumes the driving force $F$ to our harmonic osscillator is zero. This is true on very large scales, but certainly not on small scales so we will have to look more closely on this. Another thing that does not make sense right now is why the value of $C_\ell$ at the trough's is not zero (or close to zero) if the temperature perturbation is zero at recombination? But remember that there are other contributions to the CMB powerspectrum in the line of sight integral and to understand this we need to consider the next largest term, the Doppler term.
Peak positions
Diffusion damping
In the early Universe photons and baryons are tightly coupled and move together as a single fluid. However this is only a first approximation. In reality the photons travel a finite distance between scatterings. The mean free path is $\lambda = \frac{1}{n_e\sigma_T}$. In a Hubble time $H^{1}$ a photon will scatter $\frac{n_e\sigma_T}{H}$ times (this is just $\frac{d\tau}{d\log a}$). The photons basically perform a random walk and the effect is that diffusing photons travelles from hot regions of space to cold ones, equalising the temperatures of these regions. A well known result in the theory of random walk is that with $N$ steps of distance $\Delta x$ the mean distance traveled from the starting point is $\sqrt{N}\Delta x$. The mean distance the photons travel in a Hubble time is therefore of order $$D = \frac{1}{n_e\sigma_T} \cdot \sqrt{\frac{n_e\sigma_T}{H}} = \frac{1}{\sqrt{n_e\sigma_T H}} = \frac{1}{\sqrt{ \frac{d\tau}{dt} H}}$$ We therefore expect that photon temperature perturbations on scaled smaller than $D$ will be washed out by the diffusing photons. For the perturbations we solve in Fourier space this corresponds to perturbations on small scales $k \gtrsim \frac{2\pi}{D}$ which again will map onto the powerspectrum to damping for $\ell \gtrsim \ell_{\rm damping} \sim 800$. One can go ahead and estimate how big this damping is and so on (see Dodelson). Just from looking at the expression for $D$ we can see that the damping scale should depend on 1) the baryon density $\Omega_b h^2$, 2) the helium abundance $Y_p$ (though $n_e$) and 3) the matter density parameter $\Omega_M h^2$ (though $H$).
To do: add more on parameter dependence
Cosmological parameter dependence
Matter powerspectrum
The shape of the powerspectrum is dictated by two things 1) the primordial powerspectrum and 2) how modes of different scales evolve relative to each other. To understand the shape of this we need to understand how the density perturbation evolve in different regimes: outside and inside the horizon in the matter and radiation era.
Growth of matter perturbations
See Section 5.2.3 in Baumann or Chapter 7 in Dodelson for how to derive this. The results can be summarized as follows:

Radiation era:
 Modes outside the horizon: $\Delta_M \propto a^2$
 Modes inside the horizon: $\Delta_M \propto \log(a)$ (i.e. roughly constant)

Matter era:
 Modes outside the horizon: $\Delta_M \propto a$
 Modes inside the horizon: $\Delta_M \propto a$
A mode enter the horizon when $k \sim \mathcal{H}$. The largest scales (small $k$) correspond to modes that enter late in the matter era (or haven't entered yet). The smallest scales (large $k$) corresponds to modes that entered early in the radiation era. Due to the fact that perturbations hardly grow inside the horizon in the radiation era the small scale powerspectrum will be suppressed relative to the largescale powerspectrum. The largest scale that does not get any suppression corresponds to those that enter exactly when the matter era starts $k_{\rm eq} = \mathcal{H}(a_{\rm eq})$ where $a_{\rm eq} = \Omega_{R0} / \Omega_{M0}$ (where $\Omega_{R0} = \Omega_{\gamma 0} + \Omega_{\nu 0}$) is the scalefactor for matterradiation equality. This represents the peak of the matter powerspectrum. At larger scales it grows at $k^{n_s}$ (so roughly $\propto k$) while at smaller scales $\Delta_M$ is suppressed by roughly $(k_{\rm eq}/k)^2$ and consequently the powerspectrum is suppressed by $(k_{\rm eq}/k)^4$ and therefore it goes down as $k^{3}$. See the figure above. This explains the basic shape.
To understand the more fine features (e.g. the small oscillations seen in Figure 2) its useful to go back and look at this in realspace instead.
Perturbations in real space
Our discussion have so far been in Fourier space, but lets look at how the perturbations evolve in realspace. To simplify it, lets consider a single perturbation (a sharp peak) with dark matter, photons, baryons and massless neutrinos.
How do we compute how this evolves? Well we already know how it evolves in fourier space $\delta_i(\vec{k},t)$ and if we take the initial profile $\delta_i(\vec{k},t^{\rm ini}) = 1$ (the fourier transform of a deltafunction $\delta^{(3)}(\vec{x})$ in real space) then we can find the profile $\delta_i(\vec{x},t)$ in real space by just doing a fourier transform $$\delta_i(\vec{x},t) = \int \frac{d^3k}{(2\pi)^3}e^{i\vec{k}\cdot \vec{x}}\delta_i(\vec{k},t) = \int_0^\infty \frac{k^2dk}{2\pi^2} \frac{\sin(kr)}{kr} \delta_i(k,t)$$ where $r = \vec{x}$. The system is initially (and therefore stays) spherically symmetric so the integral becomes as simple 1D integral (a Henkel transform that can here easily be rewritten as a 1D Fourier transform). This can easily be solved numerically by direct integration, as an ODE or performing a fourier transform using, say, the FFTW library (one can also use the socalled FFTLog algorithm). In the movie below we show the results of such a calculation.
The initial peak will attract matter from the surroundings so it grows in time (and brodens). However photons and neutrinos have pressure which will produce a sound wave moving outwards. Photons and baryons are tightly coupled and they move together as one fluid so the baryons are dragged along for the ride. Neutrinos have long been decoupled so their velocity is just the speed of light so they will therefore be slightly ahead of the photons and baryons (this acts as a gravitational drag on the baryons  an effect that has been measured recently in galaxy surveys and used to constrain the number of neutrinos. Likewise it also acts to shift the peak positions in the CMB angular powerspectrum).
When we get to recombination $z\sim 1100$ the photons and baryons finally decouple from each other and photons travel outwards by itself. When this happens we have a spherical shell of matter at the socalled soundhorizon $r_s \sim 150$ Mpc (the distance this sound wave have travelled since the big bang). This shell  the BAO peak  remains in place and dark matter will also start to cluster around the excess of matter here. This leaves us with a socalled standardruler  a distance we can compute theoretically and can also measure from the correlation function of matter. The standard ruler depends on cosmological parameters so a measurement of it allows us to constrain cosmological parameters and this is one of the key things (because its very roboust apposed to the full correlation function / powerspectrum which is complicated by the fact that we measure galaxies and not dark matter directly) that we want to measure in galaxy surveys.
Now this was only one peak and the Universe is surely much more complicated than this. Thats true, but remember the evolution of perturbations is linear so the true Universe can be thought of as a sum over many such peaks as illustrated in the figure above. This implies that this signal is imprinted in the statistical observables: the two point correlation function (which is close to what is shown in the video above) and the matter powerspectrum. So what does this imply about the finestructure of the matter powerspectrum? Remember that a spherical shell in real space ($\delta(rr_*)$) corresponds to oscillations ($e^{ir_*k}$) in Fourierspace (do the fourier transform to see this). Thus the matter power spectrum will have osciallations imprinted in it (which are similar to the acoustic oscillations we see in the CMB powerspectrum). They are not as visible as most of the matter is dark matter, but you can see them in Figure 2.
Summary
The matter powerspectrum:
 Grows as $P \propto k^{n_s}$ on large scales
 Has a peak close to the equality scale $k_{\rm eq} = \mathcal{H}(a_{\rm eq}) \sim 10^{2} h/\text{Mpc}$ (wavelength of $\sim 400$ Mpc/h) where $a_{\rm eq} = \Omega_{R0}/\Omega_{m0} \sim 3500$ (where $\Omega_{R0} = \Omega_{\gamma 0} + \Omega_{\nu 0}$) is the scale factor for matterradiation equality.
 Decays (roughly) as $P \propto k^{n_s4} \sim k^{3}$ on small scales.
 Has oscillations due to the fact that baryons were dragged along with the photons in the early Universe leading to an excess of matter at separations $r_s \sim 150$ Mpc (the soundhorizon). These oscillations corresponds to a peak at $r = r_s$ in the two point correlation function and this distance is a standard ruler that we can measure in galaxy surveys.