# Percolation II: The Integer Lattice

This post presents a couple of results regarding percolation on ${{\mathbb Z}^d}$ (and especially ${{\mathbb Z}^2}$), which are valuable mainly because they tell us that percolation on these graphs is non-trivial i.e. none of the critical probabilities is 0 or 1. But on a concrete level, they actually do more: they give explicit bounds on the critical probabilities.

Proposition 1. For bond percolation on ${{\mathbb Z}^2}$, we have ${p_T\geq \frac{1}{3}}$

This proof hinges on counting ${\mu_n({\mathbb Z}^2)}$, the number of self-avoiding walks of length ${n}$ (in the language of graph theory, paths) on ${{\mathbb Z}^2}$. We will make use of the obvious bound

$\displaystyle \mu_n({\mathbb Z}^2)\leq 4\cdot 3^{n-1}.$

Proof: The middle inequality was discussed in the previous post, so it suffices to do the first and last ones. Let’s start with the first.

Choose some ${p<\frac{1}{3}}$ and consider the bond percolation on ${{\mathbb Z}^2}$ where every bond is open with probability ${p}$. Let ${C_0}$ be the cluster containing the origin and note that any site in ${C_0}$ must be connected to the origin by an open path starting at the origin. (It’s a little hard to see, but this is where the self-avoiding condition comes in: if the walk from the origin to the site intersected itself, we could “excise” the loop and then get another path that’s more likely to be open, because it is shorter.) The size of ${C_0}$ is bounded by the number ${X}$ of such paths and the probaibility of a path of length ${n}$ being open is ${p^n}$, so

$\displaystyle \mathop{\mathbb E}(|C_0|)\leq \mathop{\mathbb E}(X)=\sum_{n=0}^{\infty} p^n\mu_n\leq 1+\sum_{n=1}^{\infty} p^n\cdot 4\cdot 3^{n-1}<\infty,$

because ${p<\frac{1}{3}}$. Since the expected size of ${C_0}$ is finite for any ${p<\frac{1}{3}}$, we conclude that ${p_T\geq \frac{1}{3}}$. $\Box$

Proposition 2. For bond percolation on ${{\mathbb Z}^2}$, we have ${p_H\leq \frac{2}{3}}$

This proof hinges on studying the dual graph of ${{\mathbb Z}^2}$ (more on this in a second) and using a technical lemma that I won’t prove.

For a graph ${\Lambda}$, the dual ${\Lambda^*}$ is a graph whose vertices correspond to faces of ${\Lambda}$ with edges connecting adjacent faces in ${\Lambda}$. For example,

$\displaystyle \left({\mathbb Z}^2\right)^*={\mathbb Z}^2+(0.5,0.5).$

In the context of percolation, we call the sites and bonds of ${\Lambda^*}$ dual sites and dual bonds, with a dual bond taken to be closed when the original bond is open, or vice versa. (We’re associating bonds to dual bonds here by ${e\mapsto e^*}$ where ${e^*}$ is the edge of ${\Lambda^*}$ connecting the faces of ${\Lambda}$ that meet at ${e}$).

In ${{\mathbb Z}^2}$, if ${H}$ is a finite subgraph of ${{\mathbb Z}^2}$ with vertex set ${C}$, then ${{\mathbb Z}^2\setminus C}$ must have some infinite component ${C_{\infty}}$. We define ${\partial^{\infty} C}$ to be the bonds of ${\left({\mathbb Z}^2\right)^*}$ that are dual to bonds of ${{\mathbb Z}^2}$ joining ${C}$ and ${C_{\infty}}$.

Put another way, you take some finite subgraph, and look at all the edges connecting it to the infinite component of it’s complement. This set of edges maps to some set of edges in the dual, and that set is ${\partial^{\infty} C}$. The lemma says that ${\partial^{\infty} C}$ looks like the boundary of ${H}$.

Lemma 3. ${\partial^{\infty} C}$ is a cycle containing ${C}$.

Proof: As before, take some ${p>\frac{2}{3}}$, and consider bond percolation on ${{\mathbb Z}^2}$ where each bond is open with probability ${p}$. Take dual bonds ${e^*}$ to be open if ${e}$ is closed and vice versa, and call a cycle in the dual consisting of open bonds an open dual cycle.

Let ${L_k}$ be the segment connecting the origin to ${(k,0)}$ and ${S}$ some dual cycle of length ${2\ell}$ surrounding ${L_k}$. ${S}$ must cut the ${x}$-axis between ${k+0.5}$ and ${0.5(2\ell-3)}$, so there are fewer than ${\ell}$ choices for the dual bond that cuts the ${x}$-axis. The rest of ${S}$ is a path of length ${2\ell-1}$, and since the dual of ${{\mathbb Z}^2}$ is isomorphic to ${{\mathbb Z}^2}$, there are ${\mu_{2\ell-1}}$ possibilities for this portion of ${S}$. In total, we have fewer than ${\ell \mu_{2\ell-1}}$ possibilities for ${S}$.

Let ${Y_k}$ be the number of open dual cycles surrounding ${L_k}$. An open dual cycle of length ${2\ell}$ occurs with probability ${(1-p)^{2\ell}}$, so

$\displaystyle \mathop{\mathbb E}(Y_k)\leq \sum_{\ell=k+2}^{\infty} \ell\mu_{2\ell-1}(1-p)^{2\ell}\leq \sum_{\ell =k+2}^{\infty} \ell\cdot 4\cdot 3^{2\ell-2}(1-p)^{2\ell}<\infty,$

because ${p>\frac{2}{3}\implies 3(1-p)<1}$.

This means that ${\mathop{\mathbb E}(Y_k)\rightarrow 0}$ as ${k\rightarrow \infty}$, and in particular, ${\mathop{\mathbb E}(Y_k)<1}$ eventually. If ${A_k}$ is the event that ${Y_k=0}$, this means that ${\mathop{\mathbb P}(A_k)>0}$ (if ${P(A_k)}$ were never zero, then integrating over a set of measure 1 would have to give something that is at least 1). Now let ${B_k}$ be the event that all the bonds in ${L_k}$ are open, which occurs with probability ${p^k}$, which is independent of ${A_k}$.

If ${A_k}$ and ${B_k}$ both occur, then ${C_0}$ cannot be contained in a cycle of the dual graph (since ${Y_k=0}$), so it must be infinite by our lemma. Thus

$\displaystyle \theta_0(p)=\mathop{\mathbb P}(|C_0|=\infty)\geq \mathop{\mathbb P}(A_k\cap B_k)= \mathop{\mathbb P}(A_k)\mathop{\mathbb P}(B_k)\geq \mathop{\mathbb P}(A_k)p^k>0,$

so there is an infinite open cluster with probability 1. This means that ${p_H\geq p}$, and since ${p}$ is any probability ${>\frac{2}{3}}$, we have ${p_H\leq \frac{2}{3}}$. $\Box$

Remark 1. \leavevmode

1. Recalling that ${p_T\leq p_H}$, we can chain these together into

$\displaystyle \frac{1}{3}\leq p_T\leq p_H\leq \frac{2}{3},$

showing that the critical probabilities for bond percolation on ${{\mathbb Z}^2}$ are non-trivial.

2. The bound of ${\mu_n\leq 4\cdot 3^{n-1}}$ is crude, and these inequalities can be sharpened by using tighter inequalities. For example, noting that ${\mu_{m+n}\leq \mu_m\mu_n}$ (you can just concatenate paths), we see by Fekete’s lemma that ${\mu_n^{1/n}\rightarrow \lambda}$. This ${\lambda}$ is called the connective constant, and our result becomes

$\displaystyle \frac{1}{\lambda}\leq p_T\leq p_H\leq 1-\frac{1}{\lambda},$

so we just need to estimate this constant, which I won’t get into but can certainly be done.

3. Since ${{\mathbb Z}^d}$ contains ${{\mathbb Z}^2}$ within it for ${d\geq 2}$, we can recall the result at the end of the previous post to obtain

$\displaystyle \frac{1}{2d-1}\leq p_T({\mathbb Z}^d)\leq p_H({\mathbb Z}^d)\leq \frac{2}{3},$

giving non-triviality of critical probabilities for ${{\mathbb Z}^d}$.

These results are only for bond percolation. We can use them to say things about site percolation as well though, by showing that percolation is “more likely” in the site model than the bond model.

Theorem 4. For any graph ${\Lambda}$, we have ${p_H^{\mathrm{s}}\geq p_H^{\mathrm{b}}}$ and ${p_T^{\mathrm{s}}\geq p_T^{\mathrm{b}}}$.

Proof: The key claim is that for any site ${x}$, integer ${n}$, and probability ${p}$,

$\displaystyle \mathop{\mathbb P}^{\text{s}}(|C_x|\geq n)\leq p \mathop{\mathbb P}^{\text{b}}(|C_x|\geq n).$

(Here, ${\mathop{\mathbb P}^{\text{b}}}$ and ${\mathop{\mathbb P}^{\text{s}}}$ are the probability measures induced by bond and site percolation where bonds and sites are open with probability ${p}$, respectively. Throughout this proof, we use such superscripts to indicate the type of percolation being considered.)

From this claim, we let ${n\rightarrow \infty}$ to obtain ${\theta_x^{\text{s}}\leq p\theta_x^{\text{b}}}$. Then, if ${\theta_x^{\text{b}}=0}$, we have ${\theta_x^{\text{s}}=0}$ as well, so ${p_H^{\text{s}}\geq p_H^{\text{b}}}$.

For ${p_T}$, we argue similarly:

$\displaystyle \chi_x^{\text{s}}=\sum_{n=1}^{\infty} \mathop{\mathbb P}^{\text{s}}(|C_x|\geq n)\leq \sum_{n=1}^{\infty} \mathop{\mathbb P}^{\text{b}}(|C_x|\geq n)\leq p\chi_x^{\text{b}},$

and so ${\chi_x^{\text{b}}<\infty\implies \chi_x^{\text{s}}<\infty}$, meaning that ${p_T^{\text{s}}\geq p_T^{\text{b}}.}$

It remains to show the claim. We begin by writing ${\mathop{\mathbb P}^{\text{s}}(|C_x|\geq n)}$ as

$\displaystyle \mathop{\mathbb P}^{\text{s}}(|C_x|\geq n\mid x\text{ is open})\mathop{\mathbb P}^{\text{s}}(x\text{ is open})+\mathop{\mathbb P}^{\text{s}}(|C_x|\geq n\mid x\text{ is closed})\mathop{\mathbb P}^{\text{s}}(x\text{ is closed}).$

If ${x}$ is closed, ${C_x}$ is empty, so the second term is zero. Thus we see that

$\displaystyle \mathop{\mathbb P}^{\text{s}}(|C_x|\geq n)=p\mathop{\mathbb P}^{\text{s}}(|C_x|\geq n\mid x\text{ is open}),$

and so our claim is equivalent to

$\displaystyle p\mathop{\mathbb P}^{\text{s}}(|C_x|\geq n\mid x\text{ is open})\geq \mathop{\mathbb P}^{\text{b}}(|C_x|\geq n).$

Next, we note that since the event ${|C_x^{\text{s}}|\geq n}$ depends only on vertices that are within ${n}$ of ${x}$, it suffices to consider the subgraph ${\Lambda_n}$ of points within ${n}$ of ${x}$. The idea now is to construct a sequence of subsets of ${V(\Lambda_n)}$ (the vertex set of ${\Lambda_n)}$ denoted ${\mathcal{T}=(R_t, D_t, U_t)_{t=1}^{\ell}}$ such that ${R_{\ell}= C_x^{\text{s}}}$. The constant ${\ell}$ is random, and the letters ${R, D, U}$ stand for reached, dead, and untested respectively.

The construction is as follows:

1. Let ${R_1=\{x\}, U_1=V(\Lambda)\setminus \{x\}, D_1=\emptyset}$
2. Pick a bond ${e_t=y_tz_t}$ where ${y_t\in R_t}$ and ${z_t\in U_t}$. Remove ${z_t}$ from ${U_t}$. If ${y_t}$ is open, add it to ${R_t}$ and leave ${D_t}$ alone; otherwise add it to ${D_t}$ and leave ${R_t}$ alone. This gives the new triplet.
3. Repeat 2 until no such bond ${e_t}$ exists, and set ${t=\ell}$, completing the process. (This must happen eventually because ${\Lambda_n}$ is finite.)

In the end, ${R_{\ell}}$ is a connected set of open sites with no neighbors in ${U_{\ell}}$ that is disjoint from the sites of ${D_{\ell}}$ which are all closed, so it is exactly ${C_x^{\text{s}}}$. Note that the conditional probability of ${z_t}$ being open is always ${p}$.

Now, consider an analogous sequence for ${C_x^{\text{b}}}$, ${\mathcal{T}'}$. The difference here is that after picking ${e_t}$, we check whether ${e_t}$ is open (conditioned on the sequence up to that open). This probability is always ${p}$ as well, so ${\mathcal{T}}$ and ${\mathcal{T}'}$ have the same distribution.

In particular, ${|C_x^{\text{s}}|=|R_{\ell}|}$ and ${|R'_{\ell'}|}$ have the same distribution. Since ${R'_{\ell'}}$ is contained in ${C_{x}^{\text{b}}}$ (it is the vertex set of the subgraph spanned by the bond we found to be open), the claim follows, concluding the proof. $\Box$

So this shows that ${p_H^{\text{s}}, p_T^{\text{s}}}$ are not zero. To show that they are also not 1, we need another inequality, namely:

Theorem 5. For percolation on an infinite connected graph with maximum degree ${\Delta}$,

$\displaystyle p_H^{\mathrm{s}}\leq 1-(1-p_H^{\mathrm{b}})^{\Delta-1}.$

