Back to Projects
Business Analytics / Retail

Customer Loyalty Analysis

Predictive modelling for a retail consumer goods company, isolating which of product quality, brand awareness, and negative publicity actually drives customer loyalty — and which combination of factors best justifies further investment.

Type
Regression Modelling
Domain
Retail / Consumer Goods
Methods
Linear Regression, Pearson Correlation
Status
Completed
LOYALTY DRIVERS
R² = 0.628
QUALITY • r = 0.713
NEG. PUBLICITY • r = -0.449
BRAND AWARENESS • r = 0.18

The Challenge

Product quality is the single strongest driver of customer loyalty (r = 0.713), far ahead of brand awareness (r = 0.18) — a finding that reset a retail consumer goods company's marketing investment priorities.

The company wanted to understand what actually drives customer loyalty, and how to prioritise limited marketing and product investment across quality, brand awareness, and reputation management. Intuition alone couldn't settle which lever mattered most, or how they interacted.

Approach

01
Exploratory Analysis
Examined distributions and relationships between loyalty and three candidate drivers: perceived product quality, brand awareness, and negative publicity impact.
02
Predictive Modelling
Built linear regression models predicting loyalty, evaluated with R², adjusted R², and residual sum of squares to assess genuine explanatory power rather than raw fit alone.
03
Model Experimentation
Tested every combination of the three predictor variables to isolate each factor's individual contribution, rather than relying on a single all-variables model.
04
Correlation Analysis
Ran Pearson correlation testing with significance values across all variable pairs to quantify both the strength and the statistical reliability of each relationship.

Results

r = 0.713
Quality vs loyalty — strong, highly significant positive correlation
r = -0.449
Negative publicity vs loyalty — moderate, highly significant negative correlation
R² = 0.628
Best model (all three variables); quality + publicity alone reaches 0.623

Product quality is the primary loyalty driver by a clear margin, and negative publicity has a real, substantial suppressing effect on loyalty. Brand awareness alone showed only a weak correlation (r = 0.18), meaning awareness campaigns in isolation are unlikely to move loyalty much without a quality story behind them.

A near-identical result came from just two variables, quality and negative publicity (R² = 0.623 vs 0.628 for all three), which matters practically: the company can track and act on two clear signals rather than maintaining a more complex, brand-awareness-inclusive model for negligible extra explanatory power.

Business Impact

The analysis produced a clear investment priority order: product quality first, proactive reputation management second, and brand awareness campaigns third, best deployed alongside quality messaging rather than as a stand-alone lever. It also gave the company a working predictive model to monitor and update as new customer data comes in, rather than a one-off snapshot.

Technology Stack

Python Pandas Scikit-learn Seaborn Matplotlib Linear Regression Pearson Correlation
Interested in this work or something similar?