This outputs an electability comparison of Hillary Clinton and Bernie Sanders based on aggregate polling data from RealClearPolitics.com and aggregate betting market odds of winning the Republican primary from ElectionBettingOdds.com.
It multiplies each Democratic candidate’s combined polling advantage or disadvantage versus a given Republican candidate in the general election as reported by RealClearPolitics, against that Republican candidate’s odds of winning the Republican nomination from ElectionBettingOdds, then adds all of these advantages (a disadvantage is subtracted) together and returns the total as a percentage.
Not every republican candidate is factored in, because RealClearPolitics’ data set does not include polling data for Sanders versus every Republican. Data current as of Feb. 15, 2016, scraped using KimonoLabs.com.
Bernie Sanders Weighted Polling Advantage:
Hillary Clinton Weighted Polling Advantage:
Republican Candidates' Odds of Winning the Nomination