The proof is similar, but more involved, so I’ll skip it here. The upshot of all this is that ${p_T^{\text{s}}, p_T^{\text{b}}, p_H^{\text{b}}, p_H^{\text{s}}}$ are all non-trivial for ${{\mathbb Z}^2}$. In the next few posts, we’ll take the next step and actually determine ${p_T^{\text{b}}}$ and ${p_H^{\text{s}}}$.

# Percolation I: Critical Probabilities

This is the first in a series of posts about percolation theory, which I’m studying this summer. The main text I’m using is Bollobas’s book on the subject, and I plan to follow it pretty closely. There should be around six posts, culminating in the proof of the Harris-Kesten theorem, a major result about percolation on ${{\mathbb Z}^2}$. This material corresponds to the first three chapters of Bollobas, with some omissions and rearrangement.

### 1. The Big Picture

The idea is to consider some graph (prototypically ${{\mathbb Z}^d}$ but theoretically any graph), and choose a random subgraph of this graph by selecting each edge to be part of the subgraph with probability ${p}$. Alternatively, do the same thing with vertices instead of edges, and take the subgraph to be the one induced by the chosen vertices.

Some terminology:

• The edges are bonds
• The vertices are sites
• The chosen edges/vertices are open
• The chosen graph is the open subgraph
• The connected components of the open subgraph are open clusters

According to this language, the two models described above are bond percolation and site percolation.

The physical motivation for this model is a liquid percolating through a solid lattice, where the open bonds/sites represent the bonds/sites that the liquid can pass through. The main question suggested by this interpretation is whether the liquid will be able to pass through the lattice completely, which corresponds to the existence of an infinite open cluster.

The Harris-Kesten theorem mentioned above answers this question for bond percolation on ${{\mathbb Z}^2}$. It shows that for ${p>\frac{1}{2}}$, there is an infinite open cluster with probability 1, and for ${p<\frac{1}{2}}$ there is an infinite open cluster with probability 0.

This post takes the first step toward proving this result by defining two critical probabilities that are closely related to this question, and then computing them for some simple graphs. Before we can even take that step though, we must construct a probability space ${(\Sigma, \mathop{\mathbb P})}$ in which to work. For a graph ${G=(V,E)}$, we take:

• ${\Omega=\{0,1\}^{|E|}}$ to be the set of all arrangements of open edges, where 0 represents a closed edge and 1 represents an open edge;
• ${\Sigma}$ to be the ${\sigma}$-algebra on ${\Omega}$ generated by the cylinders

$\displaystyle C(F, \sigma)=\{\omega \in \Omega\mid \omega_f = \sigma_f\text{ for } f\in F\},\quad F\subset E\text{ and }\sigma =\{0,1\}^{|F|};$

• ${\mathop{\mathbb P}}$ to be the probability measure on ${\Sigma}$ induced by

$\displaystyle \mathop{\mathbb P}(C(F, \sigma))=\left(\prod_{\substack{f\in F\\ \sigma_f=1}} p\right)\left(\prod_{\substack{f\in F\\ \sigma_f=0}} 1-p\right).$

In everything that follows, all probabilities are defined according to this measure.

### 2. Critical Probabilities

For a site ${x}$, let ${C_x}$ be the open cluster containing ${x}$, and let ${\theta_x(p)}$ be the probability that ${C_x}$ is infinite.

