Showing posts with label TopicBlogPost#2. Show all posts
Showing posts with label TopicBlogPost#2. Show all posts

Friday, March 22, 2013

Sabermetrics Revisited



I wanted to clarify some areas which might have been unclear concerning my explanation of Sabermetrics and specifically BABIP as a factor in the explanation.  Sabermetrics is a form of statistical analysis that is used in computing baseball statistics.  In class we discussed Nate Silver and how he weights different polls in order to conduct what is known as a meta analysis.  A meta analysis is a way to focus and combine statistics from different studies, in class we used Silver’s polling to discuss examples, in order to examine the results as a whole (Wikipedia).  A weight in statistical terms is defined as a coefficient assigned to a number in a computation, for example when determining an average, to make the number's effect on the computation reflect its importance (Eurostat).  This is the definition; however, let us discuss why it is important to us as consumers of statistics.  Like we have been discussing in class weighting is important if you would like to know how a particular variable is represented in the population.  For example on Tuesday we discussed the question of if the number of homicides was disproportionate compared to the total population.  In order to do this we had to find the weight.  This is why weighting is important and how it is related to what we have discussed in class. 
Batting Average on Balls in Play is an example of a weighted statistic.  In an incredibly simplistic explanation we can say that this is a measure of how many hits a player is getting or as is being used in our case how many hits a pitcher is giving up (this is the reverse of what is being observed) [thank you Professor Oyen].  To be fair and accurate in my explanation of the reasoning behind the usage of BABIP in sabermetrics we must understand that “in play” means that the ball is hit fair and is being used to further the game in some statistically significant way and if not the ball would be considered foul or “not in play.” 
           So the question remains how do we compute this and why is each variable important to the equation?  The formula for BABIP=(H-HR)/(AB-K-HR+SF).  With H=hits, HR=home runs, AB=at bats, K= strike outs, and SF= sacrifice flies.  A hit occurs when the player makes contact with the ball and reaches base.  This variable is significant because for a player it signifies that they have safely reached first base.  A hit is important for the converse reason to the pitcher because it signifies that a batter has successfully hit a pitch thrown by that pitcher.  A home run is a hit that allows a player to complete the circuit of bases.  This is important for a batter because it can mean that they can score one run and as many as four.  Scoring is a way of determining the number of points in a game and helps to define who won.  A home run is significant to the pitcher for different reasons and we will discuss this more in detail when we discuss the reasoning behind the variables for the calculation of the BABIP.  At bat is how many times a player has stood at the plate (home plate) with a chance of achieving a hit.  For pitchers it is interesting because it focuses on the number of batters which they will face in an inning.  A strike out is when the pitcher throws the ball and the player who is “at bat” fails to achieve a hit three times which results in the batter being sent back to their dugout.  For pitchers this can be important in traditional baseball statistics; however, not for BABIP which we will discuss in the section on weights.  Finally sacrifice flies are a bit more complicated than the rest of these for this I will provide a verbatim definition from Wikipedia. 
“In baseball, a sacrifice fly is a batted ball that satisfies four criteria: There are fewer than two outs when the ball is hit. The ball is hit to the outfield (fair or foul), or to infield foul territory. The batter is put out because an outfielder (or an infielder running in the outfield, or foul territory) catches the ball on the fly (alternatively if the batter would have been out if not for an error or if the outfielder drops the ball and another runner is put out). A runner who is already on base scores on the play. It is called a "sacrifice" fly because the batter presumably intends to cause a teammate to score a run, while sacrificing his own ability to do so.”
Sacrifice flies are important because they calculate a player’s defensive skill and willingness to give up their own ability to score to allow a teammate to score.  These are important for pitchers because it would signify that there is a runner who can advance on base.
            Now that we are aware of what all of the terms mean and why they are statistically significant we can discuss why the weighting occurs the way that it does.  Hits are counted because they are a significant factor for both the pitcher and the hitter as discussed above and can influence the game; however, home runs are not.  Home runs are not counted because they do not put the ball into play.  The acronym BABIP stands for Batting Average on Balls in Play. This is why we subtract home runs from hits in the first portion of the equation.  So why do we divide the top portion of the equation by the variables discussed above?  Because these variables weight the equation so that events which are significant, but do not put the ball into play are accounted for.  Subtracting strike outs from at bats is huge because the smaller number of players which come up to bat against a pitcher signifies their success at minimizing their challenges (related to one on one challenges) when they are playing the game.  This portion of the equation is important for hitters because it signifies a level of success when facing a pitcher.  Home runs are subtracted out again from at bats and then sacrifice flies are added to the equation to allow for the proper defensive strategizing and offensive failure.  One thing that isn’t explicit in this explanation that I thought would be worthwhile to point out is that for batters the BABIP is a fairly direct measure of how they have performed in a game while for pitchers it is more indirect.  By this I mean that although batters can control their BABIP for pitchers it is incredibly difficult.  
