Fe 9
Fe 9
Tom Leinster∗
Spring 2017
Preamble
Hello.
Admin: email addresses; sections in outline 6= lectures; pace.
Overall plan: interested in unique characterizations of . . .
entropy S means norms
SSS
SSS
SSS
SSS
S
measures of (bio)diversity
1 Warm-up
Week I (7 Feb)
Which functions f satisfy f (x + y) = f (x) + f (y)? Which functions of two
variables can be separated as a product of functions of one variable?
This section is an intro to basic techniques. We may or may not need the
actual results we prove.
∗ School of Mathematics, University of Edinburgh; [email protected]. Last edited on
5 April 2017
1
The Cauchy functional equation
The Cauchy FE on a function f : R → R is
There are some obvious solutions. Are they the only ones? Weak result first,
to illustrate technique.
Proposition 1.1 Let f : R → R be a differentiable function. TFAE (the fol-
lowing are equivalent):
i. f satisfies (1)
ii. there exists c ∈ R such that
∀x ∈ R, f (x) = cx.
∀x, y ∈ R, f 0 (x + y) = f 0 (x).
but also
f (n · m/n) = nf (m/n),
so f (m/n) = (m/n)f (1). Hence f (x) = f (1)x for all x ∈ Q.
2
• Now f and x 7→ f (1)x are continuous functions on R agreeing on Q, hence
are equal.
Proof For (i), define g : R → R by g(x) = log f (x). Then g is continuous and
satisfies Cauchy FE, so g(x) = cx for some constant c, and then f (x) = ecx .
(ii) and (iii): similarly, putting g(x) = f (ex ) and g(x) = log f (ex ).
Related:
Theorem 1.5 (Erdős?) Let f : Z+ → (0, ∞) be a function satisfying f (mn) =
f (m)f (n) for all m, n ∈ Z+ . (There are loads of solutions: can freely choose
f (p) for every prime p. But . . . ) Suppose that either f (1) ≤ f (2) ≤ · · · or
f (n + 1)
lim = 1.
n→∞ f (n)
Proof Omitted.
3
Separation of variables
When can a function of two variables be written as a product/sum of two
functions of one variable? We’ll do sums, but can convert to products as in
Corollary 1.4.
Let X and Y be sets and
f: X ×Y →R
a function. Or can replace R by any abelian group. We seek functions
g : X → R, h: Y → R
such that
∀x ∈ X, y ∈ Y, f (x, y) = g(x) + h(y). (2)
Basic questions:
A Are there any pairs of functions (g, h) satisfying (2)?
B How can we construct all such pairs?
C How many such pairs are there? Clear that if there are any, there are many,
by adding/subtracting constants.
I got up to here in the first class, and was going to lecture the rest of this
section in the second class, but in the end decided not to. What I actually
lectured resumes at the start of Section 2. But for completeness, here’s the rest
of this section.
4
But given f (and x0 and y0 ), is every pair (g, h) of this form a solution
of (2)? Not necessarily (but it’s easy to say when). . .
etc.
{(g + a, h − a) : a ∈ R}.
5
2 Shannon entropy
Week II (14 Feb)
Recap, including Erdős theorem. No separation of variables!
The many meanings of the word entropy. Ordinary entropy, relative entropy,
conditional entropy, joint entropy, cross entropy; entropy on finite and infinite
spaces; quantum versions; entropy in topological dynamics; . . . . Today we stick
to the very simplest kind: Shannon entropy of a probability distribution on a
finite set.
P Let p = (p1 , . . . , pn ) be a probability distribution on {1, . . . , n} (i.e. pi ≥ 0,
pi = 1). The (Shannon) entropy of p is
X X 1
H(p) = − pi log pi = pi log .
i : pi >0 i : pi >0
pi
The sum is over all i ∈ {1, . . . , n} such that pi 6= 0; equivalently, can sum over
all i ∈ {1, . . . , n} but with the convention that 0 log 0 = 0.
Ways of thinking about entropy:
• Disorder.
• Uniformity. Will see that uniform distribution has greatest entropy among
all distributions on {1, . . . , n}.
• Expected surprise. Think of log(1/pi ) as your surprise at learning that an
event of probability pi has occurred. The smaller pi is, the more surprised
you are. Then H(p) is the expected value of the surprise: how surprised
you expect to be!
• Information. Similar to expected surprise. Think of log(1/pi ) as the infor-
mation that you gain by observing an event of probability pi . The smaller
pi is, the rarer the event is, so the more remarkable it is. Then H(p) is
the average amount of information per event.
First properties:
• H(p) ≥ 0 for all p, with equality iff p = (0, . . . , 0, 1, 0, . . . , 0). Least
uniform distribution.
• H(p) ≤ log n for all p, with equality iff p = (1/n, . . . , 1/n). Most uniform
distribution. Proof that H(p) ≤ log n uses concavity of log:
X X
pi log p1i ≤ log pi p1i ≤ log n.
H(p) =
i : pi >0 i : pi >0
6
Remark 2.1 Base of logarithm usually taken to be e (for theory) or 2 (for
examples and in information theory/digital communication). Changing base of
logarithm scales H by constant factor—harmless!
Examples 2.2 Use log2 here.
i. Uniform distribution on 2k elements:
H( 21k , . . . , 21k ) = log2 (2k ) = k.
Interpretation: knowing results of k fair coin tosses gives k bits of infor-
mation.
ii.
H( 21 , 14 , 18 , 18 ) = 1
2 log2 2 + 1
4 log2 4 + 1
8 log2 8+ 1
8 log2 8
1 1 1
= 2 ·1+ 4 ·2+ 8 ·3 + 18 · 3
= 1 43 .
Interpretation: consider a language with alphabet A, B, C, D, with fre-
quencies 1/2, 1/4, 1/8, 1/8. We want to send messages encoded in binary.
Compare Morse code: use short code sequences for common letters. The
most efficient unambiguous code encodes a letter of frequency 2−k as a
binary string of length k: e.g. here, could use
A: 0, B: 10, C: 110, D: 111.
Then code messages are unambiguous: e.g. 11010011110 can only be
CBADB. Since k = log2 (1/2−k ), mean number of bits per letter is then
3
P
i pi log(1/pi ) = H(p) = 1 4 .
iii. That example was special in that all the probabilities were integer powers
of 2. But. . . Can still make sense of this when probabilities aren’t
powers of 2 (Shannon’s first theorem). E.g. frequency distribution p =
(p1 , . . . , p26 ) of letters in English has H(p) ≈ 4, so can encode English in
about 4 bits/letter. So, it’s as if English had only 16 letters, used equally
often.
Will now explain a more subtle property of entropy. Begin with example.
Example 2.3 Flip a coin. If it’s heads, roll a die. If it’s tails, draw from a pack
of cards. So final outcome is either a number between 1 and 6 or a card. There
are 6 + 52 = 58 possible final outcomes, with probabilities as shown (assuming
everything unbiased):
1/2 1/2
COIN
DIE CARDS
How much information do you expect to get from observing the outcome?
7
• You know result of coin flip, giving H(1/2, 1/2) = 1 bit of info.
• With probability 1/2, you know result of die roll: H(1/6, . . . , 1/6) = log2 6
bits of info.
• With probability 1/2, you know result of card draw: H(1/52, . . . , 1/52) =
log2 52 bits.
In total:
1 1
1+ 2 log2 6 + 2 log2 52
bits of info. This suggests
1 1 1 1 1 1
H 12 , . . . , 12 , 104 , . . . , 104 =1+ 2 log2 6 + 2 log2 52.
| {z } | {z }
6 52
w ∈ ∆n , p1 ∈ ∆k1 , . . . , pn ∈ ∆kn ,
w
......
p1 ...... pn
...... ......
8
This is joint probability distribution if the two things are independent. Then
chain rule implies multiplicativity:
ii. I(u1 ) = 0.
Theorem 1.5 (Erdős) would now tell us that I(un ) = c log n for some constant
c (putting f (n) = exp(I(un ))). But to conclude that, we need one of the two
alternative hypotheses of Theorem 1.5 to be satisfied. We prove the second one,
on limits. This takes some effort.
Lemma 2.6 I(1, 0) = 0.
Second,
9
To use Erdős, need I(un+1 ) − I(un ) → 0 as n → ∞. Can nearly prove that:
n
Lemma 2.7 I(un+1 ) − n+1 I(un ) → 0 as n → ∞.
Proof We have
n 1
un+1 = n+1 , n ◦ (un , u1 ),
so by the chain rule and I(u1 ) = 0,
n 1 n
I(un+1 ) = I n+1 , n + n+1 I(un ).
So
n n 1
I(un+1 ) − n+1 I(un ) =I n+1 , n+1 → I(1, 0) = 0
as n → ∞, by continuity and Lemma 2.6.
To improve this to I(un+1 )−I(un ) → 0, use a general result that has nothing
to do with entropy:
n
Lemma 2.8 Let (an )n≥1 be a sequence in R such that an+1 − n+1 an → 0 as
n → ∞. Then an+1 − an → 0 as n → ∞.
b1 , b2 , b2 , b3 , b3 , b3 , . . . , bn , . . . , bn , . . .
| {z }
n
mean(b1 , b2 , b2 , b3 , b3 , b3 , . . . , bn , . . . , bn ) → 0 as n → ∞.
| {z }
n
10
Proof We have I(umn ) = I(um ) + I(un ), and by last two lemmas,
I(un+1 ) − I(un ) → 0 as n → ∞.
So can apply Erdős’s theorem (1.5) with f (n) = exp(I(un )) to get f (n) = nc
for some constant c ∈ R. So I(un ) = c log n, and c ≥ 0 since I maps into R+ .
Proof Write
k1 kn
p= ,...,
k k
where k1 , . . . , kn ∈ Z and k = k1 + · · · + kn . Then
p ◦ (uk1 , . . . , ukn ) = uk .
Since I satisfies the chain rule and I(ur ) = cH(ur ) for all r,
n
X
I(p) + pi · cH(uki ) = cH(uk ).
i=1
11
• Shannon’s first theorem: for any p ∈ ∆n , in any unambiguous encoding,
mean bits/symbol ≥ H(p); moreover, if you’re clever, can do it in <
H(p) + ε for any ε > 0.
......
a b c z
1 1 1 1 1
2 4 4 1 2 2 ...... 1
Entropy 1.5 Entropy 0
a à â b c ç z
Ent 0 Ent 1
We need
3.8
|{z} + 0.05 × 1.5 + 0.02 × 0 + 0.03 × 1 + · · · + 0.004 × 0
| {z }
bits for actual letters
bits for accents
Relative entropy
Let p, r ∈ ∆n . The entropy of p relative to r is
p
i
X
H(p k r) = pi log .
i : p >0
ri
i
12
• H(p k r) can be arbitrarily large (even for fixed n). E.g.
So relative entropy is the number of extra bits needed if you use the wrong
machine. Or: penalty you pay for using the wrong machine. Explains why
H(p k r) ≥ 0 with equality if p = r.
If ri = 0 then in machine r, the ith symbol has an infinitely long code word.
Or if you like: if ri = 2−1000 then its code word has length 1000. So if also
pi > 0 then for language p encoded using machine r, average bits/symbol = ∞.
This explains why H(p k r) = ∞.
Taking r = un ,
13
Measure-theoretic perspective Slogan:
All entropy is relative.
where dµdν is Radon–Nikodym derivative. This makes sense and is the right
definition.
People do talk about the entropy of probability distributions on Rn . For
instance, the entropy
R of a probability density function f on R is usually defined
as H(f ) = − R f (x) log f (x) dx, and it’s an important result that among all
density functions on R with a given mean and variance, the one with the max-
imal entropy is the normal distribution. (This is related to the central limit
theorem.) But here we’re implicitly using Lebesgue measure λ on R; so there
are two measures in play, λ and f λ, and H(f ) = H(f λ k λ).
(Here k·k is any norm on Rn . It doesn’t matter which, as they’re all equivalent.)
So:
Locally, H(− k −) is like a squared distance.
In particular, locally (to second order) it’s symmetric.
The square root of relative entropy is not a metric on ∆n : not symmetric and
fails triangle
p inequality.
p (E.g. putpp = (0.9, 0.1), q = (0.2, 0.8), r = (0.1, 0.9).
Then H(p k q) + H(q k r) < H(p k r).) But using it as a ‘local distance’
leads to important things, e.g. Fisher information (statistics), the Jeffreys prior
(Bayesian statistics), and the whole subject of information geometry.
14
Week IV (28 Feb)
Recap: entropy as mean bits/symbol in optimal encoding; definition of rel-
ative entropy; relative entropy as extra cost of using wrong machine.
Write
An = {(p, r) ∈ ∆n × ∆n : ri = 0 =⇒ pi = 0}.
So H(p k r) < ∞ ⇐⇒ (p, r) ∈ An . (Secretly, A stands for ‘absolutely
continuous’.) Then for each n ≥ 1, we have the function
H(− k −) : An → R+ .
Properties:
Measurability H(− k −) is measurable. If you don’t know what that means,
ignore: very mild condition. Every function that anyone has ever written
down a formula for, or ever will, is measurable.
Permutation-invariance E.g. H((p1 , p2 , p3 ) k (r1 , r2 , r3 )) = H((p2 , p3 , p1 ) k
(r2 , r3 , r1 )). It’s that kind of symmetry, not the kind where you swap p
and r.
Vanishing H(p k p) = 0 for all p. Remember: H(p k r) is extra cost of using
machine r (instead of machine p) to encode language p.
Chain rule For all
e ∈ An , (p1 , p
(w, w) e 1 ) ∈ Ak1 , . . . , (pn , p
e n ) ∈ Ak n ,
we have
n
X
H(w ◦ (p1 , . . . , pn ) k w p1 , . . . , p
e ◦ (e e n )) = H(w k w)
e + wi H(pi k p
e i ).
i=1
and then
15
So
w ◦ (p1 , . . . , p26 ) = frequency distribution of all symbols in Swiss
p1 , . . . , p
e ◦ (e
w e 26 ) = frequency distribution of all symbols in Canadian
where ‘symbol’ means a letter with (or without) an accent.
Now encode Swiss using Canadian machine. How much extra does it cost
(in mean bits/symbol) compared to encoding Swiss using Swiss machine?
16
Lemma 2.14 L(αβ) = L(α) + L(β) for all α, β ∈ (0, 1].
Proof Consider
Result follows.
Lemma 2.15 There is a unique constant c ∈ R+ such that L(α) = −c log α for
all α ∈ (0, 1].
Proof Follows from Lemma 2.14 and measurability, as in Cor 1.4. That corol-
lary was stated under the hypothesis of continuity, but measurability would have
been enough.
Proof We have (p, r) ∈ An , so ri > 0 for all i. So can choose α ∈ (0, 1] such
that ri − αpi ≥ 0 for all i.
We will compute the (well-defined) number
x := I (p1 , . . . , pn , 0, . . . , 0) (αp1 , . . . , αpn , r1 − αp1 , . . . , rn − αpn )
| {z }
n
n
X
pi L α prii
= I(p k r) +
i=1
= I(p k r) − c log α − cH(p k r).
17
Proof of Theorem 2.12 Let (p, r) ∈ An . By symmetry, can assume
p1 > 0, . . . , pk > 0, pk+1 = 0, . . . , pn = 0
where 1 ≤ k ≤ n. Writing R = r1 + · · · + rk ,
1
I(p k r) = L(R) + I((p1 , . . . , pk ) k R (r1 , . . . , rk )) by Lemma 2.13
= −c log R + cH((p1 , . . . , pk ) k R1 (r1 , . . . , rk )) by Lemmas 2.15 and 2.16.
This holds for all I(− k −) satisfying the four conditions; in particular, it holds
for cH(− k −). Hence I(p k r) = cH(p k r).
Remark 2.17 Assuming permutation-invariance, the chain rule is equivalent
to a very special case:
Week V (7 Mar)
Recap: formulas for entropy and cross entropy (in both log(1/something)
and − log(something) forms); chain rules for both.
Remark 2.18 I need to make explicit something we’ve been using implicitly
for a while.
Let p ∈ ∆n and r ∈ ∆m . Then we get a new distribution
p ⊗ r = (p1 r1 , . . . , p1 rm ,
..
.
pn r1 , . . . , pn rm )
= p ◦ (r, . . . , r)
| {z }
n
∈ ∆nm .
Probabilistically, this is the joint distribution of independent random variables
distributed according to p and r.
A special case of the chain rule for entropy:
H(p ⊗ r) = H(p) + H(r)
and similarly for relative entropy:
H(p ⊗ r k p
e ⊗e
r) = H(p k p
e ) + H(r k e
r).
(So H and H(− k −) are log-like; like a higher version of Cauchy’s functional
equation.)
18
3 Deformed entropies
Shannon entropy is just a single member of a one-parameter family of entropies.
In fact, there are two different one-parameter families of entropies, both con-
taining Shannon entropy as a member. In some sense, these two families of
entropies are equivalent, but they have different flavours.
I’ll talk about both families: surprise entropies in this section, then Rényi
entropies when we come to measures of diversity later on.
Definition 3.1 Let q ∈ [0, ∞). The q-logarithm lnq : (0, ∞) → R is defined
by ( 1−q
x −1
1−q if q 6= 1,
lnq (x) =
ln(x) if q = 1.
lnq (xy) 6= lnq (x) + lnq (y), lnq (1/x) 6= − lnq (x).
First one inevitable: we already showed that scalar multiples of actual logarithm
are the only continuous functions that convert multiplication into addition. In
fact, there’s quite a neat formula for lnq (xy) in terms of lnq (x), lnq (y) and q:
exercise!
For a probability p ∈ [0, 1], can view
lnq (1/p)
q=0
q=1
lnq (1/p)
q=2
q=3
19
theory in 1967, and after Vajda (1968), Daróczy (1970) and Sharma and Mittal
(1975) developed them further, and after Patil and Taillie used them as measures
of biodiversity in 1982.
Tsallis says the parameter q can be interpreted as the ‘degree of non-
extensivity’. When we come to diversity measures, I’ll give another interpreta-
tion.
Special cases:
• S0 (p) = |{i : pi > 0}| − 1
• S2 (p) = 1 − i p2i = probability that two random elements of {1, . . . , n}
P
(chosen according to p) are different.
Properties of Sq (for fixed q):
• Permutation-invariance, e.g. Sq (p2 , p3 , p1 ) = Sq (p1 , p2 , p3 ).
• q-chain rule:
X
Sq (w ◦ (p1 , . . . , pn )) = Sq (w) + wiq Sq (pi ).
i : wi >0
hence X X q
riq I(p) = 1 −
1− pi I(r).
Now want to get the ps onPone side and the rs on the other, to deduce that
I(p) is proportional to 1 − pqi . But need to be careful about division by zero.
Take r = u2 = (1/2, 1/2): then
X q
(1 − 21−q )I(p) = 1 − pi I(u2 )
1−q
for all p. But q 6= 1, so 1 − 21−q 6= 0. So I = cSq where c = I(u2 ) 21−q −1 .
20
Relative entropy generalizes easily too, i.e. extends all along the family from
the point q = 1. Only ticklish point is lnq (1/x) vs. − lnq (x).
Definition 3.4 Let q ∈ [0, ∞). For p, r ∈ ∆n , the relative surprise entropy
of order q is
( P q 1−q
1
1−q 1 − pi ri if q 6= 1,
r
i
X
Sq (p k r) = − pi lnq = P
pi p
i : pi >0 pi log rii if q = 1.
Properties:
• Permutation-invariance (as in case q = 1).
• q-chain rule:
X
Sq (w◦(p1 , . . . , pn )kw◦(e
e p1 , . . . , p
e n )) = Sq (wkw)+
e wiq w
ei1−q Sq (pi ke
pi ).
i : wi >0
hence X X q 1−q
1− riq rei1−q I(p k p
e) = 1 − pi pei I(r k e
r).
Take r = (1, 0) and e
r = u2 : then
X
(1 − 2q−1 )I(p k p pqi pe1−q
e ) = I((1, 0) k u2 ) 1 − i
21
4 Probabilistic methods
Week VI (14 Mar)
How to use probability theory to solve functional equations.
References: Aubrun and Nechita, arXiv:1102.2618, S.R.S. Varadhan, Large
deviations.
Preview I want to make this broadly accessible, so I need to spend some time
explaining the background before I can show how to actually solve functional
equations using probability theory. We won’t reach the punchline until next
time. But to give the rough idea. . .
Functional equations have no stochastic element to them. So how could
probability theory possibly help to solve them?
Basic idea: use probability theory to replace complicated, exact formulas by
simple, approximate formulas.
Sometimes, an approximation is all you need.
E.g. (very simple example) multiply out the expression
22
• Central limit theorem: X r is roughly normal for each individual large r.
• Large deviation theory is orthogonal to CLT and tells us rate of conver-
gence of P(X r ≥ x) as r → ∞.
Rough result: there is a constant k(x) such that for large r,
P(X r ≥ x) ≈ k(x)r .
If x < E(X) then k(x) = 1. Focus on x > E(X); then k(x) < 1 and P(X r ≥ x)
decays exponentially with r.
Theorem 4.1 (Cramér) The limit
lim P(X r ≥ x)1/r
r→∞
• For λ ∈ R,
E(eλx ) = 1
ec1 λ + · · · + ecn λ
n
• So by Cramér, for x ∈ R,
1/r ec1 λ + · · · + ecn λ
lim {(i1 , . . . , ir ) : ci1 + · · · + cir ≥ rx} = inf .
r→∞ λ≥0 exλ
So, we’ve used probability theory to say something nontrivial about a
completely deterministic situation.
To get further, need a second tool: convex duality.
23
Convex duality
Let f : R → [−∞, ∞] be a function. Its convex conjugate or Legendre-
Fenchel transform is the function f ∗ : R → [−∞, ∞] defined by
f (x)
gradient λ
x
∗
(0, −f (λ))
24
or equivalently
(log mX )∗ (x) = lim − 1r log P(X r ≥ x).
r→∞
Now some hand-waving. Ignoring fact that this only holds for x ∈ E(X), take
conjugate of each side. Then for all λ ≥ 0 (a restriction we need to make the
hand-waving work),
It’s a general fact that log mX (called the cumulant generating function) is
convex. Hence (log mX )∗∗ = log mX by Fenchel–Moreau. So (taking exponen-
tials)
mX (λ) = sup lim eλx P(X r ≥ x)1/r .
x∈R r→∞
This really is true. It’s a general formula for the moment generating function.
To make the hand-waving respectable: the full formula is
(
∗ limr→∞ − 1r log P(X r ≥ x) if x ≥ E(X),
(log mX ) (x) =
limr→∞ − 1r log P(X r ≤ x) if x ≤ E(X).
Can prove this by applying Cramér to −X and −x. Then can use it to get the
formula above for (log mX )∗∗ (λ) when λ ≥ 0.
We’ll use a variant:
Theorem 4.6 (Dual Cramér) For any IID X, X1 , X2 , . . ., for all λ ≥ 0,
mX (λ) = sup sup eλx P(X r ≥ x)1/r .
x∈R r≥1
This is the result we’ll use (not Cramér’s theorem itself). Now let’s apply
it.
Example 4.7 As before, let c1 , . . . , cn ∈ R and consider uniform distribution
on c1 , . . . , cn . Dual Cramér gives
1/r
ec1 λ + · · · + ecn λ = eλx
sup (i1 , . . . , ir ) : ci1 + · · · + cir ≥ rx
x∈R,r≥1
for all λ ≥ 0.
Remember the background to all this: Aubrun and Nechita used large de-
viation theory to prove a unique characterization of the p-norms. Since the
left-hand side here is a sum of powers (think λ = p), we can now begin to see
the connection.
Next time: we’ll exploit this expression for sums of powers. We’ll use it
to prove a theorem that pins down what’s so special about the p-norms, and
another theorem saying what’s so special about power means.
25
Week VII (21 Mar)
Last time: Cramér’s theorem and its convex dual. Crucial result: Exam-
ple 4.7.
Today: we’ll use this to give a unique characterization of the p-norms.
I like theorems arising from ‘mathematical anthropology’. You observe some
group of mathematicians and notice that they seem to place great importance
on some particular object: for instance, algebraic topologists are always talking
about simplicial sets, representation theorists place great emphasis on charac-
ters, certain kinds of analyst make common use of the Fourier transform, and
other analysts often talk about the p-norms.
Then you can ask: why do they attach such importance to that object, not
something slightly different? Is it the only object that enjoys the properties it
enjoys? If not, why do they use the object they use and not some other object
enjoying those properties? (Are they missing a trick?) And if it is the only
object with those properties, we should be able to prove it!
We’ll do this now for the p-norms, which are very standard in analysis.
Following theorem and proof are from Aubrun and Nechita, arXiv:1102.2618.
I believe they were the pioneers of this probabilistic method for solving func-
tional equations. See also Tricki, ‘The tensor power trick’.
Notation: for a set I (which will always be finite for us), write
E.g. R{1,...,n} = Rn . In some sense we might as well only use Rn , because every
RI is isomorphic to Rn . But the notation will be smoother if we allow arbitrary
finite sets.
Definition 4.8 Let I be a set. A norm on RI is a function RI → R+ , written
x 7→ kxk, satisfying:
i. kxk = 0 ⇐⇒ x = 0;
ii. kcxk = |c| kxk for all c ∈ R, x ∈ RI ;
iii. kx + yk ≤ kxk + kyk.
There are many norms, but the following family comes up more often than
any other.
Example 4.9 Let I be any finite set and p ∈ [1, ∞]. The p-norm k · kp on RI
is defined for x = (xi )i∈I ∈ RI by
( P
p 1/p
kxkp = i∈I |xi | if p < ∞,
maxi∈I |xi | if p = ∞.
Aubrun and Nechita prove and use following result, which they don’t quite
make explicit:
Proposition 4.10 For p ∈ [1, ∞) and x ∈ (0, ∞)n ,
1/rp
kxkp = sup u · {(i1 , . . . , ir ) : xi1 · · · xir ≥ ur } .
u>0,r≥1
26
Proof In Example 4.7, put ci = log xi and λ = p. Also substitute u = ex ,
noting that the letter x now means something else. Then
1/r
xp1 + · · · + xpn = sup up · {(i1 , . . . , ir ) : xi1 · · · xir ≥ ur } .
u>0,r≥1
(x ∈ RI , j ∈ J). Then
kf∗ xkp = kxkp (7)
I
for all injections f : I → J and x ∈ R . For permutations f of {1, . . . , n},
(7) gives equations such as (5); for inclusion {1, . . . , n} ,→ {1, . . . , n, n+1},
(7) gives equations such as (6).
• For A, B, x, y, z ∈ R, we have
k(Ax, Ay, Az, Bx, By, Bz)kp = k(A, B)kp k(x, y, z)kp
(etc). Generally, for x = (xi )i∈I ∈ RI and y ∈ RJ , define
x ⊗ y = (xi yj )i∈I,j∈J ∈ RI×J .
(If you identify RI ⊗ RJ with RI×J , as you can for finite sets, then x ⊗ y
means what you think.) Then
kx ⊗ ykp = kxkp kykp (8)
I J
for all finite sets I and J, x ∈ R , and y ∈ R .
That’s all!
Definition 4.11 A system of norms consists of a norm k · k on RI for each
finite set I, satisfying (7). This just guarantees that the norms on RI , for
different sets I, hang together nicely. It is multiplicative if (8) holds. That’s
the crucial property of the p-norms.
Example 4.12 For each p ∈ [1, ∞], the p-norm k · kp is a multiplicative system
of norms.
Theorem 4.13 (Aubrun and Nechita) Every multiplicative system of
norms is equal to k · kp for some p ∈ [1, ∞].
Rest of today: prove this.
Let k · k be a multiplicative system of norms.
27
Step 1: elementary results
Lemma 4.14 Let I be a finite set and x, y ∈ RI .
i. If yi = ±xi for each i ∈ I then kxk = kyk.
ii. If yi = |xi | for each i ∈ I then kxk = kyk.
iii. If 0 ≤ xi ≤ yi for each i ∈ I then kxk ≤ kyk.
Proof Omitted in class, but here it is.
i. x ⊗ (1, −1) is a permutation of y ⊗ (1, −1), so
kx ⊗ (1, −1)k = ky ⊗ (1, −1)k,
or equivalently
kxk k(1, −1)k = kyk k(1, −1)k,
and so kxk = kyk.
ii. Immediate from last part.
iii. For each a ∈ {1, −1}I , have vector (ai yi )i∈I ∈ RI . Let S be the set of
I has n elements then S has 2n elements. Then the
such vectors. So if Q
convex hull of S is i∈I [−yi , yi ], which contains x:
(−y1 , y2 ) y = (y1 , y2 )
x = (x1 , x2 )
But every vector in S has norm kyk (by first part), so kxk ≤ kyk by
triangle inequality.
28
Step 3: the case p = ∞ If p = ∞, easy to show k · k = k · k∞ . (Omitted in
class, but here it is.) Let p = ∞, that is, c = 0. By Lemma 4.14, enough to
prove kxk = kxk∞ for all x ∈ Rn such that xi ≥ 0 for all i. Choose j such that
xj = kxk∞ . Using Lemma 4.14(iii),
N (w, t) = {j ∈ J : wj ≥ t} .
For r ≥ 1, write r
x⊗r = x ⊗ · · · ⊗ x ∈ Rn .
Then Proposition 4.10 states that
or equivalently
1/r
ur , . . . , ur
kxkp = sup . (9)
u>0,r≥1 | {z }
N (x⊗r ,ur )
Step 5: the lower bound First show kxk ≥ kxkp . By (9), enough to show
that for each u > 0 and r ≥ 1,
1/r
ur , . . . , u r
kxk ≥ .
| {z }
N (x⊗r ,ur )
kx⊗r k ≥ ur , . . . , ur .
| {z }
N (x⊗r ,ur )
kx⊗r k ≥ ur , . . . , ur , 0, . . . , 0 = ur , . . . , ur .
| {z } | {z }
N (x⊗r ,ur ) N (x⊗r ,ur )
| {z }
nr
29
Step 6: the upper bound Now prove kxk ≤ θkxkp for each θ > 1. Since
mini xi > 0, can choose u0 , . . . , ud such that
kx⊗r k ≤ kyr k
= k(ur1 , . . . , ur1 , . . . , urd , . . . , urd )k
d
X
kx⊗r k ≤ urk , . . . , urk
| {z }
k=1
≤N (x⊗r ,urk−1 ) terms
ur , . . . , ur
≤ d max
1≤k≤d | k {z k}
≤N (x⊗r ,urk−1 )
by (9). Hence kxk = kx⊗r k1/r ≤ d1/r θkxkp . Letting r → ∞, get kxk ≤ θkxkp .
True for all θ > 1, so kxk ≤ kxkp , completing the proof of Theorem 4.13.
Next week: how to measure biological diversity, and how diversity measures
are related to norms, means and entropy.
30
E.g. consider two communities, A and B. Which is more diverse?
Definition 5.1 Let q ∈ [0, ∞]. The Hill number (or diversity) of order q
of p is defined for q 6= 1, ∞ by
X 1
1−q
Dq (p) = pqi
i : pi >0
Special cases:
• D0 (p) is species richness, i.e. number of species present. Most common
meaning of ‘diversity’ in both general media and ecological literature.
• D1 (p) = exp(H1 (p)). Doesn’t depend on choice of base for logarithm.
31
for communities A and B above:
Dq (p) A
Always decreasing and continuous, for reasons we’ll come back to.
Properties of Hill numbers: let q ∈ [0, ∞].
• Dq is an effective number: writing un = (1/n, . . . , 1/n),
Dq (un ) = n.
32
Proposition 5.3 Let p ∈ ∆n and x ∈ (R+ )n . Then Mt (p, x) is (non-strictly)
increasing and continuous in t ∈ [−∞, ∞].
Proof See e.g. Hardy, Littlewood and Pólya’s book Inequalities, Theorem 16.
Rényi entropies
Definition 5.5 Let p ∈ ∆n and q ∈ [0, ∞]. The Rényi entropy of p of
order q is
Hq (p) = log Dq (p).
Hq (p ⊗ r) = Hq (p) + Hq (r)
33
Back to diversity Important feature of Dq is modularity, as follows. Take
n islands of varying sizes, sharing no species. Then the diversity of their union
depends only on the diversities and relative sizes of the islands—not on their
internal structure.
That is: write w = (w1 , . . . , wn ) ∈ ∆n for the relative sizes of the islands.
Write pi = (p11 , . . . , p1k1 ) for the relative abundances of the species on island i.
Then the species distribution for the whole community is
w ◦ (p1 , . . . , pn )
(e−βE1 , . . . , e−βEn )
Z(β)
It’s a theorem that the Hill numbers are the only diversity measures satisfy-
ing the chain rule (10), at least for q 6= 0, 1, ∞. Maybe not very useful, as why
would anyone ask for this chain rule? Anyway, here’s the result:
Theorem 5.7 Let q ∈ (0, 1) ∪ (1, ∞). Let (D : ∆n → [1, ∞))n≥1 be a sequence
of functions. TFAE:
i. D is continuous, symmetric, and satisfies the q-chain rule (10);
ii. D = Dq or D ≡ 1.
Proof Omitted. As far as I know, this result doesn’t exist in the literature. I’d
be happy to explain the proof to anyone interested.
34
Next week: we incorporate similarity between species into our model. This
not only improves biological accuracy; it also leads to interesting new mathe-
matics.
Week IX (4 Apr)
Recap: crude model of community as probability distribution; definition
of Mt (p, x), of Dq (p) as M1−q (p, 1/p) (diversity as average rarity, with 1/p
defined coordinatewise) and explicit form, and Hq (p) = log Dq (p).
Similarity-sensitive diversity
Ref: Leinster and Cobbold, Ecology, 2012.
Model: community of n species, with:
• relative abundances p = (p1 , . . . , pn ) ∈ ∆n ;
• for each i, j, a similarity coefficient Zij ∈ [0, 1], giving matrix Z = (Zij ).
Assume Zii = 1 for all i.
Examples 5.8 i. Z = I: then different species have nothing in common
(naive model).
ii. Zij = percentage genetic similarity between species i and j.
iii. Or measure similarity phylogenetically, taxonomically, morphologically,
...
iv. Given metric d on {1, . . . , n}, put Zij = e−d(i,j) .
v. (Non-biological?) Given reflexive graph with vertices 1, . . . , n, put
(
1 if there is an edge between i and j
Zij =
0 otherwise.
Reflexive means that there is an edge from each vertex to itself.
Viewing p as a column vector, we have
X
(Zp)i = Zij pj
j
35
Examples 5.10 i. Naive model Z = I: have DqI (p) = Dq (p). So the
classical quantities Dq (p)—the exponentials of Shannon entropy etc.—
have a big problem: they implicitly assume that different species have
nothing in common. This is of course nonsense.
ii. D2Z (p) = 1/ i,j pi Zij pj . This is the reciprocal of expected similarity
P
between a randomly-chosen pair of individuals. You can measure this even
in situations (e.g. microbial) where you don’t have a species classification
at all. Something similar can be done for all integers q ≥ 2.
iii. Generally: incorporating similarity can change judgement on when one
community is more diverse than another. See our paper for examples.
Broad idea: it may be that one community initially looks more diverse,
but all the diversity is within a group of species that are highly similar,
in which case it’s really not so diverse after all.
Properties of DqZ , for each fixed q (and here I’ll skip some obvious ones):
• Splitting a species into two identical species doesn’t change the diversity.
Mathematically: add a new column to the matrix identical to the last one,
and a new row identical to the last one. Also split pn as a sum of two
probabilities however you like.
Consequence: by continuity, splitting a species into two highly similar
species causes only a slight increase in diversity. This is sensible, logical
behaviour. Species classifications can be somewhat arbitrary and change-
able.
• Modularity: take m islands, such that species on different islands are
distinct and totally dissimilar. Then the diversity of the whole depends
only onPthe diversities di and relative sizes wi of the islands. (‘Relative’
means wi = 1.) The important thing here is the functional relationship
just stated. But I’ll also give the actual formula. Explicitly, the diversity
of the whole is X 1/(1−q)
wiq d1−q
i
i : wi >0
36
Digression: entropy viewpoint Define
Maximizing diversity Suppose we fix a list of species and can control their
relative abundances. What relative abundance distribution would we choose
in order to maximize the diversity, and what is the value of that maximum
diversity?
Or more mathematically: fix a finite metric space. Which probability dis-
tribution(s) maximize the diversity (or equivalently entropy), and what is the
value of the maximum diversity?
Fix q and a similarity matrix Z. Questions:
A Which distribution(s) p maximize DqZ (p)?
1
3
2
Recall that even in the case Z = I, different values of q give different judge-
ments on which communities are more diverse than which others. They rank
distributions p differently. So: In principle, the answers to both A and B
depend on q. But:
Theorem 5.14 (with Mark Meckes) Let Z be a symmetric similarity ma-
trix. Then:
A There is a distribution p that maximizes DqZ (p) for all q ∈ [0, ∞] simul-
taneously.
B supp DqZ (p) is independent of q ∈ [0, ∞].
37
So, there is a best of all possible worlds.
Remarks 5.15 i. For Z = I, trivial: example above.
vi. Any distribution p that maximizes DqZ (p) for one q > 0 actually max-
imizes DqZ (p) for all q ∈ [0, ∞]. (Not obvious, but in the paper with
Meckes.)
Next time: I’ll describe a more general family of measures and prove that in
a certain sense, it is the only sensible way of assigning a value to a collection of
things. I don’t presuppose that this ‘value’ is any kind of diversity, nor that there
is anything ecological about the setting. But it turns out that it’s closely related
to the diversity measures that we just met, and that it’s especially interesting
to interpret these ‘value’ measures in an ecological setting.
38