4
$\begingroup$

I performed a clustering analysis on European countries using several continuous variables and the Ward linkage method. Ward produced the highest average silhouette width compared to single, complete, and average linkage. Although the global silhouette plot suggests an optimal k = 2, there is a meaningful local optimum at k = 7 that better reflects the structure I want to analyze.

However, using k = 7 results in one cluster containing only a single country and another cluster with only two countries. I calculated the median and IQR for each cluster, except for the cluster with a single observation.

My question is: can I still apply a non-parametric Kruskal–Wallis test to compare all seven clusters, and subsequently perform Dunn’s post-hoc test with Bonferroni correction, even though one cluster contains only a single observation and another contains only two observations?

$\endgroup$
3
  • $\begingroup$ Before asking "can I" be sure to answer "should I?" Why do you want a test of this? $\endgroup$ Commented Dec 14, 2025 at 11:32
  • 2
    $\begingroup$ The dumb-bell is two clusters, but the loaf of bread is no clusters. If you cut the loaf in two halves (which cluster analysis, say k-means or Ward, will do for you), these two halves will be two artificial, artefact clusters. And they will be very significantly different by any comparison test, and with a good effect size. But there were no clusters initially in the loaf. $\endgroup$ Commented Dec 14, 2025 at 12:32
  • $\begingroup$ A test that doesn't take account of the process of clustering on the properties of the test will not have the characteristics you would hope it has; for example, it won't have an actual significance level anywhere near the nominal significance level. $\endgroup$ Commented Dec 14, 2025 at 23:06

1 Answer 1

6
$\begingroup$

Kruskal-Wallis (as well as the parametric ANOVA) incl. post hoc tests etc. can not be validly applied, because standard tests such as Kruskal-Wallis assume that the hypothesis to be tested is constructed before the data and in particular that it has not been constructed based on the same data. But if the groups in the data are built by cluster analysis, this is not fulfilled.

In order to understand this, you may generate homogeneous one-dimensional data from a Gaussian distribution and cluster them into two clusters by k-means or basically any clustering method. The probability will be very large that any two-group test (like Wilcoxon, the 1-d version of K-W, or t-test) reject the equality null hypothesis, because the clustering actually chooses the groups so that they are in some sense optimally different. (Also see the loaf of bread example in comments by @ttnphns.)

So the fact that you have a one-point cluster isn't the worst problem here.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.