# Category Archives: Data analysis

## Pearson’s r: Not a good measure of electoral persistence

Pearson’s product-moment correlation, $$r$$, is an incredibly useful tool for getting some idea about how two variables are (linearly) related. But there are times when using Pearson’s $$r$$ is not appropriate and, even if linearity and all other assumptions hold, … Continue reading

Posted in Data analysis, Graphics, Poland, Political parties, R | 2 Comments

## Welford’s method for calculating the sample variance: An implementation in Scheme

John Cook has three entries up on his blog discussing the pitfalls of calculating the sample variance using the mathematical textbook definitions. He provides a Monte Carlo comparison of methods here, and a theoretical discussion here. He also provides a … Continue reading