Hacker News new | ask | show | jobs
by cousin_it 465 days ago
For correlation to be 1, it's not enough that all snakes have scales. You also need all scaly animals to be snakes.

Here's a toy example. Imagine three equally sized groups of animals: scaly snakes, scaly fish, and scaleless fish. (So all snakes have scales, but not all scaly animals are snakes.) That's three data points (1,1) (0,1) (0,0) with probability 1/3 each. The correlation between snake and scaly comes out as 1/2.

You can also see it geometrically. The only way correlation can be 1 is if all points lie on a straight line. But in this case it's a triangle.