Archive for September, 2010

September 30, 2010

All things come alike to all: there is one event to the righteous, and to the wicked … as is the good, so is the sinner…. This is an evil among all things that are done … that there is one event unto all. [T]he living know that they shall die: but the dead know not any thing. [T]he memory of them is forgotten. [T]heir love, and their hatred, and their envy, is now perished.

Ecclesiastes 9

September 29, 2010

How come you can turn a T-shirt inside out?

The automorphism group of a 3-times punctured sphere has 12 path-components (12 elements up to isotopy). There are 6 elements that preserve orientation, and 6 that reverse. In particular the orientation-reversing automorphisms reverse the orientation of all the boundary circles.

File this one under things I want to understand.

μ d𝓽 + σ dW𝓽, my #$$

September 28, 2010

μ dt + σ dWt, my #$$

The simplest model of a stock price movement is that the log of the price moves in a direction, plus some noisy drift (like adding a Gaussian W𝓽 at every timestep).

Agustin Silvani gives a counterexample: Federal Open Market Committee meetings precede a volatile market episode, meaning long-term changes in μ and short-term spikes in σ come after an FOMC announcement.

“Stop hunting” by dealers and other smart-money players can sometimes shake up the price pattern ONLY during a super-short period. This occurs most in the least regulated market, FX, because dealers will pull the rug out from under their retail clients’ feet. The dealers can see their clients’ stops and will just blatantly cheat the retail clients (according to Silvani), because they only need to retain a big client’s business. (Hence it’s more profitable to cheat the small fry — there will always be more.)

Efficient markets, my #$$

Not only does this violate the Black-Scholes model (a freak σ^7 comes in and then disappears), it also violates the Strongly Efficient Market Hypothesis, which says that market price—at any instant—reflects all available information and are the best measure of the “true” value of an asset. You would obviously get a more accurate valuation from taking a one-hour average than from relying on any instantaneous price, in the above graph.

According to Silvani’s story, the dealers are very efficient at bilking worse-informed or less-experienced participants, but don’t use this as a Prediction Market!

!0 is 1

September 27, 2010

!0 === 1

Only tested this in Javascript and Ruby, but I bet it works in C like it did in Javascript.

mars@scheherazade:~$ js
Rhino 1.7 release 2 2010 01 20

js> 3+!0

Ruby is safeguarded against such hijinks:

mars@scheherazade:~$ irb
irb(main):001:0> 3+!0
TypeError: false can't be coerced into Fixnumfrom (irb):1:in `+'from (irb):1from :0

Review of Thomas L Friedman’s The World is Flat. by Edward E. Leamer (PDF)
I love, love, love this critique! Thomas Friedman gets so much press and fame, in exchange for zero insight. He’s a phrase-coiner with no ideas and I would short his stock if I could. Leamer, on the other hand, provides real insight—and in this case he does so while whomping all over the above-named shill. I remember when
Gerhard Glomm was on the committee to create an International Studies major at my university. He was the only economist of the group and the rest of them thought The Lexus and the Olive Tree was pure gold. He recognized it for pure dross, but couldn’t get it taken off the required reading list.

September 26, 2010

A Flat World, A Level Playing Field, a Small World After All, or None of the Above?

Is Calculus Bull*hit?

September 25, 2010

The hallmark of a calculus course is epsilon-delta proofs. As one moves closer and closer to a point of interest (reducing δ, the distance from the point-of-interest), the phenomenon’s measure is bounded by something times ε, a linear error term. The bound comes from the continuity of the function, also defined in epsilon–delta terms.

So everything moves gradually, in a sense. There are no sudden jumps. But human affairs are characterized by jumping, leaping, gapping, sparking, snapping, exploding processes.

One studied example is stock prices. If terrible news hits about a public company, you won’t be able to sell your shares for the previous price minus epsilon. You’ll have to unload a gap or a yawn lower. Not that it was ever possible to trade in arbitrarily small δ intervals anyway. The smallest increment on the NYSE is $.01 (it used to be  of a dollar), which by infinitesimal standards is huge.

The Continuum

