**Daniel MarcelinoDaniel Marcelino » R**, and kindly contributed to R-bloggers)

“For things to remain the same, everything must change.” (Gattopardo by Giuseppe Tomasi di Lampedusa)

In less than a month, Scots will decide if they want Scotland tied or apart of UK. Over the last days, I’ve noticed a variety of projections in the British press about this, but I decided to give it a try myself using a Beta distribution application.

The beta density function is suitable to represent outcomes like proportions or probabilities defined on the continuum between 0 and 1, and it is a very versatile distribution that we can apply to many different contexts, from baseball games to political elections. The only thing to remember is that this distribution applies well to problems involving two classes: Yes and No, but not to a higher number of them.

Though there are often other third-category in the polls, the “Undecided” voters, the dispute is effectively between YES and NO. Although we can use models that are more complex for this, I found sensible still to reduce the number of categories to two and carried out a simulation analysis with the Beta distribution.

**Some Referendum Notes** The referendum will be carried out on September 18th to ask the Scots’ opinion about the two platforms: Yes Scotland and pro-union Better Together. However, looking the polls backwards since 2011, it is not hard to conclude that there is virtually no chance that the Yes side will make it. The polls have been pretty much stable so far, where the No side predicted support is at 60-55 percent and Yes side is about 40 or so.

As can be seen from the raw polling data since 2011, the Yes Scotland support has always been lower than “NO” by an average of about 8.9%.

2014 so far — Yes: 36% vs. No: 47%; Uncertain: 17% 2013 — Yes: 32% vs. No: 49%; Uncertain: 17% 2012 — Yes: 32% vs. No: 53%; Uncertain: 15% 2011 — Yes: 38% vs. NO: 42%; Uncertain: 20%

Although the Yes campaigners insist to say that the more people learn about independence, the more likely they are to vote for it, when you look at this kind Yes or No vote, the No side is that tends to grow over time (For instance, the Quebec referendum in 1995, and the Brazilian firearms referendum in 2005). As the uncertainty comes into play from the approaching days to referendum, people tend not to default to changing the status quo.

Based on recent pre-referendum polling, it looks like the “NO” will likely win by a similar margin and maybe a little higher than the average of 13%. Actually, based on latest pre-referendum polls this margin will be closer to 14.2% points. Note that the marginal difference between “YES” and “NO” is distributed as a beta distribution and we can see that the threshold of zero (0) is far left in the tail of the curve. Therefore, based on previous and current polls, it is very improbable that the pro-independence movement will make this plea. The assumption that more information leads to the “Yes” vote renders not that plausible after all.

**Independence Referendum Betting Odds** Interesting, however, is to compare this result with what the market says about the likely outcome. The Scottish independence market on August 18th was giving an opposite outcome of the prediction that I found using polling data: 11/2 “Yes to independence” for 1/10 “No to independence”. So, in this case, the view of the stock market doesn’t match the view of pooled people at large.

**leave a comment**for the author, please follow the link and comment on their blog:

**Daniel MarcelinoDaniel Marcelino » R**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...