Sunday, July 22, 2007

Today's finish to golf's British Open (or "The Open" as the hosts call it) will probably be remembered primarily for the play of Padraig Harrington and Sergio Garcia on the 18th hole in regulation and then the four-hole play-off between the two, won by Harrington.

For sheer hot streaks, though, the Sunday round of Andres Romero, the third-place finisher, would be hard to top. He made 10 birdies for the day, including a stretch of 6-out-of-7 holes in the latter half of the round.

As pointed out during the ABC television broadcast (and can be seen on Romero's scorecard), he had bested par only nine times during the first three days (54 holes) of the tournament (8 birdies and 1 eagle).

Statistical tests on one athlete in one event are always dicey because of the relatively small sample size. However, with the ready availability of online statistical calculators -- in this case, for chi-square -- let's go for it!

We start with a basic 2 X 2 contingency table, with the values referring to numbers of holes (the dashes have been inserted to make sure the spacing comes out right):

----------Below par-----Par or above
Day 1-3--------9------------45------
Day 4---------10-------------8------

The calculator site I used offers three different versions of the chi-square test. Regardless of which one is used, the obtained difference in Romero's percentage of below-par holes between the first three days and the final day would be expected to come up purely by chance less than .005 of the time (5 in 1,000 or 1 in 200). We thus conclude that he performed significantly better on Sunday than during the three previous days.

Of course, the usual cautions apply: I was drawn to doing this analysis by the unusual nature of Romero's spectacular round, I did not test a random cross-section of golfers, and in the aggregate "big picture" of all golfers in all major tournaments, a round like his may not occur any more often than would be expected by chance.

Saturday, July 21, 2007

The Kansas City Royals have been playing some good baseball of late, at least relative to what we'd expect from recent years' incarnations of the team. According to a blog that follows the Royals:

Their June record of 15-12 is their first winning month since July of 2003... realize this team went 22 months with a sub-.500 record. Incredible.

Further, the Royals are 8-6 thus far in July, despite playing against some of the top teams in the American League recently. Here are KC's 2007 game-by-game logs from ESPN.com (first half of season, second half).

Friday, July 20, 2007

With their 6-2 victory over the Arizona Diamondbacks this afternoon, the Chicago Cubs have now won 19 of their last 24 games. An ESPN television graphic showed that the Cubs have steadily increased their month-specific winning percentages from April to July (thus far in the month). As of about a month ago, the Cubs were 32-39 (.451). Their game-by-game log for this season is available here.

Saturday, July 14, 2007

Just a couple of brief items:

The Chicago Cubs ended their 10-game drought without a home run, as Alfonso Soriano belted one today in the North Siders' 9-3 romp over Houston. Chicago did win 6 of the 10 games, though. It was the Cubs' longest homer-free stretch since 1988...

In the kind of start any golfer would dream about, In-Kyung Kim birdied her first seven holes in today's round of the LPGA's Jamie Farr Classic. Kim was quoted in the linked article as follows:

"That was my first time to birdie seven holes in a row, so that was pretty cool," she said. "I kept making birdies. I thought maybe I could shoot 57 today! I made seven birdies in a row, like, what's going on?"

Despite the early hot putter, Kim is in third place heading into the final round, five strokes behind leader Se Ri Pak.

Sunday, July 08, 2007

Earlier today, tennis great Roger Federer won his fifth straight Wimbledon men's singles title, defeating Rafael Nadal in five sets.

With the win, Federer tied Bjorn Borg for the modern record of five consecutive men's singles titles; Borg was in attendance to witness the match. The all-time record is six, held by William Renshaw (1881-1886).

Whereas the five straight titles might be viewed as a "macro" streak, Federer also came up with a key "micro" streak in the fifth set to transform a tight situation in which the momentum seemed to be going against him into a set (and match) that he won going away. As NBC announcer Ted Robinson noted, Federer was able to "flip the switch" to raise his game to a higher intensity.

Specifically, serving at 2-2 in the fifth set, Federer trailed 15-40. He then hit two service winners (balls that Nadal was able to get a racquet on, but not send back over the net in fair territory) to erase the break points, and went on to win the next two points (four in a row, all told) to hold serve for 3-2.

Federer then broke Nadal -- for only the second time in the match -- by winning four out of five points. Federer then held at love to increase his lead to 5-2. Thus, during this stretch, Federer won 12 out of 13 points!

Federer then won again on Nadal's serve, in a lengthy game that went to deuce a few times, to prevail 6-2 in the fifth.

Tennis is one of the few sports in which an academic statistical study has found evidence of streakiness (non-independence) of winning points. For further information, see the following article, available via Franc Klaassen's faculty webpage.

Klaassen, F.J.G.M. & Magnus, J.R. (2001). Are points in tennis independent and identically distributed? Evidence from a dynamic binary panel data model. Journal of the American Statistical Association, 96, 500-509.

Wednesday, July 04, 2007

Having reached (roughly) the halfway point of the baseball season, with the All-Star Game this coming Tuesday, now seems like a good time to reflect on the home run-hitting performance of the Yankees' Alex Rodriguez this season. As of this writing, A-Rod leads all of Major League Baseball with 28 homers, one ahead of National League leader Prince Fielder and eight ahead of the nearest American League rival, Justin Morneau (ESPN.com MLB stats page).

It's not merely the number of homers hit by Rodriguez, but also the seemingly clustered nature of his blasts. Thus far this season (and, as I've come to learn, in earlier years), he has seemed to hit home runs in bunches, separated by pronounced cold streaks where he's been unable to "touch 'em all."

