Archive for the ‘Uncategorized’ Category

Scientific journalism

Friday, August 6th, 2010

This article caught my eye today:

http://www.newsweek.com/2010/08/05/the-limits-of-reason.html

It’s interesting for a number of reasons.  First, the content itself is kind of cool – why are humans irrational?  It’s a good question.  Second, they mention specific examples – including some actual logic analysis – of things people get wrong, and maybe why they get it wrong.  Finally, and perhaps most importantly, it’s interesting for what it doesn’t do.  It doesn’t do a good job of analyzing how the conclusion was reached.

1. Why are humans irrational?

This is a great question, because it is a major contradiction in our day-to-day lives that has a huge impact on how we live and our success as individuals and societies.  And looking at it from the evolutionary perspective is insightful, because it strikes at the core of the contradiction — if our reasoning is flawed, wouldn’t it follow that our faulty conclusions would diminish our survival?

For these reasons, I feel the work being discussed is very relevant and worthwhile.  It is a great question, and a good context within which to ask that question.

The article claims (or rather, cites other work which claims) that we tend to make reasoning mistakes which can help us win arguments.

I’m not sure I really agree with this conclusion.  The main problem is: Wouldn’t it just be better for humans if we were swayed by more logically-correct arguments?

In other words, the article’s conclusion seems to simply defer the contradiction of bad human reasoning to a new problem of bad human argument-listening.  This is still a huge, looming problem that hasn’t even been attempted here.

Here’s another approach we could take to tackling this problem: categorize the types of mistakes humans most often make (I think this has already been worked on), and then look for situations in which the mechanism behind the “faulty” reasoning is actually helpful.  This method – finding good properties of evolved traits – makes much more sense to me.

If you want to understand why something evolved, you must understand how it helps survival.

2. Logic analysis

As a mathematician, I can’t avoid commenting on the logic analysis of the article.  Specifically, the article says:

Consider the syllogism “No C are B; all B are A; therefore some A are not C.” Is it true? Fewer than 10 percent of us figure out that it is, says [Hugo] Mercier.

Actually, this line of reasoning is not generally correct.  To be more precise, if any B exist, it is correct, but if no B exist, then the conclusion may or may not be correct.  If you know what a Venn diagram is, then that’s probably the simplest way to visualize the problem:

The first statement omits anything from being in C ∩ B.  The second omits anything in B outside of A.  The result is the Venn diagram on the right.  Clearly, anything in B must be in A but not C, which would verify the conclusion.  The possible mistake is that B and A outside of C could be empty!

Let me illustrate with an example.  Fermat’s Last Theorem states that there is no integer solution to the equation x^n + y^n = z^n with x,y,z,n > 0 and n > 2.

Let’s plug in some values to the above argument.

Let A = (quadruples (x,y,z,n) of positive integers with n > 2).

Let B = (quadruples (x,y,z,n) of positive integers with n > 2 and x^n + y^n = z^n).

Let C = (quadruples (x,y,z,n) of positive integers with n > 2 and x^n + y^n ≠ z^n).

We can apply the above argument:

First, No C are B.  Yes, that’s true.

Second, all B are A.  Yes, that’s also obviously true.

Therefore, some A are not C.  But anything in A and not C is a counterexample to Fermat’s Last Theorem!  According to the article, I’ve just proven the theorem false.  But of couse I haven’t.  I’ve just pointed out that this line of reasoning can fail.  So the 90% of humans who “fail” to confirm the syllogism aren’t so stupid, after all.

3. The missing analysis

I’m about to criticize this article, but I want to preface the criticism by saying that I’m glad the article exists.  There is a gaping hole in journalism around science.  We need more science journalism because we need a culture that celebrates research and progress.

The best kind of scientific journalism is both appreciative and critical at once – this article is not critical enough.  It doesn’t sufficiently explore the key question of any good investigation: why do the researchers think the new claim is true?  Sadly, this is the norm in mainstream so-called scientific journalism.  The articles are so caught up in trying to decipher the complexities of the new ideas that they forget to ask why we need the complexities in the first place.  Why don’t the simpler answers suffice?

It is a bit ironic that an article decrying the carelessness of human reasoning fails to reason carefully.

experimental integrity and the search for causality

Wednesday, March 25th, 2009

