Euclidean distance measures the straight-line separation between two points. For coordinates (x1, y1) and (x2, y2), square each coordinate difference, add the results, and take the square root. section 3.9
NBA draft example
Using pick number and average win shares, the distance between picks 1 and 3 is sqrt((1 - 3)^2 + (69.6 - 66.9)^2) = 3.36. Comparing picks 2 and 3 gives 15.43, indicating greater dissimilarity. section 3.9
euclidean_distance <- sqrt((1 - 3)^2 + (69.6 - 66.9)^2) euclidean_distance ## [1] 3.36006
Run the calculation directly in R with the square-root formula, then use dist(..., method = "euclidean") to create a distance matrix for all observations. section 3.9







