How would you design an experiment to determine the optimal number of clusters for a customer segmentation analysis?

Instruction: Outline the steps you would take, including any statistical methods and metrics for evaluation.

Context: This question assesses the candidate's ability to apply clustering techniques and evaluate the optimal number of clusters using statistical methods, an essential skill in data-driven decision-making.

Updated

Official answer

There is no universally correct number of customer clusters. Define the purpose, observation window and usable features first. A useful segmentation for support staffing may differ from one for product research.

Compare a defensible range of candidate cluster counts on training data after appropriate scaling and missing-data handling. For k-means, within-cluster squared distance decreases as more clusters are added; an elbow is a heuristic, and a clear elbow may not exist. Silhouette scores describe separation under the selected distance measure and can favor some cluster shapes over others. Neither score proves that the groups are meaningful customer types.

Check stability across initializations, resampled data and relevant time periods. Inspect cluster sizes, interpretable differences and whether new customers can be assigned consistently. Fit preprocessing and segmentation without using future outcomes or the final evaluation sample to choose a flattering result.

If the goal is a targeted intervention, freeze the segmentation before a separate randomized evaluation of that intervention. Compare the targeting policy with a justified alternative and measure actual outcomes and costs. That experiment tests the policy's value; it does not prove that the chosen cluster count is a unique natural truth.

Assessment: State the decision criterion, recognize conflicting metrics, and separate exploratory structure from causal evidence about an intervention.

Source

scikit-learn: clustering evaluation.

Related Questions