liveBook · Manning

Distance matrix

As explained in Statistics Slam Dunk

A distance matrix is a tabular structure containing pairwise distances or dissimilarities between observations.

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.

How Statistics Slam Dunk covers it

How deep it goes
Works through Euclidean calculations, R output, and dendrogram construction.
Examples
Uses NBA draft pick numbers and average career win shares, including hand-calculated pairwise distances.
What you can do after
Apply it via R's dist() and hclust() functions to produce hierarchical clusters.
How it connects
Connects Euclidean distance with hierarchical clustering and dendrograms.

Also explained in

Compare how 3 books explain distance matrix →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.