The phrase the scientific method implies that there is some universal, automated process that investigators blindly follow in order to do science. In truth, there is a great deal of improvisation and creativity required for the doing of good science. Great leaps forward, such as general relativity or the complex (as in complex numbers) proof of the prime number theorem, often rely on bold, inspired insights into the nature of an unsolved problem.

However, there are a few common principles that unite the rational attitudes of modern research. I want to highlight a few that I feel are somewhat neglected. They are:

  • experimental candor,
  • easily reproducible experiments, and
  • induced correlation.

Experimental candor

Here’s a nice way to get great results: suppose you think that drug A will help people lose weight. Conduct a thousand studies on small groups of test subjects. Suppose one of those studies shows good results – publish those good results, and throw away the rest of the results.

This may sound a bit unrealistic, but something like this can happen much more easily in computer science. In this case, there is a growing field of algorithms which are both probabilistic and approximate – very similar to experimental drugs in medicine. If they do pretty well most of the time, that’s good enough. Yet with an algorithm, it’s incredibly easy to run a million trials of your code, and only publish the best subset of that. Even if the quality of your results are completely random, it’s just a matter of time before one small subset of the test results look good.

Hence the need for experimental candor. It’s important to reveal all the relevant experiments performed, including the negative or inconclusive ones. The web is the perfect platform for this kind of data disclosure – you can pre-publish your intended experiments and hypotheses before you actually run the experiments. This way, good results look better, and other researchers won’t waste time on previously failed experiments. Of course, it’s always possible that an experiment failed for unaccounted-for parameters (including human error), which is why experimental reproducibility is also crucial to good research.

Easily reproducible experiments

This scientific tenet is well agreed upon, but poorly executed. In practice, I know of very few experiments which can be very easily reproduced at the research level. In some cases, one may wish to build upon the work of another, such as by augmenting a biochemical procedure with a new step. Articles involving experimental lab work do indeed contain careful procedural explanations meant just for this purpose, which is great. But in many cases, even this is not enough for other researchers – in my days as a grad student, I would see other grad students emailing or calling other investigators (often ones who were considered serious competitors) to ask for critical clarifications in procedure.

We can do better than that.

I’m going to pick on computer scientists for a moment, because they’re the worst offenders. An algorithmic experiment has the most potential to be easily reproducible. Ironically, it seems typical to leave out necessary parameters to perform the experiments used in many papers. In order to reproduce a certain graph of time complexity versus input size on a certain real-world dataset, for example, a reader will often have to code up the algorithm based on very vague pseudocode and hand-wavy explanations, guess at parameter values, and separately download the dataset. I’ve even seen code used which was nowhere available in either pseudocode or executable code – the reference given was by personal communication with another researcher (who won’t answer my emails).

There is no excuse for this. Any good algorithmic experiment can be reproducible at the click of a button. The experimenters have already written the code – it is simply a matter of adding a link to this code to a website. It would be friendly to add a little documentation; or better yet, to follow a pattern of operation for the field, in much the same way that some software installation procedures have become standardized.

Induced correlation

This point is a call for the conscious recognition of an idea that’s been implicitly used for some time.

Certain experiments have the goal of looking for something like a causal relationship. If a drug company is testing a weight-loss drug, they want to know that their drug causes the weight loss, as opposed to it causing something else, or something else causing the weight loss.

Unfortunately, there’s no fool-proof way to experimentally test causality. This is a well-known problem. It’s also interesting to note that, philosophically, causality itself is subjective in nature, although that is the matter of another post.

Here’s the trouble: Let’s hypothesize that chemical X causes weight gain. As an experiment, get a large group of people together. We randomly select some folks as the control – they won’t change their diets, and we randomly select some others to change their diet to no longer consume chemical X. We see the desired results: the control group gains a little weight on average, but the experimental group (no chemical X) actually loses some.

Does that mean anyone can prevent weight gain by avoiding chemical X? Absolutely not. Here is one possible explanation: Suppose that the vast majority of foods contain both chemicals X and Y together, or not at all. So when the experimental group avoided X, they were also avoiding Y without knowing it. Now you unleash your study on the world, and everyone starts avoiding X. But there are some foods with chemical Y in it, without X. It could happen that those foods become more popular, or that certain people subconsciously crave Y. In either case, we have people consuming Y, not X, and gaining weight.

