Household incomes – clustering into k clusters
For example, let's look at households whose annual earnings in USD are $40,000, $55,000, $70,000, $100,000, $115,000, $130,000 and $135,000. Then, if we were to combine those households into two clusters, taking their earnings as a measure of similarity, the first cluster would have those households earning 40 k, 55 k, and 70 k, while the second cluster would include those households earning 100 k, 115 k, 130 k, and 135 k.
This is because 40k and 135k are furthest away from each other so, because we want to have two clusters, these have to be in different clusters. 55 K is closer to 40 k than to 135 k, so 40 k and 55 k will be in the same cluster. Similarly, 130 k and 135 k will be in the same cluster. 70 K is closer to 40 k and 55 k than to 130 K and 135 k, so 70 k should be in the cluster with 40 k and 55 k. 115 K is closer to 130 k and 135 k than to the first cluster containing 40 k, 55 k, and 70 k, so it will be in the second cluster. Finally...