When to use it
Discover nested groupings in numeric data without choosing k up front: inspect the dendrogram, then cut it where the structure is clearest.
When not to: Very large datasets (the full distance matrix costs O(n^2) memory, about 6.4 GB for the distance matrix alone at 40,000 rows, so use k-means instead, which scales to the whole table), when you already know exactly how many clusters you want and do not need the tree structure (k-means is simpler and faster), or when clusters are expected to be highly elongated/chain-like with single linkage specifically producing an unhelpfully stringy tree.
Step by step
Open it from the menu
Click Multivariate & ML in the menu bar; under Clustering choose Hierarchical Clustering.
Fill in the form
Choose the columns: Columns to group rows by. The form lists only columns whose type fits each field.
Check the options
The options start at their defaults: Number of clusters, Linkage method, Distance metric, Standardize. Change one only when your question needs it.
Run the analysis
Press Run analysis. The Result Card opens on its Results tab.
What to choose in the form
| Columns to group rows by Variables required | One numeric column. One or more continuous variables to cluster on. |
|---|---|
| Number of clusters | How many flat clusters to cut the tree into. Default: 3. |
| Linkage method | How distance between clusters is defined when merging (Ward requires Euclidean distance). Default: ward. |
| Distance metric | Pairwise distance metric between observations. Default: euclidean. |
| Standardize | Standardize each variable to mean 0, SD 1 before clustering so no variable dominates by scale. Default: on. |
How to read the card
The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.
What it assumes
- Independence of observations
If it does not hold: Hierarchical clustering treats every row as an independent point; clustering rows that are actually repeated measurements of the same unit, or otherwise dependent, can create spurious groups that just reflect the dependency structure rather than genuine subpopulations.
How to check: Not checked by KernelStats.
A worked example
Agglomerative clustering (Ward linkage, Euclidean distance, standardized) on four penguin body measurements across 342 birds, cut into 3 clusters.
Result: Cophenetic correlation = 0.83, silhouette = 0.45; cluster sizes are 123, 57 and 162, so one cluster matches the 123 Gentoo exactly while the other two split the 151 Adelie and 68 Chinstrap imperfectly.
The dendrogram represents the original distances reasonably faithfully, and the 3-cluster cut recovers one species cleanly, but the moderate silhouette and the Adelie/Chinstrap mixing show the body measurements alone do not separate all three species; agreement with a known grouping on one cluster is not proof that three is the right number of clusters.
From the Statistics Library.
The code tabs
Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.
Understand the statistics
Ask Oobi
Type one of these into Ask Oobi beside your data:
- How do penguins group hierarchically by their body measurements, and where should the tree be cut?
- Explain the hierarchical (agglomerative) clustering in plain words.
- What does outliers mean?
Last reviewed November 16, 2026.