Is there anything we can do to experimentally show something stronger than mere correlation? A little bit, yes – we can show induced correlation. This is a correlation between parameters which was observed specifically by either turning on or off the cause in each trial, and purposefully leaving all other known parameters the same. Let’s use the term natural correlation to indicate experiments where the cause was either present or absent without any control by the experimenters. Induced correlation gives more evidence of causality than natural correlation since there is more evidence that we can control the effect by controlling the cause.

I think this general idea has been understood already, but I’m not sure that it has been explicitly recognized. My goal throughout this post has been to encourage the codification and emulation of a few good core principles of scientific investigation. There are definitely more key principles, although I’ve been reminded many times that at least these three could use a little more awareness and observation.

thoughts on junk DNA

Saturday, March 7th, 2009

It’s interesting to think of DNA as the source code for life. A lot of ideas fall into place nicely with this analogy.

You need some sort of compiler or interpreter; this role is given to RNA. You need a basic set of atomic instructions, and something like labels to certain parts of the code base – pointers into memory. Codons are the instruction set, with start codons helping to act as labels. A central processing unit executes the commands – ribosomes turn the codon sequences into proteins, and the proteins interact to achieve various goals. Chemistry itself is the ultimate processor, but it takes more focused form in the complex interaction of the enzymes produced by the DNA. Some of the proteins act as inhibitors, decreasing the activity of enzymes; others are activators, doing the opposite. These constructed molecules are capable of effecting or halting the production of still other amino acid complexes. The end result is a logically sophisticated dance worthy of the millennia of evolution which produced it.

As I write code on my own, in an experimental fashion, I sometimes don’t worry about the readability of the code. It is in this scenario that the evolution of source code best matches that of DNA. There is a small cost to having extra/old code, yes, but it is far outweighed by the raw functionality created.

Looking at some source which has grown up just a little bit, mostly unsupervised, offers a few suggestions about bits of information that may, at first glance, appear non-functional (aka junk DNA):

  • Old functions which are never or rarely ever called

    As code evolves, some functions become less useful, or replaced by newer ones. It would make sense that some codon sequences would become obsolete, and the encoding would remain in the DNA.

  • Literal strings and other initialization data

    There might be a bit of initialization data in DNA – information not obviously functional, yet still used. For example, some DNA may only be active for a very short time when an embryo is first developing, or triggered temporarily at certain key development stages. An even more interesting hypothesis is the possibility that some instincts, or primal knowledge, are somehow encoded in DNA, in a manner somewhat different than traditional protein transcription.

  • Debug code

    Debug code is useful for figuring out what part of a process has failed. Although there may not be a conscious debugger to check the output, we could still hypothesize that a little extra information about each step in a procedure could give enough information to locate and react to a failure or attack in the system. In this case, the usually non-functional code would be rarely and temporarily activated as a defensive mechanism.

top movies of 2008

Wednesday, February 25th, 2009

There are two things that make a movie worth seeing: because it moves you or makes you think by reflecting on reality, or because it entertains you by helping to escape reality.

If we are pained by a sympathetic situation that was experienced by someone in history, or alive today; or if we feel vicarious joy for a simple act of triumph (say, winning a spelling bee), the reality of the situation, symbolic or literal, is a key factor in our empathy. We are moved because this is the way life really is. On some level, we can relate to the plights and victories of these characters.

On the other hand, it’s nice to tickle your imagination from time to time with an escape. We don’t really believe Indiana Jones could easily be real, or that Spider Man might one day exist. Nor do we expect a monster like Godzilla to ever attack a nearby city (after all, Tokyo is far away for most people). The entertainment here lies with a contrast to reality. Everyday lives are kind of boring. Monsters don’t attack, nobody wins the lottery, most days you don’t fall in true love for the first time, or find an alternate dimension, or save the world. But it can be cool to daydream.

The best movies work with these principles – they choose a side. Sometimes you can mix these two aspects, but you have to be careful about it. If a piece of a film is just-for-fun, there’s no harm in bending – or even reversing – reality. But if you’re trying to move your audience, trying to comment on a state of the human condition, you have to be more careful. Symbolism and admitted exaggeration can work, because we understand the reality being represented. But to toy with reality to suite the message of the film is to defeat your own purpose. For example, Syriana presents a terribly bleak and pessimistic view of political and industrial intrigue. We are lead to believe that this situation could be real, but it felt like they were stretching a little too far; as a viewer I felt bereft of both entertainment and reality.

This is some background for my top movie picks of 2008. I think in ten years, these movies will still be worth watching, while a lot of other highly anticipated films from this year will be forgotten.

  1. Gran Torino

    Clint Eastwood knows film. He’s been involved in about a half century of movie evolution, and I think he’s kept the good parts of more traditional film alive here. The film says a lot without being overly symbolic, and the characters are visceral and quotable without feeling cliched. This is a contemporary, somewhat realistic (even if parabolically so) film about redemption and opportunity. It’s good because we leave the theatre feeling for the story, not worrying about its plausibility. There are no u-turns or magic revelations. Everyone is flawed or troubled, and nobody wins everything. Yet there are pieces of fun, of power, of thought, of sacrifice, and of compassion.

  2. Wall•e

    Only Pixar could seriously attempt this: Let’s make a dialogue-free, post-apocalyptic love story between two robots caught in a conspiracy that might crush the threadbare hopes of the space-stranded remnants of humanity. For kids. And somehow it works. Wall•e is visually rewarding, touching, whimsical, nostalgic, and engrossing. It’s sci-fi speculation is escapist entertainment first, and social commentary far second. It gets away with allegorical statements on the irresponsibility of humanity because the reality in it is not presented as the truth, but rather as a kind of cautionary fable.

  3. Iron Man

    There are two common superhero movie mistakes: they don’t know how seriously to take themselves, and the heroes are often portrayed as everyday people who happen to have a heart of pure gold. This film tackles that second mistake – Tony Stark is neither your everyday guy, nor endowed with such heart. We like him because, unlike our super/spider/batmen, when we become iron man, we don’t have to shoulder the great responsibility of great power, and we don’t have to cower under a shroud of modesty. We can just do our thing and enjoy the moment. Somehow I find Tony Stark more realistic and more entertaining at the same time. Of course, this film is not about the human condition – to spell out the obvious, this is just for fun. And it succeeds.

  4. Be Kind Rewind

    See The Science of Sleep before you see Be Kind Rewind. Michel Gondry is a child with the ability to turn his daydreams into movies, and to really appreciate the world you’ve entered, it helps to speak the language. This one got a number of poor reviews because it’s outside the realm of normal moviedom for casual viewers. It’s unusual Gondryan style is cubism in crayon. And this is the subtle genius of it. When a critic is confused, they have to decide if it’s because the movie is above them or below them to avoid looking dumb. With Be Kind Rewind, the confusion is simply a different narrative medium — the film is just for fun, but seriously so. If you try to use Duchamp’s fountain the way you’re used to, you’ll be missing the point.

    Enough defense. Be Kind Rewind is good because it’s fun. The characters and the plight – the foundations – are tangible. Beyond this – the devices and exposition – there is not much pretension of reality. The key components are in place – what’s real is what moves us, what’s art is what makes us laugh.

  5. Wanted

    Like Iron Man, Wanted breaks the chains of the stereotypical hero movie. In this case, it really doesn’t take itself too seriously. On top of this, the dramatic tension is very personal – Wesley (our protagonist) desperately wants to avenge the death of his father. Saving the world takes the backseat. It works because it doesn’t really bother with the less entertaining aspects of the world – things like the rules of physics applied to bullet trajectories, or oracles more traditional than giant looms.

Honorable mentions: Cloverfield, Kung Fu Panda, Pineapple Express

Enter The Tangent Space (dot com)

Monday, January 26th, 2009

Here’s a new site for exploring cool math ideas: thetangentspace.com

My blog posts here have often alternated between technically detailed mathy or algorithmic thoughts, and more informal musings on life, the world, and interesting things in it. In my mind, there are really two audiences – one for the mathy stuff, and one for everything else. So it probably makes sense to have two places to put these different thoughts. From now on, my posts here will be less mathy, and I’ll feel free to go math-crazy (or algorithm-crazy, as the case may be) on thetangentspace.

