Just what exactly does the Lesotho Loti have to do with Palo Alto median prices?

December 5, 2006

Pat Kitano notes with his usual insight that spontaneity is both the joy and bane of blogging. In a rush of post-Martian Flu exuberance, I showed what looked to be a pretty neat correlation between the NASDAQ and Palo Alto median home prices. Alas, the spontaneity of that moment led me to not dig quite deep enough…

Enter reader Greg, whose facility with numbers and patterns has led to previous interesting discussions. He suggested running some regression analysis (for those who missed Stats 101, “regression analysis” is simply finding relationships between different groups of numbers.) I did that and came up — surprisingly — empty-handed: it turned out there was actually very little correlation, mathematically speaking, between the NASDAQ and Palo Alto median home prices. Puzzling, puzzling indeed, because the graph showed at least a rough correlation.

Greg ran a regression of his own comparing Palo Alto median home prices vs. the number of months since January 1997…and found a reasonably strong correlation, an R-squared value of 75% for those who care about such things.

Here’s a graph:

regression1-custom.png
The wavy blue line indicates Palo Alto median home prices; the straight pink line is the prediction, based simply on the number of months since January 1997.

Fortunately, all was not lost, as it turns out that while the NASDAQ alone was not a very good predictor, adding it to the mix turned out to increase the accuracy of the predictions, resulting in an R-squared value of 85%. The chart:

regression002-custom.png
Again, the blue line represents Palo Alto median home prices, while the pink line represents the predicted median home price, based on both the number of months since January 1997 and the NASDAQ.

What does this all mean? In a nutshell, this entire analysis proved what we all already know to be true: Palo Alto real estate prices in the last 10 years have tended to go up. The key predictor of prices is simply time; adding in other variables like the NASDAQ improves the predictive power, but the main indicator — by far — is simply that of time.

Which brings us back to the Lesotho Loti. Just for the fun of it, I ran one more regression, this time between Palo Alto median home prices and two variables: the number of months since January 1997, and the exchange rate between the US Dollar and the Lesotho Loti. (Yep, I’m the kind of person who “just for the fun of it” runs regressions. For other like-minded people, the R-squared for this regression was 75%.)

The graph:

regression003-custom.png
So does this mean that the exchange rate of the US dollar vs. the Lesotho Loti is an accurate predictor of Palo Alto median home prices? Not at all…it simply means that adding in that variable doesn’t really detract from the predictive power of the time factor.

Geek out.

Tags: , , , ,

Comments

5 Responses to “Just what exactly does the Lesotho Loti have to do with Palo Alto median prices?”

  1. Greg Coladonato on December 5th, 2006 6:39 pm

    Sadly, I fear that the regression on time, while good at predicting medians from 1997 to 2006, won’t be as good as predicting prices in 2007 and 2008. IMHO, in hindsight the next couple years will be outside of the ‘relevant range’ of today’s dataset.

  2. mike simonsen on December 5th, 2006 10:05 pm

    Ha! Great stuff! Did you do your regression comparing to the several month lag time offset that you noted? Just curious.

    The other nuance we’ve failed to consider is correlation vs. causation. In my original post I conveniently (lazily?) skipped that.

  3. Kevin Boer, Three Oceans Real Estate on December 6th, 2006 3:15 pm

    Mike — Regression with any combination of lagging NASDAQ numbers got horrible results. Regression with # of months since Jan 1997 got an R-squared of 75%; adding NASDAQ (both same month and lagging) numbers bumped that to 85%.

    And yes, there’s always the causation vs. correlation discussion. Every time I fly, I notice that the “fasten seat belt” sign turns on just before we hit some turbulence. Causation — I doubt it. Correlation — very much so.

  4. paul on December 6th, 2006 10:50 pm

    In regard to the comment about the r-squared not getting any less once you added the Lesotho loti, it is in fact mathematically impossible to add an independent variable to a regression and have the r-squared go down. So the answer to the title question is plainly… nothing. In fact, the USD/loti has trended significantly downward over the last 6 years.

    I assume you picked the Loti because Lesotho is a small country in the middle of nowhere - but in fact the Loti is pegged to the South African Rand, so it is correlated with more things than you might expect.

    (and really it would be more appropriate to base the whole conversation on t-statistics, not r-squareds…)

    cheers

  5. Kevin Boer, Three Oceans Real Estate on December 6th, 2006 11:28 pm

    Hi Paul,

    I’ll confess to have forgotten more than I remember from the stats classes I’ve taken in the past. :( I simply don’t remember what t-statistics are and how to use them; I’ll have to dig out my stats textbook for my text similar post.

    I do remember enough, however, to understand that the r-squared can’t go down simply by adding another variable to the mix.

    I picked the Loti pretty much at random, largely because I wasn’t able to conveniently find a data set for the proverbial “price of tea in China.” Now that you mention it, I am aware that the Loti is pegged to the Rand (I lived in Southern Africa for seven years — 4 in Botswana and 3 in South Africa.)

    If the overall topic of correlation between Palo Alto median home prices and the NASDAQ is of any interest to you, I’m happy to email you the original data set so you can play with it.

    Thanks for dropping by!

Got something to say?





« Back to text comment