Cluster analysis is a statistical method for grouping similar data points together and distinguishing them from other groups.
Picture a clothing retailer grouping customers by purchasing habits – frequent buyers, seasonal shoppers, or one-time purchasers. Cluster analysis helps businesses identify these groups and tailor marketing strategies, from targeted ads to personalised offers.
In marketing, cluster analysis segments consumers into distinct groups based on shared characteristics. This helps businesses better understand their target audience and tailor their marketing strategies accordingly.
What you’ll learn:
- What is cluster analysis, and how does it work?
- What is the purpose of clustering datasets?
- Why is cluster analysis important for business strategy?
- What are the different types of clustering and when do you use them?
- What are the characteristics of a good cluster analysis?
- What are the disadvantages of cluster analysis, and how can companies avoid problems?
- Perform cluster analysis
- What do you do with the results of a cluster analysis?
- How to ensure accurate, actionable cluster results
- Practical steps to get started with cluster analysis
What is cluster analysis, and how does it work?
Cluster analysis is a form of unsupervised classification – meaning there are no predefined classes, definitions, or expectations going in. It’s a statistical data mining technique that groups observations which are similar to each other but distinct from other groups.
A helpful way to understand clustering is to picture someone sorting chocolates from a sampler box. They may have preferences for certain types of chocolate.
As they sort through the box, there are plenty of ways to group the chocolates – by milk versus dark chocolate, with or without nuts, with or without nougat, and so on.
Sorting chocolates into groups based on shared characteristics – that’s clustering. It’s something we all do naturally.
For instance, an ecommerce platform might group customers by purchasing habits – such as budget-conscious shoppers, premium product buyers, and occasional browsers. This segmentation lets the platform create tailored promotions for each group, driving engagement and sales.
Understanding cluster analysis
Cluster analysis sits at the heart of data analysis. It’s easy to see why fields like finance, insurance, retail, ecommerce, and marketing rely on it to identify patterns and relationships within their data.
There are five main clustering approaches, with k-means clustering and hierarchical (or hierarchy) clustering being the most common. The approach an organisation takes depends on what’s being analysed and why. Using visualisation techniques such as scatter plots and dendrograms, businesses can present their cluster analysis results clearly and in a way that’s easy to understand.
What is the purpose of clustering datasets?
The core purpose of cluster analysis in marketing is to build groups or clusters where the observations within each group are as similar as possible.
Ultimately, the goal depends on the application. In marketing, clustering helps marketers uncover distinct customer groups within their base – and put that knowledge to work building targeted campaigns.
For instance, clustering might help an insurance company identify groups of motor insurance policyholders with a high average claim cost.
How a company uses clustering depends on its industry, business unit, and the objectives it’s looking to achieve.
Why does cluster analysis matter for business strategy
Cluster analysis can benefit a company in a number of ways, including how they market their products.
It shapes who they market those products to, which retention and sales strategies to employ, and how to assess prospective customers.
By clustering current customers, companies can assess their lifetime value against their likelihood of churning. This informs how they engage different customer segments and how to identify new high-value prospects.
What are the different types of clustering and when do you use them
There are five major clustering algorithms:
- Partitioning algorithms
- Hierarchical algorithms
- Density-based algorithms
- Grid-based algorithms
- Model-based algorithms
- Requires specifying the number of clusters upfront
- Can struggle with clusters of varying sizes and densities
- Sensitive to outliers
- Computationally intensive for large datasets
- Early clustering decisions cannot be undone
- Sensitive to noise and outliers
- Sensitive to parameter selection
- Can struggle with clusters of varying densities and high-dimensional data
- Can misclassify border points
- Heavily dependent on grid resolution
- May not capture clusters of arbitrary shapes
- Potential loss of detail
- Computationally expensive
- Requires correct model assumptions
- Sensitive to initial conditions and potential model misspecification.
What are the characteristics of a good cluster analysis?
A good cluster analysis accurately groups data in a way that’s useful and actionable. It uncovers real patterns in the data, leading to insights that drive decisions. A bad cluster analysis, on the other hand, creates misleading or arbitrary groups that don’t solve a problem or add value.
The characteristics of good cluster analysis are:
- Real-world usefulness: The clusters align with meaningful differences in behaviour, preferences, or traits that can be acted upon.
- Clear group separation: Each cluster is distinct, making it easy to interpret and apply.
- Consistency: The same input data should produce similar clusters every time.
- Scalability: The cluster analysis works effectively even as the dataset grows.
- Actionable insights: The clusters provide a clear direction for marketing, product development, or operations.
For example, imagine you’re segmenting B2B customers based on their buying habits. A good clustering model groups them into:
- High-volume buyers: Who need bulk discounts and priority service
- Seasonal buyers: Who respond well to time-sensitive promotions
- Low-frequency buyers: Who may need more nurturing and education
Each group can be targeted with a specific marketing strategy, improving conversions and increasing customer satisfaction.
In contrast, poor cluster analyses offer:
- Arbitrary clusters: The groups don’t represent meaningful patterns.
- Poor separation: Different clusters overlap too much to be useful.
- Overfitting: The model forces patterns that don’t exist.
- Inconsistent results: Running the same analysis multiple times leads to different clusters.
- No business application: The clusters don’t help answer any useful question.
Consider a marketing team that clusters customers based on the number of vowels in their company name. While mathematically possible, this grouping has zero business value – it doesn’t predict behaviour, preferences, or needs. The result? A useless segmentation that wastes time and resources.
What are the disadvantages of cluster analysis, and how can companies avoid problems?
Companies can avoid clustering pitfalls by:
- Validating results: Compare clusters with real-world data and confirm they make practical sense.
- Testing different algorithms: Try various clustering methods to find the most suitable one for your data.
- Carrying out regular updates: Update your clustering analysis periodically as data changes to keep results accurate.
- Using domain expertise: Work with subject matter experts to ensure clusters are meaningful and actionable.
How do you perform cluster analysis?
Step 1: Choose an analysis method
The first step in cluster analysis is choosing the analysis method, which depends on the size of the data and the types of variables.
Hierarchical clustering suits small datasets, for example, while k-means clustering works better for moderately large datasets where the number of clusters is known in advance.
Large datasets typically involve a mix of variable types and generally require a two-step procedure.
Step 2: Determine the number of cases
Once you’ve decided on an analysis method, begin by choosing the number of cases to divide into homogeneous groups or clusters. Those cases, or observations, can be any subject, person, or thing you want to analyse.
Step 3: Select variables for analysis
Next, choose which variables to include. There could be 1,000 variables, or even 10,000 or 25,000. The number and types of variables selected will determine which algorithm to use.
Step 4: Decide on variable standardisation
Then decide whether to standardise those variables so that each one contributes equally to the distance or similarity between cases. The analysis can be run with both standardised and unstandardised variables.
Step 5: Apply the chosen algorithm
Each analysis method takes a different approach.
- For k-means clustering, select the number of clusters. The algorithm then iteratively estimates cluster means and assigns each case to the cluster with the smallest distance to its mean.
- For hierarchical clustering, choose a statistic that measures how far apart or how similar two cases are.
Step 6: Finalise the number of clusters
Finally, the algorithm selects a method for forming groups and determines how many clusters are needed to represent the data. It assesses how similar the clusters are and splits them accordingly.
What do you do with the results of a cluster analysis?
Depending on the clustering method, there’s usually an associated visualisation – a common way to investigate results. For k-means clustering, x and y axes are typically used to show the distance between groups of observations.
This type of visualisation makes the groupings clearly apparent. For hierarchical clustering, a visualisation called a dendrogram is used, which shows the splits in the cut tree.
How do you make sure your cluster analysis is accurate?
First, assess cluster tendency. Before applying any clustering algorithm, check whether your dataset has the potential to form meaningful clusters or is simply randomly distributed.
One common approach is the Hopkins statistic, which measures how likely it is that your data is uniformly distributed. A value near 0 suggests a strong cluster tendency, while a value around 0.5 indicates randomness.
Visual tools like the visual assessment of cluster tendency (VAT) also help, by reordering the dissimilarity matrix to highlight potential clusters visually. If these tests confirm that your data naturally groups together, you can proceed with clustering. If not, clustering may not yield useful insights.
Next, determine the optimal number of clusters. Selecting the right number of clusters (k) is critical – too few may oversimplify the data, while too many can lead to overfitting.
The elbow method is one popular approach: Plot the within-cluster sum of squares against the number of clusters and look for the point where clustering performance improvements begin to level off – the ‘elbow.’ Another useful metric is the silhouette score, which evaluates how well each data point fits into its assigned cluster relative to the others. Higher silhouette scores indicate more distinct, well-separated clusters.
The gap statistic also helps by comparing observed within-cluster dispersion against what’s expected under a null distribution, making it easier to identify the optimal k where the gap is largest.
Finally, evaluate clustering quality. Once clusters are established, confirm that they are both internally cohesive and externally well-separated.
The silhouette coefficient, which ranges from −1 to 1, is widely used for this purpose – a score closer to 1 means the clusters are well defined. The Dunn index calculates the ratio between the smallest inter-cluster distance (between observations not in the same cluster) and the largest intra-cluster distance (within a cluster). Higher Dunn index values indicate better quality clusters. By contrast, the Davies–Bouldin index measures the average similarity between each cluster and its most similar one, with lower values indicating better clustering quality.
In summary, accurate cluster analysis comes down to a three-step process:
- Assess cluster tendency: Determine whether your data naturally forms clusters using statistical tests like the Hopkins statistic and visualisation tools such as VAT.
- Determine the optimal number of clusters: Identify the right number of clusters (k) using methods such as the elbow method, silhouette score, and gap statistic to avoid oversimplification or overfitting.
- Evaluate clustering quality: Confirm that your clusters are both compact and well separated using metrics such as the silhouette coefficient, Dunn index, and Davies-Bouldin index.
Getting started with cluster analysis
The core benefit of cluster analysis is that it helps businesses uncover patterns and relationships within their data, enabling them to make informed decisions and act on real-time insights.
Ready to get started with cluster analysis? The first step is finding a proven software tool that can help you analyse and interpret your data effectively.
Adobe Analytics turns real-time data into real-time insights. More than a web analytics solution, it collects data from every point in the customer journey and turns it into insights that guide your next best action. Analytics uses artificial intelligence (AI) to deliver predictive insights based on the full scope of your data, giving users the ability to view and manipulate data in real time.
Request a demo or watch the overview video to learn more about Adobe Analytics.