Algorithms for calculating variance

Ever wondered how scientists measure the spread of data points?

Image: Shailaja.k, CC BY-SA 3.0, via Wikimedia Commons

Algorithms for calculating variance

Ever wondered how scientists measure the spread of data points?

Imagine you're at a carnival, and you want to know how much your scores vary from the average score of the ring toss game.

Think of your scores as a bunch of apples. To find out how spread out your apples are, you first square the difference between each apple and the average apple size. Then, you add up all these squared differences and divide by the number of apples. This gives you a sense of how much your apple sizes vary from the average.

Example

If your scores were 10, 12, 14, and 16, and the average score was 13, you'd find the differences (10-13), (12-13), (14-13), and (16-13), square them to get 9, 1, 1, and 9, add them up to get 20, and divide by 4 (the number of scores) to get 5.

Remember this

The formula for variance is the average of the squared differences from the mean.

Related concepts

Swipe through more Machine Learning concepts

Open Pocket Polymath