Showing posts with label shaq. Show all posts
Showing posts with label shaq. Show all posts

Monday, February 23, 2015

Shaqtin-a-bias?


All NBA fans know about Shaqtin-a-fool.
Once a week, Shaquille O'Neal hosts this small segment on the NBA on TNT show. Five humorous video clips are shown, with players definitely not at their best. Erratic passes, obvious travels, missed wide-open dunks and layups, lost shoes...
The segment is also available on nba.com, and fans can vote for the best Shaqtin-a-fool moment.


For volume 4 episode 11 (they're referenced just like a TV series, with season and episode), and similarly to over 50% of the voters, I had voted for the last video clip shown which was that week's clear winner. A weird sensation I had been carrying over from week to week suddenly materialized: it seemed to me that the last video clip was winning a disproportionate number of times.

Two explanations came to mind: the video clips were not shown randomly in Shaq's segment, but sorted according to users' preferences. Or the human mind was biased with its short term memory, not exactly remembering the first clips, and finding the last disproportionately funnier.

It was all the more obvious for this episode 11, where the poll results were in the exact reverse order they were shown in:



But before investigating the human brain and mind too deeply, I first had to see if my brain wasn't the one tricking me, and sought statistical confirmation that there was indeed a bias favoring the last video shown.

First things first, data was required. Unable to automatically run a script to pull the survey results from polldaddy.com, I manually went through the last 28 episodes (including some special episodes for the All Star Game, the Playoffs and past eras), noting for each video the order it was shown ("Input Order"), and the position it was in the survey results ("Output Ranking").

A quick first visual exploration of the data, linking Input Order to Output Ranking:


I added some jitter to avoid all the lines overlaying each other and hiding the number of observations. It did seem that the majority of the lines were in the steepest diagonal, indicating that the most common "transition" was from videos being shown in 5th position coming out first in the survey results. At least I wasn't imagining the whole thing!

Because the diagonal has longer length than horizontal lines, there could still be an optical illusion suggesting that indeed there are more lines when we are actually seeing more color from longer lines, not more lines. So I re-generated the same graph but reversing the order of the inputs, so that the last video shown is not labelled 1, and the first video shown is 5.


No visual trick here, definitely looks like the last video shown is the most likely to win the poll (horizontal lines going from 1 to 1).

Now for the statistical confirmation. The most suited test here is a chi-square, comparing observed counts with expected counts under the null hypothesis that video order doesn't matter and all videos are equally likely to end up in any position.

The first test I ran looked at the full data and all the Input Order - Output Ranking counts:

Output: 1 Output: 2 Output: 3 Output: 4 Output: 5
Input: 1 3 3 13 6 3
Input: 2 1 2 3 10 12
Input: 3 4 5 6 9 4
Input: 4 3 8 5 3 9
Input: 5 17 10 1 0 0

The chi-square strongly rejected the null hypothesis: input order and output ranking were strongly linked.

The second test focused uniquely on the winner of the poll. In which position was the winner shown?

The table below summarizes the data:

Input: 1 Input: 2 Input: 3 Input: 4 Input: 5
Count 3 1 4 3 17

That's right, in 60% of cases the survey winner was shown in last position! It's clear from the data that not all positions are created equally and a second chi-square confirmed this.

So back to Shaq. Now that we've confirmed that there is a strong bias, can we try explaining the phenomenon?

My first idea (perhaps having spent too much time doing analyses for marketing teams!) was that the videos were not randomly shown but already sorted according to expected viewers' preference. It's a possibility, but a rather weak one. What would be the rationale? To get people hooked on the show as the clips get funnier and funnier? Sure, but recall that the whole Shaqtin-a-fool lasts 2-3 minutes tops, I'm not not sure if users really need to get hooked. Plus, until they see the last videos, the audience has no way of determining whether the best videos have already been shown.

So, I'm actually leaning towards an unconscious bias. I think the same phenomenon occurs if you were asked to rank your best vacations. There might be some clear "great vacations" (honeymoon), and "bad vacations" (lost wallet, passport, got sick), but I believe that with equally enjoyable vacations, the brain might be tempted to rank the latest one higher. A modality effect has been documented usually to describe the improved recall of the last elements of a list, typically when these are presented visually or auditory. I'd be willing to bet something similar is at play here.

However, even if the survey results are much more predictable now, I'm still going to continue watching Shaqtin-a-fool religiously. For pleasure... and more data.

Thursday, February 12, 2015

Are freethrows game-changers?


"And another missed free throw!"
"That's the story of the game right there, they just can't get those easy points from the charity line."

I've heard very similar discussions to this one over and over throughout the years from basketball commentators. Although not truly meaning it (at least I think), the commentator was heavily implying that the outcome of the game would be extremely different if a given team had made all, or significantly more, of its free throws.

Don't expect a sophisticated analysis here, I was just curious to explore the correlation between difference in final score and number of missed free throws.



So I wanted to investigate the two following questions:
  1. If the losing team had made all its attempted free throws, would the outcome of the game have been different?
  2. If the losing team AND the winning team had made all of their attempted free throws, would the outcome of the game have been different?

To answer those questions, I pulled all boxscores for regular season games from the 1999-2000 season to the last complete one, 2013-2014 and for each game tracked the final score difference, as well as the number of missed free throws for both the winning and losing teams.

Here's a first quick visual of the relationship between the number of missed free throws for each team (losing team on the lefthand graph, winning team on the righthand graph) and the final score difference:



Rather surprisingly, there does not appear to be any link between the number of missed free throws and the outcome of the came in terms of close game or huge blowout. It would have seemed natural to assume that the more free throws the loser team has, the more likely they are of getting blown out, and the opposite argument for the winning team.

How have these numbers evolved over time? Here's the evolution of the average score difference and missed free throws for those 15 seasons:



Not completely obvious trends emerge from the graph, but if anything can somewhat notice that:

  • the lines for the winning and losing team are extremely similar
  • average score difference has stayed flat or perhaps very slightly increased
  • number of missed free throws has decreased (could be due to better shooting and/or less free throws attempted, and it's actually a little of both)

Now of course this analysis has been as naive as they come. You can't just expect free throws to go from missed to made and expect the entire game to follow its original course. Players might get confidence as they rack up easy points, and coaches might change strategies if what would have been a big lead is only a 2/3 point lead. The point of the exercise here was to compare the range of final point differential to number of missed free throws, and it would seem that free throws only account for about half the final gap. This could be a reason why teams, coaches, players don't put in crazy efforts to have all players shoot 99%. Their time is probably better spent on other types of training.

That being said, I just had to mention the other day's game which saw both teams shoot a combined 37% (16 for 43, 8 for 25 for the Clippers, 8 for 18 for the Nets) from the free throw line. To put things in perspective, Shaquille O'Neal who was criticized his entire career for those shots was 53% over his career (despite finding elaborate strategies to boost the percentage). Consider the Clippers lost by a mere two points 100-102, I'm sure they must be kicking themselves for their performance at the line.

Also worth noting, this game from 1999 between Portland and the Lakers. Portland won quite big - by 15 - but missed only one free throw. The Lakers missed 17! Had both teams been perfect, the Lakers could have actually won a game they lost by 15. This was the biggest outcome reversal I observed in the data if both teams had been perfect.