Sitemap

Doing Customer Segmentation, Corelation and Pipe function with R

5 min readMay 12, 2025

--

Summary of this Self-made Project

Habit tracker is one of the value propositions we offer to our users.
Finding the right UX, business, and marketing strategies that fit our users is essential.

I conducted clustering on the dataset and found that the “Young & Most Consistent” is the most frequent user group, using the habit tracker 3–4 days per week. The average age of this cluster is 30.51 years, with an age range from 19 to 45 years. On average, they spend 23.98 minutes per day using the habit tracker.

The user group with the longest daily app usage is “Tinkering Middle-Aged”, with an average of 70 minutes per day, ranging from 59 to 90 minutes. This insight led me to plan two follow-up research studies:

  1. To uncover why this cluster has such long usage durations, and
  2. To explore why they rarely use the habit tracker, despite being highly engaged in general app usage.

Another question this research addressed is the correlation between habit tracker usage and app satisfaction score.The result shows no significant correlation between the two variables. This indicates that the habit tracker may not have a strong impact on overall user satisfaction. To understand the factors influencing the average satisfaction score, further research will be needed.

Project brief
You’re working as a UX Researcher for a mobile health & fitness app. The product team recently launched a new habit tracker feature (e.g., tracking water intake, sleep, steps), and they want to understand user engagement and satisfaction with this feature.

Business Goal
Improve retention and feature adoption by:

  • Understanding who uses the habit tracker
  • Identifying behaviors linked with high satisfaction
  • Recommending feature improvements based on quantitative insights
Press enter or click to view image in full size
Photo by Edgar Chaparro on Unsplash

The Dataset

  • user_id
  • age
  • gender
  • daily_active_minutes
  • habit_tracker_uses (past 7 days)
  • app_satisfaction_score (1–5)
  • subscription_type (free/premium)
  • retained_after_30_days (TRUE/FALSE)

Research Question

  1. What types of users are actively using the habit tracker?
  2. Is there a correlation between habit tracker usage and app satisfaction?
  3. What demographic or behavioral factors predict frequent usage?

What types of users are actively using the habit tracker?

I just directly use K-Means clustering algorithm to try answer the question completely.

Here’s how the K-Means clustering was done:

set.seed(1)
segmentasi <- kmeans(x = projek1[, c("age", "habit_tracker_uses", "daily_active_minutes")], centers = 5, nstart = 25)

centers =5 is good enough. I am not overfitting the model.

The term “users actively using habit tracker” needs to be defined more clearly. After checking the dataset, it turns out the data is tracked over a 7-day period. From the 5 clusters, it’s the “Young & Most Consistent” cluster that uses the habit tracker the most frequently. On average, they used it 3.47 days per week (so about 3–4 times a week).

The standard we used is: using the habit tracker once a day within a week. So in this case, they use it daily — meaning they’re already considered engaged/consistent.

This Young & Most Consistent cluster has an average age of 30.51 years, with an age range from 19 to 45 years. Their average usage time per day is 23.98 minutes, and their weekly usage frequency is 3–4 days.

What type of user has the longest duration per day?

Again using the data of kmean algortihm, I found out that “Tinkering Middle-Aged” Cluster, with an average daily usage duration of 70 minutes, ranging from 59 to 90 minutes.

This might be because this cluster is dominated by users aged 29–44 years — an age group full of exploratory energy, eager to try out and play around with the app.

However, they rarely use the Habit Tracker feature — only about 2–3 days a week.

From these two facts, we can generate follow-up projects for evaluation and product improvement:

  • 🧠 Find out why users in the Tinkering Middle-Aged Cluster spend so much time in the app
  • 🤔 Discover the reason why they rarely use the Habit Tracker feature

What age group dominates our app?

I am working with the dataset and try to find out what age group is dominating the app.

pipeumur<-projek1 %>% 
arrange(age) %>%
count(age)

Our app is mostly dominated by users aged 35–44 and 45–52 years, with 72 and 77 users in each range, respectively. With this insight, we can craft marketing strategies tailored to these two age groups.

Each group has slightly different characteristics:

  • 35–44 years old are typically focused on building a stable career and starting a family.
  • 45–52 years old tend to be in a phase of evaluation and reflection, aiming for complete stability in life.

Here’s the full age distribution:

  • 18–24 = 52 users
  • 25–34 = 62 users
  • 35–44 = 72 users
  • 45–54 = 77 users
  • >55 = 37 users

Is there a relationship between habit tracker usage and app satisfaction score?

I tried checking by running some code in R using the cor() function:

cor(projek1$habit_tracker_uses, projek1$app_satisfaction_score)

From this, I got a correlation coefficient of 0.03427752 — which means the relationship is positive but not significant. A result is considered not significant when the coefficient is closer to zero. On the flip side, it’s considered significant the closer it is to 1 (or -1 for negative correlation).

So the conclusion is:
There’s no meaningful relationship between satisfaction score and the number of times users use the habit tracker. This suggests that the habit tracker may not be a key driver of overall user satisfaction. User could be happy because of other feature that we already have. The follow up question would be:

  • does habit tracker still relate to this time?
  • do we need to re-design the habit tracker?
  • is it just impacted to our niche user? Do we need to cater that niche user?

Recommendation

  • Please formulate strategic business and marketing according to the segmentation so we could help them to
  • Now we have customer segmentation therefore creating Customer Relation Management is a better move to servicing our customer.
  • Let us discuss whether we should focus on each segmentation or focus on one majority of the cluster?
  • We could create another main feature using the segmentation while we improve the existing habit tracker.
  • Habit tracker is not the key driver on satisfaction score. I think we need to reconsider other feature to be main feature.

--

--

adrian.pramiadi
adrian.pramiadi

Written by adrian.pramiadi

How do you…? Show me how you do it? Do you have something in mine about this? What is your biggest concern? Would you please elaborate? I just want to wrap up.