In preparing to do this write-up, I did a lot of web-searching on Rodriguez and his home run-hitting prowess. In the process, I found a spectacular visual display of A-Rod's sequences of home-run and non-home-run games, not just for 2007, but for his entire career (done by Ryan Armbrust at a blog called "The Pastime"). One apparent typo is that the year labeled "1995" in the display is really 1996 (compare with Rodriguez's career stats).

With reference to his visual display, Armbrust writes of A-Rod, "He’s been a streaky home run hitter his entire career, as shown by the sparklines below."

However, as social psychologist David Myers notes in his book Intuition: Its Powers and Perils, "Random sequences seldom look random, because they contain more streaks than people expect" (p. 134). Any interested readers of this blog can demonstrate this for themselves by following Myers's example and flipping coins for a while. Every so often, you'll get streaks of several heads or several tails in a row.

A statistical test to determine if A-Rod's sequences of games with and without at least one home run are more bunched into homogeneous segments than would be expected by chance, is thus warranted.

One such approach is the runs test (here, here, and here). Where each trial can have two possible outcomes, such as each baseball game played by Rodriguez either including a homer by him (depicted in red in Armbrust's figures) or not including one (gray in the figures), a run is defined as any streak of consistently the same outcome (all reds in a row, or all grays). We are thus using the term "run" in a particular statistical context and not in regard to how many "runs" a team scores. Also, for present purposes, we are ignoring the distinction between games in which A-Rod has hit 1, 2, or 3 homers -- all are subsumed within the category "1 or more."

If, instead of colors, we use the code number 1 to represent a game with at least one A-Rod homer, and the number 0 to represent a game with no homers by him, we will have various sequences of 1's and 0's.

The key to the runs test is that streakiness is signified by few runs (such as 11110000, which contains two runs), whereas absence of streakiness is signified by many runs (such as 10100101, which contains seven runs).

For any given sequence, we can calculate how many runs would be expected by chance. Then, if the actual number of runs in a sequence turns out to be significantly smaller than expected, we can claim streakiness.

As a simple example, let's say we have a four-trial sequence consisting of two 1's and two 0's, in some order. There are six possible such sequences (those familiar with the n-choose-k principle can think of the problem as 4-choose-2, as we are choosing in which two of the four positions the 1's [or the 0's] would be located).

1100 (2 runs)
1010 (4 runs)
1001 (3 runs)
0011 (2 runs)
0101 (4 runs)
0110 (3 runs)

If we average the number of runs over all six possible sequences, we get 3 as the expected number of runs (18/6).

A simple formula for expected number of runs is 2 X (number of trials with a 1) X (number of trials with a 0), divided by the total number of trials, with 1 added to the previous answer. For the above example, expected runs = (2 X 2 X 2)/4 = 2, plus 1 = 3, matching the above answer. In my table below, I round the expected runs values to the nearest whole number or, if close to ending in .5, to the nearest half-number.

Another resource we can use is an online runs-test calculator, into which we can type in 1's and 0's and, at the click of a mouse, find out if our sequence deviates significantly from expectation (in order for a result to be "statistically significant," by convention we say that there must be a .05 [1-in-20] or smaller probability of the obtained result being due to chance).

Below are the results of my application of Rodriguez's data (from The Pastime, except for a couple of months in 2007, which I gleaned myself) to the runs test. Another point worth noting is that the online runs-test calculator is limited to 80 cases of data. Accordingly, I did hand calculations of A-Rod's actual (observed) and expected runs for both the first 80 games and all games of each season.

With the data from the first 80 games of a given season, I performed a formal runs test only if the actual number of runs was below the expected value (shown in bold), as I wasn't interested in testing if A-Rod was ever less streaky than expected. Then, if it appeared that his actual number of runs for a full season might be substantially lower than the expected value, I also performed a runs test for games 81 and beyond in that season (in cases where he played 161 or 162 games in a season, I used his last 80 games, leaving out the 1 or 2 in the middle of the season). Here are the results...

1996 (shown on The Pastime as 1995)
First 80 games: 35 actual runs, 31 expected runs
Full season (146 games): 57 actual runs, 52 expected runs

1997
First 80 games: 21 actual runs, 21 expected runs
Full season (141 games): 41 actual runs, 39 expected runs

1998
First 80 games: 37 actual runs, 34 expected runs
Full season (161 games): 61 actual runs, 60 expected runs

1999
First 80 games: 39 actual runs, 34 expected runs
Full season (129 games): 57 actual runs, 53 expected runs

2000
First 80 games: 27 actual runs, 30 expected runs (p = .18)
Full season (148 games): 48 actual runs, 56.5 expected runs (for final 68 games, p = .02)

2001
First 80 games: 31 actual runs, 30 expected runs
Full season (162 games): 75 actual runs, 68 expected runs

2002
First 80 games: 29 actual runs, 31 expected runs (p = .27)
Full season (162 games): 65 actual runs, 67 expected runs (difference of 2, though in direction of streakiness, still small)

2003
First 80 games: 32 actual runs, 29 expected runs
Full season (161 games): 62 actual runs, 65 expected runs (reversal of trend from first 80 games is noteworthy; for last 80 games, p = .08)

2004
First 80 games: 32 actual runs, 29 expected runs
Full season (155 games): 55 actual runs, 53 expected runs

2005
First 80 games: 25 actual runs, 25 expected runs
Full season (162 games): 63 actual runs, 64 expected runs (difference of 1, though in direction of streakiness, still small)

2006
First 80 games: 24 actual runs, 28 expected runs (p = .10)
Full season (154 games): 49 actual runs, 50.5 expected runs (difference of 1.5, though in direction of streakiness, still small)

2007 (through 80 games)
First 80 games: 30 actual runs, 35 expected runs (p = .08)

One finding that initially jumps out at me is that A-Rod has been as (or more) likely to exhibit a greater number of homogeneous runs than expected by chance (the opposite of streakiness) in a season, as fewer runs. Overall, I would say there's some very modest evidence of Alex Rodriguez being a streaky home-run hitter, whose dingers tend to come in bunches. But to a large extent, the bunches we see in the visual depictions tend to be the result of randomness.

Once again, I would like to express my appreciation to Ryan Armbrust, whose diagrams of A-Rod's home-run sequences saved me a lot of work!

Tuesday, July 03, 2007

Red Sox shortstop Julio Lugo ended his cold stretch of 33 straight at-bats without a hit, singling in the second inning of tonight's game against Tampa Bay. Lugo then added another single in the seventh, for good measure. Although he was not all that close to Bill Bergen's record (for a non-pitcher) of 46 consecutive hitless at-bats, set nearly 100 years ago, Lugo was coming under increasing scrutiny from Boston fans and baseball statheads.