(Above references should all be attributed to baseball prospectus)
            Back to the original post?  So why is it that the statistics jump around so much from season to season?  According to baseball prospectus this is because an average major league baseball pitcher does not maintain a steady BABIP!  I did not fully understand this when I originally posted the BABIP blog post.  Apparently the BABIP should go up or down according to season and it should be a fairly good predictor of how a pitcher would perform in a season following.  For example we see for Clemens in the previous example that he fell from 0.29 to 0.25 in between one season and the next and that the following season he rebounded to approximately 3.3 and then fell to 0.27 within two seasons.  This example seems to support the usage of BABIP to predict performance from season to season.  Although Clemens went well below the average his performance then exceeded the average and then fell to within it’s confines again.
            All sites referenced were accessed on 3/22/2013
http://www.crawfishboxes.com/2012/11/6/3603134/talking-sabermetrics-what-does-astros-pitcher-babip-tell-us
http://www.baseballprospectus.com/glossary/index.php?search=BABIP

Thursday, March 21, 2013

Nate Silver and the NCAA Tournament

In class we discussed Nate Silver and his incredibly accurate use of statistics in predicting the presidential and congressional races in the past.  For the past two years he has used statistics to predict the winner of the NCAA basketball tournament.  Last year he was successful in predicting Kentucky as the winner of the tournament, giving them a 27% chance of winning. This year he predicts Louisville as the winner with a 23% chance of taking it all.  He makes his predictions using a three step process.  First he creates a power rating for each team, which is an aggregation of four computer ratings and two human ratings.  Each of the ratings he uses has performed well in the past.  Next, the ratings are adjusted for injuries, geographical location of the game, and and the team's performance in the tournament after the first round.  Finally, he compares two teams' power ratings and estimates the likelihood that they win and move on to the next round.  Our Lobos had a .8% chance of winning the tournament. 

Tuesday, March 19, 2013

Election Day Predictions

When it comes to predicting election outcomes, most people have heard of Nate Silver's work. Sam Wang, a neuroscience professor from Princeton University, is perhaps a less well known election predictor. In the 2008 presidential election, Wang correctly predicted the electoral college with the exception of one split vote from Nebraska. This nearly perfect prediction of electoral college votes was more accurate than Nate Silver's 2008 prediction which correctly identified the voting of 49/50 states. 

Sam Wang's methodology is similar in many aspects to that of Nate Silver. Like Silver, Wang uses a meta-analysis approach in his predictions by combining data from all available state polls. Wang cites that it is important to aggregate different polls as a way of accounting for outliers present in different polls. While Nate Silver uses an averaging method to account for outliers that may be present in the data, Wang instead uses median based statistics. Wang claims that a the median value is often more representative than an average value when outliers are present. Also like Silver, Wang looks for day-to-day changes in the polls and identifies "shocks" to the campaign that cause drastic fluctuations in the polls such as democratic or republican conventions, and presidential debates. 

It can be argued that Sam Wang has more faith in the polls than does Nate Silver. Wang claims that the polls do well enough on their own that there is no need for the econometric factors that are so abundant in Silver's methodology. Also unlike Silver, Wang does not throw out any polls before conducting his statistical analysis. It is interesting to note how accurate both Wang and Silver are in their election predictions given their slightly different methodologies. Perhaps the key to accurately predicting elections relies more on the quantity of polls used rather than on the variation of statistical analysis that is conducted. 

