Cluster analysis is a statistical method that identifies and groups similar data points together, whilst highlighting the differences between distinct groups.
Consider a clothing retailer segmenting customers by purchasing behaviour – frequent buyers, seasonal shoppers, or one-time purchasers. Cluster analysis enables businesses to identify these groups and tailor their marketing strategies, from targeted advertisements to personalised offers.
In marketing, the purpose of cluster analysis is to segment consumers into distinct groups with shared characteristics. This enables businesses to 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?
- How do you 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 – it operates without any predefined categories, definitions, or expectations from the outset. As a statistical data mining technique, it groups observations that share similarities whilst distinguishing them from other groups.
A useful way to understand clustering is to picture someone sorting through a box of assorted chocolates. That person will naturally have preferences for certain types of chocolate.
As they work through the box, there are many ways to group the chocolates: milk versus dark, with nuts or without, nougat or no nougat, and so on.
The process of sorting chocolates into groups based on shared characteristics is, in essence, clustering – and it is something we all do instinctively.
An ecommerce platform, for instance, might group customers by purchasing behaviour – distinguishing budget-conscious shoppers from premium product buyers and occasional browsers. This segmentation enables the platform to create tailored promotions for each group, driving engagement and sales.
Understanding cluster analysis
Cluster analysis sits at the forefront of data analysis, which explains why sectors such as 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 widely used. The approach an organisation adopts depends on what is being analysed and why. Visualisation techniques such as scatter plots and dendrograms allow businesses to present their cluster analysis results in a clear and accessible way.
What is the purpose of clustering datasets?
The primary purpose of cluster analysis in marketing is to build groups, or clusters, ensuring that observations within each group are as similar to one another as possible.
In practice, the purpose varies by application. In marketing, clustering helps marketers uncover distinct groups within their customer base, which they can then use to develop targeted marketing campaigns.
Clustering may help an insurance company identify, for example, groups of motor insurance policyholders with a high average claim cost.
How an organisation intends to apply clustering determines its purpose. This is shaped primarily by the industry, the business unit involved, and the outcomes the organisation is looking to achieve.
Why is cluster analysis important for business strategy?
Cluster analysis can benefit an organisation in several ways, including shaping how it markets its products.
It can determine which audiences those products are marketed to, what retention and sales strategies are appropriate, and how prospective customers are evaluated.
By clustering existing customers, organisations can assess their lifetime value against attrition risk. This intelligence informs how they communicate with different customer segments and how to identify new high-value prospects.
What are the different types of clustering and when should you use them?
Five major clustering algorithms are in common use:
- Partitioning algorithms
- Hierarchical algorithms
- Density-based algorithms
- Grid-based algorithms
- Model-based algorithms
- Requires the number of clusters to be specified in advance
- May not perform well with clusters of varying sizes and densities
- Sensitive to outliers
- Computationally intensive for large datasets
- Early clustering decisions cannot be reversed
- Sensitive to noise and outliers
- Sensitive to parameter selection
- May not perform well with clusters of varying densities or 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 groups data accurately in ways that are both useful and actionable. It surfaces genuine patterns, yielding insights that inform sound decisions. A bad cluster analysis, by contrast, produces misleading or arbitrary groupings that neither solve a problem nor add value.
The characteristics of good cluster analysis are:
- Real-world usefulness: The clusters reflect meaningful differences in behaviour, preferences, or traits that can be acted upon.
- Clear group separation: Each cluster is distinct, making it straightforward to interpret and apply.
- Consistency: The same input data should produce similar clusters every time.
- Scalability: The cluster analysis remains effective as the dataset grows.
- Actionable insights: The clusters offer clear direction for marketing, product development, or operations.
For example, consider segmenting B2B customers based on their purchasing habits. A well-constructed clustering model groups them into:
- High-volume buyers: Who require bulk discounts and priority service
- Seasonal buyers: Who respond well to time-sensitive promotions
- Low-frequency buyers: Who may benefit from additional nurturing and education
Each group can be targeted with a tailored marketing strategy, improving conversions and increasing customer satisfaction.
By contrast, poor cluster analyses produce:
- Arbitrary clusters: The groups don’t represent meaningful patterns.
- Poor separation: Clusters overlap too much to be of practical use.
- Overfitting: The model imposes patterns that don’t exist.
- Inconsistent results: Repeating the same analysis yields different clusters each time.
- No business application: The clusters don’t address any meaningful question.
To illustrate, suppose a marketing team clusters customers based on the number of vowels in their company name. While mathematically possible, this grouping has no business value – it doesn’t predict behaviour, preferences, or needs. The outcome is a meaningless segmentation that wastes time and resources.
What are the disadvantages of cluster analysis, and how can companies avoid problems?
Organisations can avoid common clustering pitfalls by:
- Validating results: Compare clusters with real-world data and confirm they are practically meaningful.
- Testing different algorithms: Experiment with various clustering methods to identify the most suitable approach for your data.
- Carrying out regular updates: Periodically update the clustering analysis as your data evolves to maintain accuracy.
- 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 selecting an analysis method. The appropriate choice will depend on the size of the dataset and the types of variables involved.
Hierarchical clustering, for example, suits smaller datasets, whilst k-means clustering is better suited to moderately large datasets where the number of clusters is known in advance.
Large datasets typically involve a mixture of variable types and generally require a two-step procedure.
Step 2: Determine the number of cases
Once you have decided on the analysis method, determine how many cases to subdivide into homogeneous groups or clusters. These cases, or observations, can be any subject, person, or thing you wish to analyse.
Step 3: Select variables for analysis
Next, select the variables to include. There may be 1,000 variables, or even 10,000 or 25,000. The number and types of variables chosen will determine which type of algorithm to use.
Step 4: Decide on variable standardisation
Decide whether to standardise the 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 the cluster means and assigns each case to the cluster whose mean is nearest.
- For hierarchical clustering, choose a statistic that quantifies how similar or how far apart two cases are.
Step 6: Finalise the number of clusters
Finally, the algorithm selects a method for forming the 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?
Most clustering methods have an associated visualisation, which is widely used to investigate results. For k-means clustering, it is common to plot x and y axes showing 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, showing the splits in the cut tree.
How do you ensure your cluster analysis is accurate?
Begin by assessing cluster tendency. Before applying any clustering algorithm, verify whether your dataset has the potential to form meaningful clusters or whether it is randomly distributed.
The Hopkins statistic is a widely used method for this purpose. It measures the probability that your data is uniformly distributed. A value near 0 indicates a strong cluster tendency, whilst a value around 0.5 suggests that the data is essentially random.
Visual tools such as the Visual Assessment of cluster Tendency (VAT) complement this approach by reordering the dissimilarity matrix to highlight potential clusters. If these tests confirm that your data naturally groups together, you can proceed with clustering. If not, clustering may not yield meaningful insights.
The next step is to determine the optimal number of clusters. Selecting the right number of clusters (k) is critical, as too few may oversimplify the data whilst too many can result in overfitting.
One well-established approach is the elbow method: Plot the within-cluster sum of squares against the number of clusters and identify the point at which improvements in clustering performance begin to level off – the ‘elbow’. The silhouette score provides another useful measure, evaluating how well each data point fits within its assigned cluster relative to others. Higher silhouette scores indicate more distinct and well-separated clusters.
The gap statistic provides a further check, comparing observed within-cluster dispersion against the dispersion expected under a null distribution. This helps to identify the optimal k by pinpointing where the gap is at its greatest.
Finally, evaluate the quality of your clusters. Having established them, it is important to confirm that they are both internally cohesive and clearly separated from one another.
The silhouette coefficient, which ranges from −1 to 1, is widely used for this purpose – a score closer to 1 indicates well-defined clusters. The Dunn index calculates the ratio of the smallest distance between observations in different clusters (inter-cluster distance) to the largest distance within a single cluster (intra-cluster distance), with higher values indicating better cluster quality. By contrast, the Davies–Bouldin index measures the average similarity between each cluster and its most similar counterpart, where lower values indicate better clustering quality.
In summary, ensuring accurate cluster analysis involves a three-step process:
- Assess cluster tendency: Determine whether your data naturally forms clusters using statistical tests such as 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 principal benefit of cluster analysis is that it enables organisations to uncover patterns and relationships within their data, supporting informed decision-making and actions grounded in real-time insights.
If you are ready to get started with cluster analysis, the first step is to identify a reliable 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 draws on data from every point in the customer journey and converts it into an insight that guides your next best action. Analytics uses artificial intelligence (AI) to deliver predictive insights based on the full scope of your data, enabling users to view and manipulate data in real time.
Request a demo or watch the overview video to find out more about Adobe Analytics.