Data science study

Starbucks Customer Behavior Analysis

A data science study of customer purchasing behavior: who buys, how much, and which customer groups respond differently.

Jupyter notebook with Starbucks customer income and spending visualizations

The challenge

Understand purchasing patterns and explore meaningful customer segments. The project looks at how demographics and income relate to spending, and whether different customer groups engage with the brand differently.

The approach

The analysis starts with cleaning and exploratory visualization of the key distributions, then tests relationships between variables with chi-squared tests before building K-NN and regression models to predict purchasing behavior.

  • Exploratory analysisDistributions of age, income and spending across demographic groups.
  • Hypothesis testingChi-squared tests on demographic and spending relationships.
  • Predictive modelingK-NN classification and regression to model purchasing behavior.

Analysis workflow

  1. 01CleanHandle missing values and encode features
  2. 02ExploreVisualize key distributions
  3. 03TestChi-squared on relationships
  4. 04ModelK-NN and regression

Tools

  • Python
  • Pandas
  • Scikit-Learn
  • Seaborn
  • Matplotlib
  • JupyterLab
Next projectClarityGPTClarityGPT dashboard with a sidebar of generative tools and a conversation view