Simply Statistics: On weather forecasts, Nate Silver, and the politicization of statistical illiteracy

Wednesday October 31, 2012

•  data science •  innumeracy •  mathematics •  R •  scientific computing •  statistics • 

Simply Statistics: On weather forecasts, Nate Silver, and the politicization of statistical illiteracy

simplystatistics:

As you know, we have a thing for statistical literacy here at Simply Stats. So of course this column over at Politico got our attention (via Chris V. and others). The column is an attack on Nate Silver, who has a blog where he tries to predict the outcome of elections in the…

I’ve revised your code for efficiency:

# Set initial parameters
percentObama = 0.505
sdObama = 0.01
n = 1000

# Simulate n elections
simulatedPercentObama = rnorm(n,mean=percentObama,sd=sdObama)

# Calculate the percent of times Obama wins
percentObamaWin = mean(simulatedPercentObama > 0.5)
percentObamaWin