http://www.forbes.com/sites/alexknapp/2012/11/07/election-forecaster-sam-wang-on-the-future-of-polling-and-punditry/

http://election.princeton.edu/faq/

Sabermetrics



While reading the article on Nate Silver in Scientific American this week I noted that while working for Baseball Prospectus he utilized a system of statistics called Sabermetrics.  After doing a bit of research on Wikipedia I found out that Sabermetricians utilize baseball statistics in order to devise new and original ways to analyze statistics which are different from the traditional measures of stats.  An example of this type of sabermetric equation would be batting average on balls in play or BABIP.  The formula for BABIP=H-HR/AB-K-HR+SF.  With H=hits, HR=home runs, AB=at bats, K= strike outs, and SF= sacrifice flies.  For a pitcher this formula makes quite a bit of sense as a traditional measure of pitching quality would be earned run average which fails to account for many of the qualitative factors which are mentioned above.  One of the unique uses of BABIP is not only comparing pitchers across leagues but also being able to compare various pitchers across time!  Although it is true that we can do this with ERA as well there are many factors which influence ERA which do not allow for the weightedness which is considered with BABIP.  To illustrate this example I have utilized an analysis system which presents graphical representations of two different pitchers against the average for all pitchers.  For this analysis I chose Sandy Koufax and Roger Clemens.  Koufax and Clemens were both known for having amazing beginnings to their careers so the question that I wanted to know was, “whose beginning was better?”
Luckily for me baseball is an oft enough discussed topic that these two men are both available with a full list of BABIP statistics available.  The graphical representation is shown below.  Clemens clearly had a better start to his career although as BABIP would predict the fluctuations from year to year are also extreme.  Utilizing this system of weighted averages we could say (asterisks notwithstanding) that Clemens was a better pitcher than Koufax.


Thursday, February 28, 2013

Off to the Races

Today we discussed the fact that elections often are viewed by the media in the same manner as horse races. Unfortunately, I am pessimistic enough to believe that the media promotes the elections solely for their own gain. Dr. Reynolds of the University of Delaware presents data that shows that in media coverage of the 1988 elections, 29% of all television coverage was devoted toward the political "horse race." I cannot with certainty say where these numbers come from (Dr. Reynolds does not mention any original data or statistical analysis), but they do seem reasonable for current election "horse racing." While "horse racing" provides little substance, it would be correct to say that the public at large actually wants to hear about how one candidate is beating another. "Horse racing" is entertainment and viewers pay the bills for the media. Since people are accepting of such practices, I fear we will not see the day when "horse racing" in elections comes to an end.

Source: http://www.udel.edu/htr/American/Texts/news.html

Exit polls just useless

Whenever I used to hear the term "exit poll" in previous elections, I never really understood their purpose--we're going to find out who wins for sure soon, what difference does a few hours or days make? I now see a single good reason behind it: measuring how different demographics voted. But if that was the only reason people were being asked who they voted for, there would be no reason to publicize the results on 24/7 news shows. These media outlets are all competing to report major news stories first, before any other news station can, so they can get the ratings from everyone who wants to know the results as soon as humanly possible (even if those "results" aren't the true vote count).
There's also some problems with responses in this poll method. We've already talked about the possibility of people lying out of spite or embarrassment. However, I would guess that when a stranger asks "Who did you vote for?," there's probably a lot of non-responses as well. People might highly value their right to a secret ballot, feel that their vote is nobody's business, or associate the question with an impending argument or judgement, as is often the case in the months before an election. Although there isn't exactly self-selection in these polls, there could be a similar effect based on what kinds of people readily answer the question, and what kinds of people would decline to answer.
Finally, there's the fact that when it comes to the presidential election (which is really the only one with an exit poll problem), it's electoral votes, not the popular vote, that matter most. I'm sure some of you remember the fiasco last year, especially in Rio Rancho, when people read on their phones that Obama had won the 270 electoral votes and the presidency while they were still in line to vote. So again, why bother with exit polls except for the sole purpose of measuring demographic data?
It's not that I hate the existence of exit polls; I just don't see their usefulness in the media for anything besides ratings.

The Dangers of Exit Polling