I’m trying a new type of blog with thetangentspace. It’s about math research, and research is about communicating and collaborating. Even if it’s a slow channel, it’s an interactive process. So thetangentspace is both a blog and a wiki. The blog is meant as an easy stream of intuitive ideas – something you can keep up with, without investing too much thought. The wiki is where the details go – the full proofs and formal definitions. It’s also a place for other mathematicians to make significant additions – beyond what you can leave in the comments of a blog – using the same software as wikipedia. My hope is that some of the ideas and questions I post will inspire others to build on these initial offerings.

Check it out!
thetangentspace.com

mathskool.com

Friday, January 2nd, 2009

I just launched the alpha version of mathskool.com.

This is a website I’ve been working on for the past month, meant to help connect great math teachers with motivated middle and high school students. The idea is to provide a centralized library that many math teachers can contribute to, and which gives students free access to short, focused videos. I imagine teachers recommending them as supplementary material to classes, or students searching for a single particular topic while stuck on their homework or studying for a test, or even curious people learning new things on their own.

I plan to continue adding features and videos to this site gradually over time. YouTube and other math-oriented sites already offer videos, but I think mathskool is unique in focusing on math education, being free, and encouraging a more interactive community with a nice question/answer system. For now I’ve included a few videos of my own, and several from other people.

Let me know if you know any math teachers who might be interesting in using or contributing to the site. The next step is to start building a community of users – teachers and students.

Check it out! mathskool.com

the scaled interest principle

Wednesday, December 31st, 2008

Here’s an idea that I’ve seen in action throughout my life, although I’ve never seen it explicitly put into words:

Events of interest tend to happen more quickly at smaller scales, and slower on large scales.

Interpreting relativity as putting a speed limit on the flow of information, gives a natural justification of the principle in the physical world. The idea jumps out when you consider the (admittedly imperfect) analogy between atoms and solar systems.

We can also see it in other ways. Small companies usually react more quickly than big ones. Flies move more quickly, and die more quickly, than elephants or whales. Smaller computer programs often run faster than large ones. Things happen faster in dense cities than in a sparse countryside. An idea of little interest fades faster than a popular meme. A simple system is easier to work with than a complex one.

driving is kind of crazy

Monday, December 1st, 2008

It can be fun to ask yourself questions that help re-think our world. An example:

Suppose an advanced alien civilization discovered our human life on earth, and studied it carefully. There would certainly be some things that stand out to them as particularly strange, ironic, or just stupid. Which things would stand out?

I’m willing to bet that our current modes of popular transportation would stand out — in particular, driving a car somewhere (as opposed to taking a trian, boat, or plane).

Why? Let’s evaluate the danger of an action, very approximately, as the frequency you take this action multiplied by the probability at any point during the action that you will become seriously injured, mauled, and/or deadified. On average, this is basically proportional to the number of “man-made” fatalities caused per year in the course of performing an action (I say man-made as opposed to pre-existing medical conditions — otherwise, we would have to say “having a beating heart” is a dangerous action, since many people have heart attacks).

Along this line of reasoning, it stands out immediately that driving (or being a passenger in a car) is the single most dangerous activity you’re likely to perform on a regular basis. And, if you think about it just a little bit, it’s not so surprising.

Let’s add another test to help discover perilous conducts: does being drunk make the activity stupidly dangerous? Clearly, this is not true for 99% of the actions you take every day. You can read your email while drunk, you can walk around your house, you can listen to music, eat food, watch movies, try to do paper work, chat with friends, play with your dog or cat, read a book, sing karaoke, dance, or play games while drunk without any danger to your person. Yet, clearly, drunk driving is so dangerous that it is a serious legal and societal offense.

I don’t seriously expect anyone’s behavior to change in light of these thoughts — I still drive around all the time. But it continues to surprise me to apparently be alone in considering driving, while pragmatically necessary, a highly precarious practice. Certainly we can imagine worlds in which people move about in some way where a strong twitch at the wrong moment can’t kill anyone. Packets of information fly around the world following routing protocols and get safely where they’re going. Snail mail networks provide another huge and relatively safe means of transportation. Passenger trains, boats, and planes are operated by professionals under careful coordination with much lower risk of collision and higher standards of maintenance. Why not cars?

fairness is contageous

Friday, October 31st, 2008

