A distance matrix records the pairwise dissimilarity between observations. In hierarchical clustering, it turns NBA draft data into distances that indicate which observations are most alike. section 3.9
Build and use one in R by following these steps:
- Compute Euclidean distance by squaring coordinate differences, adding them, and taking the square root. section 3.9
NBA draft clustering
For first- and third-overall picks with average win shares of 69.6 and 66.9, the Euclidean distance is approximately 3.36. Comparing second overall with third overall produces approximately 15.43, reflecting their larger win-share difference.