After reading about exit polls in Chapter 7 of Polling and the Public, my nonattitude has morphed into a strong opposition of their use. While I understand their utility in helping predict election outcomes, the news media has completely abused them. I am outraged that sometimes candidates concede and elections are effectively over before everyone has had the chance to cast their ballots. This truly means that not every vote counts, especially if you live in the West.

When the East Coast is busy reporting exit poll results, the West's precincts are still open due to the time zone differences. It has been reported that media outlets announce winners (in the polling places!). What is the point of voting if it is for a lost (or won) cause?

It has been suggested that the election coverage be broadcasted according to time zone, but even if TV media does abide to this, the dissemination of knowledge from the internet and other sources will prevail.

Exit polls are also becoming increasingly less accurate because they do not consider absentee ballots and other mail-ins. They only count those on Election Day, and these are subject to lying (think Bradley Effect).

Because they discourage people from later time zones from voting, they leak despite regulation, and are sometimes largely inaccurate, I believe that their use should be prohibited. The only one that matters is the legitimate final count.

Tuesday, February 19, 2013

Bernoulli

Today we talked a lot about Bernoulli distributions. I found these distributions incredibly interesting because we use them so much in the field of psychology. For example, at work I have to issue a GDI (Geriatric Depression Inventory) to all of my patients. The GDI consists of 30 questions about their day to day life and only allows them to answer "yes" or "no." When they are finished, depending on their answers, I can scale their score and decide if they are "normal", mildly depressed, or severely depressed. However, I have also found that a lot of my patients find it difficult to answer these questions because they want to say "sometimes" rather than "yes" or "no". Thus, in my opinion, I feel like my final result could have a slight error. Although the error may only be a point or two, it is still an error. Maybe the test should change the answers to having "yes", "no", and "sometimes". I think that with the third choice, we could have a slightly more accurate reading of the patients. Also, I think that because my patients have trouble only answering "yes" or "no", they become frustrated and start to have a nonattitude. I think that because they don't have the third choice, they settle for an answer regardless of if they think it actually represents their true feelings. Although this is not a poll persay, I feel the GDI has some similarities and should be looked at for some of the errors it could have.

Sunday, February 17, 2013

Denying the Consequence

I was discussing in class the other day about how scientists now disprove things rather then trying to prove something. I was pulling up information in my logic class the other day and I came across exactly what I was talking about. Let me see if I can explain what I meant a little better.

***

There are two types of logical reasoning. One is deductive, and the second is inductive. Deductive logic has at least four forms. The one I was referring to in class is called Denying the Consequence. This writes out as

P implies Q                                                  when it rains, the grass gets wet
there is not Q                                               the grass isn't wet
therefore, there is not P                                therefore, it did not rain

Now, that is a valid argument form for deductive logic. However, a common fallacy in deductive logic is called Affirming the Consequence. This writes out as

P implies Q                                                when it rains, the grass gets wet
there is Q                                                   the grass is wet
therefore, there is P.                                   therefore, it rained

The second is a fallacy because there might be other factors that can get the grass wet, such as sprinklers or dog pee.

HOWEVER

In Inductive Logic (inductive logic is where you can state percents of something - example : x% of R observed are Z), Affirming the Consequence IS a valid argument form, and is sometimes used in science. It has another name though. We call it Induction by Confirmation.

If P implies Q                                                       P= some hypothesis Q = observation
we find Q                                                            Q = confirming instances
we can conclude, probably P                                P = conclusion

For example, I have a hypothesis that rain makes grass grow. P being rain, Q being grass is growing. X number of confirming instances I can observe that, when it rains and then the grass grows. We can conclude that rain probably makes the grass grow. With inductive logic there is no 100% yes answer. We can just conclude with X-confidence that this happens. Inductive logic coincides with evolution and Einstein's theory of relativity.

***

Now, back to what I was saying before. In class I said that scientists more often then not want to Deny the Consequence because they are less tempted to change the results. This is because proving that there is not Q only has to happen ONCE before there is NOT P. With inductive logic, you can have X-many of confirming instances, and the amount of confirming instances you have determines how good your relationship is. And as we read in 'Mismeasure of Man' it was very easy to increase the number of 'confirming instances'.