Here is a trick to simulate a coin toss between two people if both of you are caught coinless: each person secretly chooses a number, either 0 or 1, and both announce their choice simultaneously. If both numbers match, this is heads; otherwise tails.

This idea can give surprisingly fair (i.e. close to 50/50) results.

Suppose you choose fairly, but your so-called friend is nefarious, and chooses their number in any non-50/50 manner. For example, they could always choose 1, or always choose 0, or always try to predict your answer and choose the same number as you.

As long as you choose fairly, though, the ultimate answer will also be exactly fair. Why? No matter what your friend chooses, you’ll choose either the same or the different number with 50/50 probability. If you’re really choosing your number fairly, then there’s no way for your friend to make any kind of prediction (by the way, this unpredictable property is one way to think about probabilistic independence).

Of course, the situation is symmetric: if your friend plays fair, then the ultimate outcome is fair, too, no matter how nefarious you are. Fairness trumps nefarness.

Even cooler: even if you both play unfairly, though still independently, then the ultimate outcome will still be more fair than either of you would have been acting on your own. The math on this is pretty simple.

Suppose you choose 0 with probability 1/2 + b1, and your friend chooses 0 with probability 1/2 + b2. I’m writing the probabilities this way because it makes the calculations easier. We can think of the b‘s as the “bias” of each person’s randomness. A bias closer to 0 means a more fair result — closer to 50/50.

Using b1 and b2, what is the probability that the outcome will be a match? It’s Prob(both heads) + Prob(both tails) =


(1/2 + b1)(1/2 + b2) + (1/2 – b1)(1/2 – b2) =
1/2 + 2b1b2.

In other words, the combined bias is 2b1b2. Notice that each individual bias is in the range [0, 1/2], so the combined bias is also in that range. Also notice that, if both biases are < 1/2, then the combined bias is less than either individual bias. This is what I meant by saying that the combined outcome is more fair than either player alone.

In fact, things are a lot more fair since this is a multiplicative effect. Suppose you’re sitting around with the unshakable urge to produce fair random binary digits. Alas, you empirically discover that you seem to choose 0 with probability 60%, and 1 the other 40% of the time. What are you to do??

Just write down a few random 0/1′s in a row, and take the XOR of this list of numbers. This is just a slight generalization from the above 2-player version. (By the way, this is the same as giving an ultimate outcome of 1 if there are an odd number of 1′s in your sequence; 0 otherwise.) If you started with bias b, then taking the XOR of n bits in a row will give you an ultimate answer with bias (2b)n/2.

Why? We can confirm this formula by repeated application of the above derivation that 2 players end up with combined bias 2b1b2. The sequence of biases for a single player looks like this:


b → 2b2 → 4b3 → … → (2b)n/2.

To get an idea of how incredibly useful this convergence is, suppose that your personal bias is b=60%, and that you want to be within 1 millionth of perfect fairness. How many times n must you perform a single (60%-biased) choice in order to arrive at an XOR which is this close to perfect fairness? Only nine times! This works because (2*.1)9/2 < 1/1,000,000. If you ask me, this is a pretty small price to pay to go from a 10% bias down to 0.0001%.

exposé: poorly Lego’d Eggos

Monday, September 22nd, 2008


It’s always interesting when a new mix of two different worlds pops up. Remember when Drew Barrymore married Tom Green? Sometimes these things work out – like the glory of rock stardom and video games. Other times the result is disturbing and creepy – like anime and ronald mcdonald.

I try to be optimistic, so I was pretty excited when I found out Eggo had released a Lego-themed waffle. At long last, food I can legitimately play with! This was awesome – two things I really enjoyed as a kid (and still do, though less often) – creativity and edibility, all in one.

Imagine the profound depths of my chagrin when I discovered the horrible truth. Gentle reader, let my folly be your tale of caution:

You can’t actually build anything with Lego Eggos.

Someone, somewhere along the way made an unspeakably heinous design decision and decided that three holes on the bottom of the wafflebricks would fit just fine with the 8 pegs on top. Please refer to the photographic evidence.

Why?!?!? As a mathematician, I can attempt to quantify the magnitude of this engineering catastrophe with a simple formula:

8 pegs + 3 holes = WTF

As you can see, these wafflebricks do not stack any better than standard waffles.

You have been warned.