Lecture 08

For today you should:

1) Read about the FFT in Chapter 9 of Think Complexity.

2) Work on exercises.

3) Come with case study ideas.

Today:

1) Diagnostic

2) Case study ideas

3) DFT

For next time:

1) Exercises

2) Progress report

Exercise: Compute the autocorrelation function for white, red, and pink noise.

Exercise: Download the history of the value of Bitcoin and compute its spectrum and autocorrelation function. Is this series well-modeled by one of the kinds of noise we studied? (Note the language of that question).

Exercise: Read about the Hurst exponent and estimate it for white, red, and pink noise.

Discrete Fourier Transform

Motivating DFT: what's wrong with DCT?

1) DCT takes an n-vector of real and returns n-vector of real, so it's a little easier to think about than DFT.

rfft: n-vector of real to n/2 vector of complex

fft: n-vector of complex to n-vector of complex

2) Story #1 that didn't really pan out: "DCT captures the even part of the function; DST captures the odd part; DFT captures both." Wrong.

I expected DCT to work well if the signal is actually even and badly if it's actually odd.

Doesn't work out that way. All of these transforms are based on samples. In some sense, they all interpolate/extrapolate from samples to continuous functions on infinite range.

DCT assumes that the function is even.

DST assumes it is odd.

DFT assumes it is periodic.

Actual signals violate these assumptions, resulting in things like aliasing and leakage.

But I can't find an example where DFT is better, in practical terms, than DCT or DST.

3) Story #2 that didn't really pan out: "DCT captures amplitude but not phase, so if you add up signals that are out of phase, DCT gets the wrong answer." Also wrong.

The example in lecture08.ipynb contradicts my expectation.

In fact, DCT is linear, just like DFT, so you can add up signals in time domain or frequency domain -- same thing!

Apparently, the DCT encodes phase information, but not explicitly.

4) So what's left? Why should we bother with DFT?

One advantage: the basis functions for DFT are complex exponentials, which are eigenfunctions under differentiation and integration! Woot.

One more: DFT is related to convolution (which we will see soon) in a way that (1) provides efficient algorithms for convolution, and (2) provides insight and analytic tools for LTI systems.

Self-organized criticality

1) Critical systems exhibit long-tailed distributions, fractal geometry, and pink noise.

2) These phenomena are ubiquitous in nature.

3) But critical systems are unstable, so we don't expect them to be common in nature.

4) But what if there are systems where the critical state is not only stable but an attractor? Bak, Tang, and Wiesenfeld proposed a model with this property. Whether it is only a mathematical model or a model of a physical system is a topic of discussion.

5) Bak (in particular) has suggested that SOC systems might be common in nature and explain the prevalence of (1).

6) If so, he is proposing what I call a holistic model (as contrasted with a reductionist model).

A reductionist model is an argument by analogy. The things in the model correspond to the things in the system. The behavior of the model explains the behavior of the system to the degree that that model is a good analogy, which rests on realism.

A holistic model is a syllogism: All systems that meet these criteria have this behavior. System A meets these criteria; therefore system A has this behavior.

Whether you accept that as an answer to a "why" question depends on what you think "why" means.

All of this has bearing on notions of causation and prediction, which I discuss in Section 9.6.