Speaking of infinitesimal standards, I need to digress for a few paragraphs so my point will make sense to all readers. Real numbers ℝ — any number you can construct with infinity decimal places, so essentially any number that most people consider a number at all — are thick, dense, an uncountable thicket. They are complete.

“The Reals” ℝ are made up of rational ℚ and irrational ℚᶜ numbers.

Rational numbers ℚ are ratios of regular counting numbers, 1, 2, 3, ℕ, etc., and their negatives −ℕ. However the rational part ℚ of the reals ℝ — the part that’s easy to conceive and talk about and imagine — is a negligible part of the real number line.

The irrational part ℚᶜ is further divided into algebraic 𝓐 and transcendental 𝓐 parts. Again the algebraic part 𝓐 is easier to explain and is, literally, negligible in size compared to the transcendental part.

decomposition of the real numbers

Algebraic numbers 𝓐𝓐 are the x’s that solve various algebraic equations, like x²=2.

Whatever number x you square to get 2, is an algebraic number 𝓐. We invent a symbol  and put it in front of the 2 symbol to express the number we’re talking about. Although there is no such symbol to express the number x that solves x² + x = 2 — square this number, then add itself to the result, and you get two — that is also an algebraic number.

Now add in all other finite-length equations with integer or fraction coefficients. That’s a lot of equations. Their solutions constitute the algebraic numbers 𝓐. But like I said above, 99% of the real numbers — those simple things you learned about in 3rd grade when they taught you the decimal system — are NOT IN THERE.

(99% of infinity, what am I talking about?  It doesn’t make sense, I know, just work with me here.)

the algebraic numbers in the complex plane, coloured by degree


OK so now I have gotten to these hard-to-describe numbers called transcendental 𝓐ᶜ. The black part in the picture above. It took me a few paragraphs just to sloppily say what they are. If you have never thought about this issue before it might take you hours to wrap your head around them.

But it’s these transcendental numbers 𝓐ᶜ— can’t be assembled without an infinitely long equation — which essentially make calculus work. Calculus depends upon the real numbers ℝ and continuity therein, and without this thick, dense, impenetrable subset 𝓐ᶜ called transcendentals, its theorems would be unprovable and illegitimate.

I don’t know about you, but I haven’t seen any transcendental numbers around lately! Other than e and π, I mean. Despite transcendental numbers being the most numerous, only a few are known, most based around e and π. That’s right, these are the largest exclusive subset of the real numbers, and we don’t really know that many of them. We use them in proofs but not by name. Just knowing that they’re there ensures that calculus works.

But in the real world, you can’t buy e/3 eggs.  That, among other reasons, means you can’t optimize — even in principle — a purchasing decision at the grocery using calculus. (Maybe you don’t think you would be using calculus anyway, but the economic theorists treat you like a gas particle dispersing in the room — and while the particle doesn’t think it’s using calculus to decide where to move, it obeys those laws. So they are relevant somewhere, contrary to the title of this post.)


So calculus works in gas diffusion and solving various states of atoms / molecules via Schrödinger equations. But what about us people?

Here is a topographical picture of where people live. Notice that there is a lot of spikiness. Sudden jumps.

For a long time there’s no people because you’re in the middle of Nevada, and then — all of a sudden — Vegas! Holy cow there are people EVERYWHERE. Flowing in and out at a phenomenal rate. But there is zero flow and zero inhabitants just a few miles away. Molecules don’t behave like that.

Economic Activity

Here is another picture — got it out of the same book, which my girlfriend is reading — of economic output by region.

Again, much spikiness.  Not much calculus. Discontinuous outputs. Maybe that is how we are. Maybe calculus doesn’t work on us.


Differential Calculus

September 23, 2010

The chief triumph of differential calculus is this:

Any nonlinear function can be approximated by a linear function.

(OK…pretty much any nonlinear function.) That approximation is the differential, aka the tangent line, aka the best affine approximation.  It is valid in only a small area but that’s good enough. Because small areas can be put together to make big areas. And short lines can make nonlinear* curves.

In other words, zoom in on a function enough and it looks like a simple line. Even when the zoomed-out picture is shaky, wiggly, jumpy, scrawly, volatile, or intermittently-volatile-and-not-volatile:

