WOLFRAM

Best of Blog

Best of Blog

Test Your “Subitizing” Ability

Recently I found myself reading about “subitizing”, which is the process of instinctively counting small sets of items in a fraction of second. For example, try quickly counting a few of these: The Wikipedia article indicates that you can nearly always correctly count four or fewer items in a small fraction of a second. Above four, you start to make mistakes. I wanted to test this claim in Mathematica (using myself as the test subject). I decided to create a simple game in which small groups of items are momentarily displayed on the screen, after which players estimate how many they saw.
Best of Blog

Mathematica Q&A: Plotting Trig Functions in Degrees

Got a question about Mathematica? The Wolfram Blog has answers! We'll regularly answer selected questions from users around the web. You can submit your question directly to the Q&A Team using this form. This week's question comes from Brian, who is a part-time math teacher: How do you plot trigonometric functions in degrees instead of radians? Trigonometric functions in Mathematica such as Sin[x] and Cos[x] take x to be given in radians:
Best of Blog

Automatic Physical Units in Mathematica

I just published a Mathematica package that provides an alternative, richer implementation of units and dimensional analysis than the built-in units package. You can get it here. Aside from being a really nice extension to Mathematica, it is also an interesting case study in adding a custom data "type" to Mathematica and extending the knowledge of the built-in functions to handle the new "type". First I have to explain the point by answering the question, "What's wrong with the built-in units package?" Well, there is nothing actually wrong with it, it just doesn't apply Mathematica's automation principles. It can convert between several hundred units and warn if a requested conversion is dimensionally inconsistent. But give it an input like... and it does nothing with it until you specify that you want the result in a specific unit. The core reason is that it doesn't teach the system, as a whole, anything about units, or even that the symbol "Meter" is any different than the symbol "x". All of the knowledge about units and Meter in particular is contained in the Convert command.
Best of Blog

aMAZEing Image Processing in Mathematica

A little over a mile from the Wolfram Research Europe Ltd. office, where I work, lies Blenheim Palace, which has a rather nice hedge maze. As I was walking around it on the weekend, I remembered a map solving example by Peter Overmann using new image processing features in an upcoming version of Mathematica. I was excited to apply the idea to this real-world example. Once back at my computer, I started by using Bing Maps to get the aerial photo (data created by Intermap, NAVTEQ, and Getmapping plc). The maze is meant to depict a cannon with cannon balls below it and flags and trumpets above.
Best of Blog

Do Computers Dumb Down Math Education?

Since I just heard that the video for Conrad Wolfram's recent TED talk "Stop teaching calculating, start teaching math" will be coming out soon, I thought I would address the single biggest fear that I hear when I talk about using computers in math education. The objection that using computers will "dumb down" education comes with the related ideas "students have to learn to do it by hand or how will they know they have got the right answer", "they won't understand what is happening unless they do it themselves", and so on. Well, let's examine this by looking at a typical math question that I know I had to solve at some point in my education.
Best of Blog

25 Best Hangman Words

A simple question from a six-year-old about hangman turned into another analysis obsession that made me play 15 million games of hangman recently. Back in 2007, I wrote a game of hangman for a human guesser on the train journey from Oxford to London. I spent the time on the London Underground thinking about optimal strategies for playing it, and wrote the version for the computer doing the guessing on the return journey. It successfully guessed my test words and I was satisfied, so I submitted both to the Wolfram Demonstrations Project. Now, three years later, my daughter is old enough to play, but the Demonstration annoys her, as it can always guess her words. She asked the obvious question that never occurred to me at the time: "What are the hardest words I can choose, so that I can beat it?"
Best of Blog

Doing Spy Stuff with Mathematica

I was reading about the IT problems of the recently arrested, alleged Russian spies, and I wondered if they could have managed secret communications better with Mathematica. One of the claims was that they were using digital steganography tools that kept crashing. I wanted to see how quickly I could implement digital image steganography in Mathematica using a method known as "least significant bit insertion". The idea of steganography is to hide messages within other information so that no one notices your communications. The word itself comes from a Latin-Greek combination meaning "covered writing", from earlier physical methods that apparently included tattooing a message on a messenger's head before letting him grow his hair back to hide it. In the case of digital steganography, it is all done in the math.
Best of Blog

Twisted Architecture

I didn't set out to tie knots in Norman Foster's Hearst Tower or wrinkle his Gherkin, but I got carried away. It's one of the occupational hazards of working with Mathematica. It started with an innocent experiment in lofting, a technique also known as "skinning" that originated in boat-building. I wanted to explore some three-dimensional forms, and a basic lofting function seemed like a quick ticket to results. I dashed off the function Loft, which takes a stack of three-dimensional contours and covers it with a skin of polygons.
Best of Blog

Stock Market Returns by Presidential Party

The New York Times recently published an “Op-Chart” by Tommy McCall on its Opinion page showing what your returns would have been had you started with $10,000 in 1929 and invested it in the stock market, but only during the administrations of either Democratic or Republican presidents. His calculations showed that if you had invested only during Republican administrations you would now have $11,733 while if you had invested only during Democratic administrations you would now have $300,671. Twenty-five times as much!

That’s a pretty dramatic difference, but does it stand up to a closer look? Is it even mathematically plausible that you could have essentially no return on your investment at all over nearly 80 years, just by choosing to invest only during Republican administrations?

To answer these questions, I of course turned to Mathematica.

And the answer is that yes, it is mathematically plausible, using the assumptions made by McCall. My analysis using historical Dow Jones Industrial Average data available in Mathematica’s FinancialData function roughly matches the figures in the Times, which used Standard & Poor’s data. (I used the Dow because it’s more convenient, not because I think it’s a better measure.)

But the fact that they are correct doesn’t mean the figures are even remotely meaningful. Here are some problems with the New York Times’ Op-Chart: