Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Model Evaluation›Gap Statistic
MCDMCluster Number Selection

Gap Statistic

Gap Statistic for Cluster Evaluation · Also known as: gap index, Tibshirani gap statistic

The Gap Statistic, developed by Tibshirani, Walther, and Hastie in 2001, is a principled statistical method for determining the optimal number of clusters in a dataset. It compares the observed within-cluster sum of squares to the expected value under a null hypothesis of no clustering structure, providing a theoretically grounded approach to cluster number selection.

ScholarGate
  1. MCDM
  2. v1
  3. 1 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Gap Statistic
Calinski-Harabasz IndexDavies-Bouldin IndexElbow MethodInertia (Within-Cluster…Silhouette ScoreDunn Index

When to use it

Use the Gap Statistic when you want a statistically principled method for selecting cluster count that accounts for the null hypothesis of no structure. It works better than the Elbow Method when the true elbow is ambiguous. However, it is computationally more expensive due to reference dataset generation and assumes uniform null distribution, which may not hold for all data types.

Strengths & limitations

Strengths
  • Theoretically grounded in statistical inference
  • More objective than the Elbow Method; produces a numerical criterion
  • Works well when clustering structure is moderate to strong
  • Applicable to any clustering algorithm and distance metric
Limitations
  • Computationally expensive; requires generating and clustering many reference datasets
  • Assumes uniform null distribution, which may not suit all data
  • Can be sensitive to the number of reference datasets generated
  • May perform poorly when true clusters are non-convex or have very different sizes

Frequently asked

How many reference datasets should I generate?

Typically 100 to 500 reference datasets are sufficient. More datasets provide more stable variance estimates but increase computation. Start with 100 and increase if results seem unstable.

What if the Gap Statistic suggests k=1, meaning no clustering?

This indicates weak or absent clustering structure in your data. You may need to re-examine your data, try different clustering algorithms, or reconsider whether clustering is appropriate for your problem.

Can I use the Gap Statistic with non-Euclidean distances?

Yes, but generating appropriate reference datasets becomes more complex. For non-Euclidean distances, you need to generate reference data that respects your distance metric or use alternative null models.

How does the Gap Statistic compare to silhouette score?

The Gap Statistic is a statistical test for selecting k, while silhouette score evaluates the quality of a given clustering. They serve complementary purposes: use Gap Statistic to choose k, then validate with silhouette score.

Sources

  1. Tibshirani, R., Walther, G., & Hastie, T. (2001). Estimating the number of clusters in a data set via the gap statistic. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 63(2), 411-423. DOI: 10.1111/1467-9868.00293 ↗

How to cite this page

ScholarGate. (2026, June 3). Gap Statistic for Cluster Evaluation. ScholarGate. https://scholargate.app/en/model-evaluation/gap-statistic

Related methods

Calinski-Harabasz IndexDavies-Bouldin IndexElbow MethodInertia (Within-Cluster Sum of Squares)Silhouette Score

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Calinski-Harabasz IndexModel Evaluation↔ compare
  • Davies-Bouldin IndexModel Evaluation↔ compare
  • Elbow MethodModel Evaluation↔ compare
  • Inertia (Within-Cluster Sum of Squares)Model Evaluation↔ compare
  • Silhouette ScoreModel Evaluation↔ compare
Compare side by side →

Referenced by

Calinski-Harabasz IndexDavies-Bouldin IndexDunn IndexElbow MethodSilhouette Score

Similar methods

Elbow MethodSilhouette ScoreCalinski-Harabasz IndexDunn IndexCluster AnalysisK-Means ClusteringK-meansDavies-Bouldin Index

Related reference concepts

K-Means ClusteringCluster AnalysisClustering AlgorithmsModel-Based ClusteringHierarchical Cluster AnalysisText Clustering

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Gap Statistic (Gap Statistic for Cluster Evaluation). Retrieved 2026-07-21 from https://scholargate.app/en/model-evaluation/gap-statistic · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Robert Tibshirani, Guenther Walther, Trevor Hastie
Subfamily
Cluster Number Selection
Year
2001
Type
Statistical criterion
Related methods
Calinski-Harabasz IndexDavies-Bouldin IndexElbow MethodInertia (Within-Cluster Sum of Squares)Silhouette Score
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account