Fed funds rate history since 1990 -- back to 1949 available at

Moreover, calculus says how far off those linear approximations are. So you know how tiny the straight, flat puzzle pieces should be to look like a curve when put together. That kind of advice is good enough to engineer with.


It’s surprising that you can break things down like that, because nonlinear functions can get really, really intricate. The world is, like, complicated.

So it’s reassuring to know that ideas that are built up from counting & grouping rocks on the ground, and drawing lines & circles in the sand, are in principle capable of describing ocean currents, architecture, finance, computers, mechanics, earthquakes, electronics, physics.

(OK, there are other reasons to be less optimistic.)



* What’s so terrible about nonlinear functions anyway? They’re not terrible, they’re terribly interesting. It’s just nearly impossible to generally, completely and totally solve nonlinear problems.

But lines are doable. You can project lines outward. You can solve systems of linear equations with the tap of a computer.  So if it’s possible to decompose nonlinear things into linear pieces, you’re money.


Two more findings from calculus.

  1. One can get closer to the nonlinear truth even faster by using polynomials. Put another way, the simple operations of + and ×, taught in elementary school, are good enough to do pretty much anything, so long as you do + and × enough times. 
  2. One can also get arbitrarily truthy using trig functions. You may not remember sin & cos but they are dead simple. More later on the sexy things you can do with them (Fourier decomposition).

thank you Jacques Tits

September 22, 2010

Tits Group

Convex Combinations

September 21, 2010

Jack Sprat could eat no fat; his wife could eat no lean.  And so, between the two of them, they licked the platter clean.

With my girlfriend and I the meals are not divided (100%,0) or (0,100%).  But the same concept applies:  I’ll have 25% of her beer and she’ll have 25% of mine.  The nursery rhyme stands in for the general idea of a general convex combination — any such combination as (53%, 47%), (1%, 99%), or (25%, 75%).

That’s what a convex combination is.

It’s written with a λ and looks so much more mystifying that way:

» A   +   (1−») B,        »

But just say that A and B are two things, like in the case above, two 4-D vectors each containing (amount of Guinness I have;   amount of Guinness she has;   amount of Old Rasputin I have;   amount of Old Rasputin she has).  The quantity

» A   +   (1−») B

mustn’t total up to more beers than we bought … which is common sense, really.

Wax Philosophical

So if the definition makes sense, let me just throw out a few mind-expanding ideas you can conceive with it:

  • Mixing colours is a convex combination. (R, G, B) is a linear 3space. So is (H, S, V) — and too, there is a reversible transformation from one to the other. (C,M,Y,K) is a 4-space so the transformation can’t be so simple.
  • Can you then say that one colour is “between” two others?
  • Can you imagine a colour that’s a convex combination of three colours? Would that make sense?
  • On from colours to ideas. Have you ever noticed that if people are taught two competing theories in a class, then they try to balance between them? I noticed this in political theory, anthropology, and philosophy classes.
  • I have a pet theory that it’s very natural for people to want to compromise among the ideas that they’re given — i.e., occupy some convex combination rather than a “corner”.
  • My pet theory goes further to say that revolutionary ideas don’t necessarily have to be “orthogonal” — don’t have to be completely radical and unintelligible according to current ideas — to permit novel thought.

    If the idea has even just a little bit of a unique notion (points just a wee bit into a new dimension), then that idea can be combined, linearly, with old ideas, and the entire dimension of new ideas is opened up.

    non-orthogonal vectors which span R³

  • Lastly, science. You can have a convex combination of quantum states. That’s where the concept of superposition comes from.

Integration by Parts

September 20, 2010

This is for my homies taking Calculus.

U-substitution is the opposite of the Chain Rule.  Integration by parts is the opposite of the Product Rule.

Don’t believe me?

Take u and v to be the left and right parts of some formula.

derivation of Integration-by-Parts formuladerivation of Integration-by-Parts formula

Now switch some symbols around and you’ve arrived at the formula for Integration by Parts.

By the way, I normally use L and R for the left and right groups of symbols when I’m teaching Product Rule.  Here I just used u and v because that’s probably how you’ve seen the formula be written.