Proposition 1. There is a critical probability ${p_H}$ such that ${\theta_x(p)=0}$ if ${p and ${\theta_x(p)>0}$ if ${p, for all ${x}$.

(The notation ${p_H}$ is in honor of Hammersley, who first proposed this model.)

Proof: Take any two sites ${x, y}$ such that ${|x-y|=d}$ (this is the distance induced by ${G}$). Then ${\theta_x(p)\geq p^d \theta_y(p)}$, since if there is an infinite open cluster containing ${y}$ and a path from ${y}$ to ${x}$, there will be an infinite open cluster containing ${x}$ as well. Thus, if ${\theta_x(p)=0}$ for one site, then ${\theta_x(p)=0}$ for all sites, and if ${\theta_x(p)>0}$ for one site, then ${\theta_x(p)>0}$ for all sites. If we show that ${\theta_x(p)}$ is an increasing function of ${p}$, the existence of ${p_H}$ follows.

To see the increasing behavior (which is intuitively clear), consider assigning each edge ${e}$ an independent random variable ${X_e\sim \text{Uni}[0,1]}$, and then taking it to be open if ${X_e. If ${p_1, the subgraph obtained with probability ${p_1}$ will always be contained in the subgraph obtained with probability ${p_2}$, so ${\theta_x(p)}$ must be increasing. $\Box$

We now connect this ${p_H}$ to our original question about the existence of an infinite open cluster.

Corollary 2. Let ${E}$ be the event that there is an infinite open cluster. Then ${\mathop{\mathbb P}(E)=1}$ if ${p>p_H}$ and ${\mathop{\mathbb P}(E)=0}$ if ${p.

Proof: The event ${E}$ is a tail event, so by the Kolmogorov 0-1 law, it can only take the values 0 and 1. If ${p, then ${\mathop{\mathbb P}(E)\leq \sum_{\text{sites }x} \theta_x(p)=0,}$ so ${\mathop{\mathbb P}(E)=0}$. If ${p>p_H}$, then ${\mathop{\mathbb P}(E)\geq \theta_x(p)>0}$ for at least one site, so ${\mathop{\mathbb P}(E)=1}$. $\Box$

So to understand when there is an infinite open cluster, it suffices to understand ${p_H}$.

When ${p, any ${C_x}$ is almost surely finite, but it’s expected size might not be. Set ${\chi_x(p)=\mathop{\mathbb E}(|C_x|)}$. By the same arguments as before, ${\chi_x(p)}$ increases with ${p}$, and it is either finite for all sites or for no sites. Thus we define

$\displaystyle p_T=\sup\{p\mid \chi_x(p)<\infty\},$

with the notation in honor of Temperley this time.

We have been deliberately ambiguous until now about whether we are working with bond percolation or site percolation in this section, and in fact we mean both. That is, there are actually four critical probabilities: ${p_T^{\text{b}}, p_T^{\text{s}}, p_H^{\text{b}}, p_H^{\text{s}}}$. And since each of these depends on the choice of graph, we actually need to write ${p_T^{\text{s}}(G)}$. This notation is a bit cumbersome though, so we refrain from using it except where absolutely necessary.

One obvious relationship between ${p_T}$ and ${p_H}$ is that ${p_T\leq p_H}$. Some more difficult relations are known, but we’ll look at those in a later post. For now, let’s do an example.

### 3. Computing the Critical Probabilities

Determining ${p_T}$ and ${p_H}$ in general is quite hard (after all, the Harris-Kesten theorem basically boils down to doing this for ${{\mathbb Z}^2}$, and is already highly non-trivial), but there are some simple graphs for which it can be done. We do an example with bond percolation.

Suppose ${G=T_k}$ is the tree in which every vertex has degree ${k+1}$, except for the root which has degree ${k}$. Call the root ${v_0}$ and let ${T_{k,n}}$ be the subgraph obtained by truncating this graph ${n}$ levels down from the root. We write ${\pi_n}$ for the probability that, in bond percolation with probability ${p}$, there is an open path of length ${n}$ from ${v_0}$ to a leaf of ${T_{k,n}}$.

For there to be an open path of length ${n}$ from ${v_0}$ to a leaf of ${T_{k,n}}$, there must be an open edge between ${v_0}$ and some other vertex, and then an open path from that vertex to a leaf. This gives

$\displaystyle \pi_n=1-(1-p\pi_{n-1})^k.$

Consider the function ${f(x)=1-(1-px)^k}$. The ${\pi_n}$ result from iterating this function starting with ${\pi_0=1}$, so we need to study it’s fixed points. We have ${f(0)=0}$ and ${f(1)<1}$. If ${f'(0)>1}$, then ${f(\epsilon)>\epsilon}$ for some small ${\epsilon>0}$, but ${f(1)<1}$, so there is some fixed point ${x_0}$. Otherwise, the unique fixed point is at ${x=0}$. Concretely, ${f'(0)=pk}$, so this condition reduces to ${p>\frac{1}{k}}$.

In the case where ${p>\frac{1}{k}}$, we see that ${\pi_{n-1}\geq x_0\implies \pi_n\geq x_0}$, and since ${\pi_0=1\geq x_0}$, we always have ${\pi_n\geq x_0}$. But this ${\pi_n}$ is a lower bound on ${\theta_{v_0}(p)}$, since if there is an infinite open cluster containing ${v_0}$ there must be a path to the bottom, so ${\theta_{v_0}(p)>0}$, and so ${p_H\leq \frac{1}{k}}$.

On the other hand, if ${p\leq \frac{1}{k}}$, the ${\pi_n}$ converge to the unique fixed point at 0, meaning that ${\theta_{v_0}(p)=0}$. It follows that ${p_H=\frac{1}{k}}$ for ${T_k}$.

We can also do ${p_T}$: a site at depth ${\ell}$ is part of ${C_{v_0}}$ with probability ${p^{\ell}}$, so

$\displaystyle \chi_{v_0}(p)=\sum_{y\in T_k} \mathop{\mathbb P}(y\in C_{v_0})=\sum_{\ell=0}^{\infty} k^{\ell}p^{\ell},$

which is finite if and only if ${pk<1}$. Thus ${p_T=\frac{1}{k}}$ as well.

A few remarks about this calculation: the fact that ${p_T=p_H}$ here is not unusual. This is true for a very general class of graphs.

Also, it turns out that this tree ${T_k}$ has, in some sense, the lowest critical probability possible. To see this, take ${G}$ to be a graph with maximum degree ${\Delta}$. If ${y\in C_x}$, then there is an open path from ${y}$ to ${x}$, so we can bound ${\chi_x(p)}$ by the number of paths in ${G}$ that start at ${x}$. Using our information about the maximum degree, this gives

$\displaystyle \chi_x(p)\leq 1+\sum_{\ell=1}^{\infty} \Delta(\Delta-1)^{\ell-1} p^{\ell},$

which converges exactly when ${p<\frac{1}{\Delta-1}}$. This means that ${p_T\geq \frac{1}{\Delta-1}}$, and since ${p_H\geq p_T}$, this bound holds for ${p_H}$ as well. In ${T_k}$, ${\Delta=k+1}$, and this bound is attained.

So the tree ${T_k}$ is special in more ways than one. It turns out that the more “tree-like” a graph is, the more easily ${p_T}$ and ${p_H}$ can be computed. Unfortunately, ${{\mathbb Z}^2}$ is nothing like a tree, so a different approach is required to tackle it.

# Q&A with the NYT Crossword Archive

I’ve been doing a lot of crosswords lately, so I thought I’d spend some time playing around with old crosswords to see if there was anything interesting to say about them. This whole post is structured as a series of questions I or other people asked, which I then answered using data from this repository. If there’s anything not covered here you’d like to know about, feel free to get in touch with me!

Just for reference, there are 1229405 clue/answer pairs, taken from 14524 puzzles. After throwing out duplicates, there are 140628 distinct answers, and 696050 distinct clues.

### 1. The Words

Question. What are the most common words?
It turns out that these are almost exclusively short, vowel-rich words, with the top 5 being:

Word Occurrences
AREA 894
ERA 880
ERIE 818
ERE 750
ALOE 723

These aren’t especially interesting, so I then filtered by length i.e. found the most common word of each length. They’re a bit unwieldy to format here, but you can see them all here. The smaller ones are still boring, but the longer ones are cute, and the sudden uptick in frequencies for the final block is especially helpful: there just aren’t that many very long words appearing in crosswords, it seems.

Question. What is the longest word?
This turns out to be a bit tricky to answer: doing the obvious sorting gives the answer of:

“TENNINEEIGHTSEVENSIXFIVEFOURTHREETWOONEITSTWOOOTWO,”

which is from the 12/30/2001 puzzle, which I couldn’t find a copy of. The second longest is the theme answer from this puzzle, which makes it clear that the previous one was probably a rebus too.

If you don’t count a rebus answer (which is reasonable), then there’s a whole slew of 23 letter words coming from a time when the Sunday was 23 by 23. If you don’t want to count those either, then you’re left with the pile of 21 letter words that span modern Sunday grids.

Question. What word has the most distinct clues?
The answer here turns out to be for the most part, the same as the common words:

Word Distinct Clues
ERA 462
ERIE 439
ONE 432
ARIA 424
ORE 405

Just to take a peek under the hood, all of the distinct clues for ERA can be seen here, and they seem to fall into three categories:

• ERA like the time period
• ERA like the baseball statistic
• ERA like the Equal Rights Amendment

So, on a spiritual level, there’s only 3 clues for ERA. On the other hand, ONE actually has many meaningfully different clues, all of which are listed here. I wish there was some way to capture this sense of “spiritually different clues” and then find the answer with the most “spiritually diverse” clues, but I can’t think of a good algorithmic way to do it.

Question. What words have very few distinct clues?
I arbitrarily chose to look at words that are in the 10000 most common words but have fewer than 5 clues. The 5 most common (although there are only 9 in total) are:

Word Occurrences Clues
AVISO 38 4
BRAC 32 2
OEN 29 4

The occurrences column basically shows that for a word to have fewer than 5 distinct clues, it really can’t appear all that often. If it does, it ends up having at least technically diverse clues, like those for ERA.

Question. How has the popularity of words changed over time?
I plotted this for 10 common words – there don’t seem to be any appreciable trends.

Question. How does the distribution of letters in crossword answers compare to in normal English?
One graph shows it all:

Some of these make sense: A and E are over-represented because it’s easy to fill in grids with them. Others make no sense at all: why is H so under-represented?

Question. What are the hardest words?
Well, first you have to come up with some way to measure difficulty: I assigned values of 1, 2, 3, 4, 5, 6, 4 to the days of the week in order, keeping with the conventional wisdom that Sunday is about as hard as Thursday. Here are the 5 words from the 10,000 most common words that had the highest average value:

Word Occurrences
ONLEAVE 4.97
ALACARTE 4.93
OPALINE 4.85
ETAMINE 4.79
ONEONEONE 4.78

### 2. The Clues

Question. What are the most common clues?
No real pattern to these:

Clue Occurrences
Concerning 317
Jai ___ 256
Greek letter 250
Chemical suffix 225
Gaelic 216

It’s interesting to look at the answers these clues point to: “Concerning” has a handful, “Jai ___” has only one (ALAI), “Greek letter” and “Chemical suffix” both have a decent mix again, and “Gaelic” is only ever a clue for ERSE.

Question. What are clues that have many distinct answers?
I’m not going to give a list of the top results here, because many of them are things like “See 17-Across” or “Theme of this puzzle,” which are not very interesting. Two results that are in the right vein though, are “Split” and “Nonsense”, which have 47 and 40 possible answers respectively, that are listed out here and here.

Question. What are clues that have only one answer?
There are tons of these. A small sample:

Clue Occurrences
___-majesté 143
___ avis 132
Dies ___ 132
Sri ___ 102
__-Magnon 98

Note that I’m omitting “Jai ___” and “Gaelic” for variety’s sake. As suggested by this sample, nearly all of the one-answer clues are fill in the blanks, which makes sense.

### 3. The Days

Question. How does the length of words vary over the week?
Not much, as it turns out:

Question. How does the frequency of puns vary over the week?
A lot, as it turns out:

Question. How does the density of vowels vary over the week?
And we’re back to not much:

So it seems like puns best capture the difficulty gradient of the week.

### 4. The Years

Question. How does the length of words vary over the years?
In strange and inconsistent ways:

One fact that may be relevant: Will Shortz began editing the puzzle in 1993. I’m not sure if this explains the jump, but it’s certainly a compelling story.

Question. How does the frequency of puns vary over the years?
People love them more every year:

It’s interesting to note that there’s still a spike in the mid-90s, but this spike comes 2-3 years after Shortz became editor.

Question. How does the density of vowels vary over the years?
Basically the opposite of the puns:

Again, the huge drop occurs when Shortz takes over.

# Memory in Speech Processing

This very short post is just to jot down an epiphany I had about a connection between two different approaches used in speech processing.

One popular kind of feature extracted from raw speech data is an MFCC. I don’t want to dwell too much on what exactly this is, but it basically involves taking two Fourier transforms (so it’s the spectrum of a spectrum), which works well, but is completely mystifying. The first Fourier transform makes sense, since sound waves are a periodic phenomenon, but the second one makes much less sense.

Another group of approaches that are growing in popularity are recurrent neural networks, which are basically networks that have some notion of “memory” built in to them. This means that inputs seen at previous times can be used for prediction for a present input, although details vary a lot depending on the particular implementation.

The punchline is that, on some level, these are doing similar things. Or rather, the MFCC is also relying on the idea that data from previous time points are influencing the current data point.

To see this, suppose our data are ${x_1, x_2,\cdots,}$ and that they follow a model of the form

$\displaystyle x_t=s_t+As_{t-D},$

for some other stationary series ${s_t}$ and constants ${A, D}$. The recurrent neural network would try to learn that ${x_{t-D}}$ carries information about ${x_t}$ (since it is designed to have access to ${x_{t-D}}$. What about the MFCC?

It’s helpful to directly compute the spectrum, starting with the auto-covariance. If ${\gamma_s(h)=\text{cov}(s_{t+h}, s_t)}$ is the auto-covariance of ${s_t}$, then the auto-covariance of ${x_t}$ is

$\displaystyle \gamma_x(h)=\text{cov}(x_{t+h}, x_t)=\text{cov}(s_{t+h}+As_{t-D+h}, s_t+As_{t-D})$

which, because the covariance is bilinear, becomes

$\displaystyle (1+A^2)\gamma_s(h)+A\gamma_s(h+D)+A\gamma_s(h-D).$

Then the theoretical spectrum is

$\displaystyle f_x(\omega)=\sum_{h=-\infty}^{\infty} \gamma_x(h)e^{-2\pi i \omega},$

which because of our earlier computation expands to

$\displaystyle \sum_{h=-\infty}^{\infty}((1+A^2)\gamma_s(h)+A\gamma_s(h+D)+A\gamma_s(h-D)) e^{-2\pi i \omega h}.$

This can be rewritten as

$\displaystyle (1+A^2)f_s(\omega)+Ae^{2\pi i \omega D}\sum_{h=-\infty}^{\infty} \gamma_s(h+D)e^{-2\pi i \omega (h+D)}+Ae^{-2\pi i \omega D}\sum_{h=-\infty}^{\infty} \gamma_s(h-D)e^{-2\pi i \omega (h-D)},$

and then simplified to

$\displaystyle (1+A^2)f_s(\omega)+Af_s(\omega)(e^{2\pi i \omega D}+e^{-2\pi i \omega D})=(1+A^2+2A\cos (2\pi \omega D))f_s(\omega).$

So the spectrum actually has a periodic component, and taking a second Fourier transform means sussing out this periodicity.

This means then, that MFCCs and recurrent neural networks are actually making similar assumptions about the data, or at least trying to exploit the same kind of structure. I like this similarity, especially because it suggests that thinking about the effect of previously seen data points is the “right” way to think about speech data.

# Multiple Testing Procedures

Here’s something problematic: let’s say you run a hypothesis test at a significance level of ${\alpha=0.05}$. Then, assuming you ran the test correctly and met assumptions, the probability of a type I error is only 5%. But if you instead run 100 tests at a significance level of ${\alpha=0.05}$, the probability of making at least one type I error soars to

$\displaystyle 1-(1-0.05)^{100}\approx 99\%,$

and this only gets worse as you run increasingly many tests. This is the multiple testing problem, and this blog post discusses a couple of solutions to it as well as why they work. Most of this is taken from my notes for UChicago’s STAT 278, which I’d highly recommend to anyone interested in these sorts of things.

The set up for the rest of this post is as follows. We have p-values ${p_1,\cdots, p_n}$ that we’ve acquired from some hypothesis tests. Some of these come from true null hypotheses, and are distributed uniformly on ${[0,1]}$. The rest come from false null hypotheses, and we know nothing about their distribution.

We want to run a test that will have a significance level of ${\alpha}$, not for each test individually, but for all of them together. This will turn out to mean different things for different methods.

### 1. Bonferroni Correction

This is a method for testing the global null hypothesis, which is the hypothesis that all of the null hypotheses that generated our p-values are true (so we take the intersection of the relevant events). We do this in the most naive way possible, and it turns out to work.

We just test each of the ${p_i}$ at a significance level of ${\alpha/n}$, and reject the global null if any of the ${p_i}$ are rejected. That is, we reject the global null if ${p_i\leq \alpha/n}$ for some ${i}$ and fail to reject otherwise.

In what sense does this work?

Proposition 1. When testing the global null hypothesis using Bonferroni correction, the probability of making a type I error is ${\leq\alpha}$.

Proof: This is direct. The probability that we reject the global null is

$\displaystyle \mathop{\mathbb P}\left(\min_{1\leq i\leq n} p_i\leq \frac{\alpha}{n}\right)=\mathop{\mathbb P}\left(\bigcup_{i=1}^n \left\{p_i\leq \frac{\alpha}{n}\right\}\right),$

which by the union bound is

$\displaystyle \leq \sum_{i=1}^n\mathop{\mathbb P}\left(p_i\leq \frac{\alpha}{n}\right)=n\cdot \frac{\alpha}{n}=\alpha,$

so we have FWER control. $\Box$

So that’s nice. But it’s also extremely conservative, and we can afford to do things that are a bit more powerful.

### 2. Simes’ Test

Here we’re also testing the global null, but a bit more cleverly. The Simes’ test rejects the global null if there is 1 p-value that is ${\leq \frac{\alpha}{n}}$, or 2 p-values that are ${\leq \frac{2\alpha}{n}}$, or in general, if there are ${k}$ p-values that are ${\leq \frac{k\alpha}{n}}$ for any ${1\leq k\leq n}$. This will reject when Bonferroni rejects, but also in some other cases, so its more powerful. This power costs something, though: we need an assumption of independence to get a bound, and this bound isn’t as strong as for Bonferroni.

Proposition 2. If the p-values are independent, then when testing the global null hypothesis using Simes’ test, the probability of making a type I error is ${\leq\alpha H_n\approx \alpha \log n}$.

Proof: We assign a score to each ${p}$-value that measures what percent of the way it gets us to rejecting the global null. Let

\displaystyle s_i=\left\{\begin{aligned} 1&\text{ if }&& p_i\leq \frac{\alpha}{n}\\ \frac{1}{2}&\text{ if }&& \frac{\alpha}{n}\leq p_i\leq \frac{2\alpha}{n}\\ &\vdots \\ \frac{1}{n}&\text{ if }&& \frac{\alpha(n-1)}{n}\leq p_i\leq {\alpha}\\ \\ 0&\text{ if } &&p_i>\alpha\end{aligned}\right.

Then, Simes rejects if and only if, for some ${k}$, there are ${k}$ ${p_i}$‘s that are ${\leq \frac{k\alpha }{n}}$, which means that the sum of the ${s_i}$ is ${\geq 1}$. So now we can calculate the probability of that happening.

The expected value of any given score is

$\displaystyle \mathop{\mathbb E}[s_i]=1\cdot \frac{\alpha}{n}+\cdots +\frac{1}{n}\cdot \frac{\alpha}{n}=\frac{\alpha}{n}H_n.$

Then,

$\displaystyle \mathop{\mathbb P}(\text{Simes rejects})\leq \mathop{\mathbb P}\left(\sum_{i=1}^m s_i\geq 1\right)\leq \mathop{\mathbb E}\left[\sum_{i=1}^n s_i\right] =n\cdot \frac{\alpha}{n}H_n =\alpha H_n.$

$\Box$

Note that for large ${n}$, the ${\log n}$ factor counts a lot, and the bound is sharp. The equality construction is a bit of a pain, but the idea is to choose the joint distribution of the ${p_i}$ to make them negatively dependent.

### 3. Holm-Bonferroni

This test is different from the previous two in that it does not test the global null, but instead individually tests each of the ${p_i}$ and then controls the family-wise error rate (FWER), which is the probability of making at least one type I error across all the p-values. As an added bonus, we can accept/reject individual p-values rather than accepting/rejecting them all at once, so we have a much better sense of how significant the results are, taken together.

The idea of Holm-Bonferroni is to run Bonferroni until acceptance. We first run Bonferroni on ${p_1,\cdots, p_n}$. If we do not reject the global null, we stop. If we do, then we reject the smallest p-value, and repeat this procedure with the other p-values, continuing until we do not reject the global null.

Equivalently, if we order the p-values as ${p_{(1)},\cdots, p_{(n)}}$, this is the same as checking if

$\displaystyle p_{(k)}\leq \frac{\alpha}{n+k-1}$

for each ${k=1,\cdots, n}$ and rejecting all the p-values before the first ${k}$ that fails this test.

Proposition 3. For Holm-Bonferroni, we have ${\text{FWER}\leq \alpha}$.

Proof: Let ${n_0=\#\text{ of nulls}}$. Then

$\displaystyle \mathop{\mathbb P}\left(\min_{\text{nulls }i} \leq \frac{\alpha}{n_0}\right)\leq \alpha,$

from a union bound. In this case, we might have false rejections, but this only happens ${\alpha}$ of the time. So we show that the other ${1-\alpha}$ of the time, there are no false rejections.

Suppose ${p_i>\frac{\alpha}{n_0}}$ for all nulls ${i}$. Then, take the ordered ${p}$-values ${p_{(1)},\cdots, p_{(n)}}$. Let ${p_{(k)}}$ be the first ${p}$-value that comes from a null. We know that this ${p}$-value can’t be too small, and we know it can’t happen super late in the list, because there are at most ${n-n_0}$ non-nulls. This means that ${k\leq n-n_0+1}$. There are two cases now: the procedure stops before step ${k}$ (which means no false rejections because no nulls before ${k}$). Or, it gets to step ${k}$, and we check if ${p_{(k)}\leq \frac{\alpha}{n+1-k}}$. But we know that ${p_{(k)}>\frac{\alpha}{n_0}}$ and ${k\leq n-n_0+1}$, so the ${\frac{\alpha}{n+1-k}\leq \frac{\alpha}{n_0}}$. By our assumption on the null ${p_i}$ then, we stop at step ${k}$, and there are no false rejections. $\Box$

As with the Bonferroni correction, we don’t need any assumptions of independence.

### 4. Benjamini-Hochberg

This is another multiple testing procedure, but instead of controlling the FWER, it controls

$\displaystyle \text{FDR}=\mathop{\mathbb E}\left[\frac{\#\text{ null p-values rejected}}{\#\text{ p-values rejected}}\right],$

the false discovery rate. The quantity we’re taking the expectation of is the false discovery proportion (FDP).

Here, we build on Simes’ test by running Simes’, and then rejecting those ${k}$ p-values that are ${\leq \alpha\frac{k}{n}}$, for the maximum ${k}$ we can do this for. Equivalently, we choose some threshold ${\alpha\frac{k}{n}}$, and then reject all the p-values below this threshold.

Proposition 4. If the p-values are independent, the Benjamin-Hochberg gives ${\text{FDR}=\alpha\frac{n_0}{n}\leq \alpha}$.

Proof: Suppose we make ${\hat{k}}$ rejections, so our threshold is ${\alpha\frac{\hat{k}}{n}}$, meaning that ${p_i}$ is rejected iff ${p_i\leq \alpha\frac{\hat{k}}{n}}$. The trouble is that here, the RHS also depends on ${p_i}$, so we have to go through some gymnastics to get around this.

Let ${\hat{k}_i}$ be the largest ${k}$ such that there are ${k-1}$ many p-values ${p_j}$ with ${j\neq i}$ that are ${\leq \alpha\frac{k}{n}}$. Call this statement the ${\text{BH}_i}$ statement, and the statement that there are ${k}$ many p-values ${\leq \alpha\frac{k}{n}}$ the BH statement.

Claim. If ${p_i}$ is rejected, then ${\hat{k}=\hat{k}_i}$.

Call the first statement the BH statement, and the second one (with ${k-1}$) the BH${_\text{i}}$ statement.

Now, suppose ${p_i}$ is rejected. Then ${p_i \leq \alpha \frac{k}{n},}$ and BH holds for ${k=\hat{k}}$, so there are ${\hat{k}-1}$ of the ${p_j}$, ${j\neq i}$, that are also ${\leq \alpha \frac{\hat{k}}{n}}$. Thus BH${_{\text{i}}}$ holds for ${k=\hat{k}}$, and so ${\hat{k}_i\geq \hat{k}}$.

On the other hand, ${p_i\leq \alpha \frac{\hat{k}}{n}\leq \alpha \frac{\hat{k}_i}{n}}$, so BH${_{\text{i}}}$ is true at ${k=\hat{k}_i}$, which means there are ${\hat{k}_i}$ values that are ${\leq \alpha \frac{\hat{k}_i}{n}}$, so BH is true at ${k=\hat{k}_i}$, and thus ${\hat{k}\geq \hat{k}_i}$. It follows that ${\hat{k}=\hat{k}_i}$

With this claim, we can move onto the main result. We have

$\displaystyle \text{FDR}=\mathop{\mathbb E}[\text{FDP}]=\mathop{\mathbb E}\left[\frac{\sum_{i\text{ null}} \mathbf{1}\{p_i\text{ is rejected}\}}{\max(1, \hat{k})}\right]=\sum_{i\text{ null}} \mathop{\mathbb E}\left[\frac{\mathbf{1}\{p_i\text{ is rejected}}{\max(1,\hat{k})}\right].$

We can replace the denominator with ${\hat{k}_i}$ without changing the sum, because when they differ, the numerator is 0, so it doesn’t matter. Then, this is

$\displaystyle \sum_{i\text{ null}}\mathop{\mathbb E}\left[\frac{\mathbf{1}\{p_i\text{ rejected}\}}{\hat{k}_i}\right]\leq \sum_{i\text{ null}}\mathop{\mathbb E}\left[\frac{\mathbf{1}\{p_i\leq \alpha \frac{\hat{k}_i}{n}\}}{\hat{k}_i}\right].$

This is an inequality because if the first numerator is 1, the second is definitely 1, but if the first is 0, the second might not be.

Now, we use the tower law to write this as

$\displaystyle \sum_{i\text{ null}} \mathop{\mathbb E}\left[\mathop{\mathbb E}\left[\frac{\mathbf{1}\{p_i\leq \alpha\cdot \hat{k}_i/n\}}{k_i}\Big| p_j, j\neq i\right]\right].$

That conditional expectation is just

$\displaystyle \frac{\mathop{\mathbb P}\{p_i\leq \alpha\hat{k}_i/n\mid p_j, j\neq i\}}{\hat{k}_i}=\frac{\alpha \hat{k}_i/n}{\hat{k}_i}=\alpha/n.$

This is a constant, and the expected value of that is just ${\alpha/n}$. When you add this over all the null terms, you get ${\alpha\frac{n_0}{n}}$, as desired. $\Box$

Here, we actually get a better bound than ${\alpha}$, which might seem like a good thing, but also means we’re not making as many discoveries as we could be. We can correct for this by estimating ${n_0}$, and then running BH with ${\alpha\frac{n}{n_0}}$, so that the FDR for this procedure will be ${\leq \alpha}$.

Although we used independence here, we can make do without it, albeit at the cost of a logarithmic factor.

Proposition 5. When running Benjamini-Hochberg, we have ${\text{FDR}\leq \alpha\frac{n_0}{n}H_n}$.

Proof: As before, we define a score ${s_i}$ for each ${p_i}$ that is 1 if ${0\leq p_i\leq \alpha \frac{1}{n}}$, ${\frac{1}{2}}$ if ${\alpha\frac{1}{n} and so on, giving a score of 0 if ${p_i>\alpha}$.

We proved above that for a null ${p}$-value, the expected score is

$\displaystyle \frac{\alpha}{n}\left(1+\cdots+\frac{1}{n}\right).$

Now, we write

$\displaystyle \text{FDR}=\sum_{i\text{ null}} \mathop{\mathbb E}\left[\frac{\mathbf{1}\{p_i\text{ rejected}\}}{\max(1, \hat{k})}\right].$

If ${p_i}$ is rejected, then ${p_i\leq \alpha \hat{k}/n}$, so its score is ${\geq 1/\hat{k}}$. Put another way,

$\displaystyle \frac{\mathbf{1}\{p_i\text{ rejected}\}}{\max(1, \hat{k})}\leq s_i.$

Thus,

$\displaystyle \text{FDR}\leq \sum_{i\text{ null}} \mathop{\mathbb E}[s_i]=\alpha\frac{n_0}{n}\left(1+\cdots+\frac{1}{n}\right).$

$\Box$

# Thoughts on Live TeXing

I decided the summer before coming to college that I wanted to live-TeX notes for my math classes, and dutifully set out to seek advice from the Internet. The results were uncharacteristically disappointing. Only a handful of blog posts and articles discuss the subject, and that handful really only addresses the logistics involved. So this post is a more spiritual take on live-TeX’ing, based on my experiences.

(Caveat emptor: my experiences are probably not universal. Your mileage may vary.)

Before I say anything about TeX’ing, a quick summary of the alternatives. Taking notes on paper, although apparently effective for some people, doesn’t work for me because of my poor handwriting. Not taking notes, although certainly effective in some situations, doesn’t seem like a good idea in every situation. So for me, the choice is between TeX’ing, and sitting back and listening.

TeX’ing notes has the advantage of forcing you to pay attention to the superstructure of a lecture. There’s usually more to a lecture than the union of all the theorems, definitions, and proofs, and typing things like “We want this to be true in general, but…,” or “The punchline is that…,” or “With this example in mind, we define…” quickly draws your attention to them. You could certainly do this with a pen and paper too, but they’re usually too slow to give you time to jot down these longer ideas (unless that’s all you do). The speed of typing gives you extra time to spend on exposition, and crafting this exposition on the fly solidifies your ideas about the material.

This advantage is tempered though, by the difficulties that can arise from TeX’ing long technical arguments. One flavor of such arguments, that involves repeated manipulations of a single expression, is very amenable to being TeX’ed – copy-pasting is significantly faster than rewriting the entire expression. But another flavor involves many different expressions that hardly resemble each other, and these are deeply problematic, especially if matrices rear their ugly head or if subscripts are floating around. I’ve made the mistake before of getting caught up in transcription, only to realize that I have no clue what the math I’m transcribing means.

Another issue is that superstructure isn’t always what you should be paying attention to in a lecture. There’s a certain kind of wild, edge-of-your-seat lecture, where it’s all you can do to hang on and follow the speaker line by line. In these talks, trying to suss out those big ideas not only fails, but actually detracts from your ability to understand the basic material. On the other end of the spectrum, some lectures are on material that you’ve seen or are completely familiar with, and have already internalized the yoga of, so this advantage completely evaporates.

A great deal also depends on the lecturer. Obviously good lecturers are easy to take notes on, and bad lecturers hard, but many otherwise insignificant quirks can make a particular lecturer a pain to live-TeX.

Some lecturers are fond of nesting things. They’ll start a theorem, realize they need a definition, make a few remarks about the definition, maybe prove a claim. This is all fine at the board, but if you’re working (as I often do) with boxes around theorems and definitions on the page, it doesn’t translate well at all.

Other lecturers are prone to making corrections to their board work that are easy at the board, but hard on a computer. Swapping entries in a large matrix, adding forgotten tildes, or erasing and rewriting part of an expression while verbally explaining the manipulation all fall into this category.

And finally, there are lecturers who draw pictures. Simpler pictures, or complicated pictures drawn once and left alone are usually fine, and can be recreated afterward if they’re essential, but sometimes you have lectures that basically consist of progressively adding to a single image over the course of an hour, and these are really a lost cause. I have no idea how to handle them.

Of course, it’s very hard to synthesize all of these ideas into a hard and fast rule for deciding whether or not to TeX a talk. The system I’ve developed is that unless I’m very confident that it won’t work out, I’ll err on the side of trying to TeX, but am also very forgiving of myself for giving up halfway through a talk. It’s not a perfect system, but it gives reasonable results, especially as I become more aware of the red flags that tell me to stop TeX’ing.

# Martingale Convergence

Last quarter, I did a DRP  on martingales, and at the start of this quarter, gave a short talk on what I learned. Here are the notes from that talk.

### 1. Conditional Expectation

Definition 1. Suppose ${(\Omega, \mathcal{F}_o, \mathbb{P})}$ is a probability space, ${\mathcal{F}\subset \mathcal{F}_o}$ is a sub ${\sigma}$-algebra, and ${X}$ is a random variable.

1. The conditional expectation of ${X}$ given ${\mathcal{F}}$, ${E(X\mid \mathcal{F})}$, is any ${\mathcal{F}}$-measurable random variable ${Y}$ such that

$\displaystyle \int_A X\, d\mathbb{P}=\int_A Y\, d\mathbb{P}\text{ for all } A\in \mathcal{F}.$

2. If ${Y}$ is another random variable, then ${E(X\mid Y)}$ is defined as ${E(X\mid \mathcal{F})}$ where ${\mathcal{F}}$ is the ${\sigma}$-algebra generated by ${Y}$.

Fact. The conditional expectation exists, is unique, and is integrable.

Intuitively, we can think of ${E(X\mid \mathcal{F})}$ as the best guess of the value of ${X}$ given the information available in ${\mathcal{F}}$.

Example 1.

1. If ${X}$ is ${\mathcal{F}}$-measurable, then ${E(X\mid \mathcal{F})=X}$.
2. If ${X}$ and ${Y}$ are independent, then ${E(X\mid Y)=E(X)}$.
3. Let ${X_1,\cdots}$ be random variables with mean ${\mu}$, and let ${S_n=X_1+\cdots+X_n}$ be the partial sums. Then, if ${m>n}$,

$\displaystyle E(S_m\mid S_n)=E(X_m+\cdots+X_{n+1}+S_n\mid S_n)=E(X_m\mid S_n)+\cdots+E(X_{n+1}\mid S_n)+E(S_n\mid S_n)=\mu(m-n)+S_n.$

The idea is that you know your position at ${S_n}$, and you take ${m-n}$ steps whose sizes are, on average, ${\mu}$, so your best guess for your position is ${S_n+\mu(m-n)}$.

### 2. Martingales

A martingale is a model of a fair game.

Definition 2. Consider a filtration (increasing sequence of ${\sigma}$-algebras) ${\mathcal{F}_n}$ and a sequence of random variables ${X_n}$, each measurable with respect to ${\mathcal{F}_n}$ and integrable. Then, if ${E(X_{n+1}\mid \mathcal{F}_n)=X_n}$ for all ${n}$, we say ${S_n}$ is a martingale.

Example 2. Let ${X_1,\cdots}$ be random variables that take only the values ${-1}$ and ${1}$ with probability ${1/2}$ each. Then ${S_n=X_1+\cdots+ X_n}$ is a martingale, because

$\displaystyle E(S_{n+1}\mid S_n)=E(X_{n+1}+S_n\mid S_n)=E(X_{n+1}\mid S_n)+E(S_n\mid S_n)=E(X_{n+1})+S_n=S_n.$

Theorem 3. If ${X_n}$ is a martingale with ${\sup E(X_n^+)<\infty}$, then ${X_n}$ converges a.s. to a limit ${X}$ with ${E(|X|)<\infty}$.

I’ll only sketch this proof, because even though the idea is nice, the details are a little annoying. The idea is to set up a way of betting on a martingale, show that you can’t make money off such a betting system, and then use this to draw conclusions about the martingales behavior.

Definition 4. Let ${\mathcal{F}_n}$ be a filtration. A sequence ${H_m}$ of random variables is said to be predictable if ${H_m}$ is ${\mathcal{F}_{m-1}}$ measurable for all ${m}$.

That is, the value of ${H_m}$ can always be predicted with certainty at time ${m}$. Then, if we “bet” an amount ${H_m}$ on the martingale ${X_m}$, our total winnings will be

$\displaystyle (H\cdot X)_n=\sum_{m=1}^n H_m(X_m-X_{m-1}).$

If ${X_n}$ is a supermartingale and ${H_n}$ is bounded, then ${(H\cdot X)_n}$ is a supermartingale as well.

Now, fix an interval ${(a,b)}$ and choose ${H_n}$ in the following way: if ${X_n, then bet 1, and continue to do so until ${X_n>b}$. Then bet zero until you fall back below ${a}$, and repeat. Every time you go from below ${a}$ to above ${b}$, you will make a profit of at least ${(b-a)}$. Let ${U_n}$ be the number of these upcrossings that occur. Then, you can use the previous fact, together with the bound on ${\sup E(X_n^+)}$, to show that the number of these upcrossings is finite with probability 1. Since this is true for arbitrary ${(a,b)}$, the ${X_n}$ must converge.

Finally, we give a brief application of the martingale convergence theorem.

Proposition 5. Let ${X_n}$ be a sequence of random variables such that ${P(X_n=1)=P(X_n=-1)=\frac{1}{2}.}$ Then ${{\sum_{j=1}^{\infty} \frac{X_j}{j}}}$ converges with probability 1.

Proof: Let ${{S_n=\sum_{j=1}^n\frac{X_j}{j}}.}$ It’s easy to check that ${S_n}$ is a martingale, and that ${E(S_n)}$ is bounded (in fact, it’s always 0), so the ${S_n}$ converge almost surely. Thus the random harmonic series converges almost surely. $\Box$