Market Segmentation

Market segmentation is a strategy that divides a broad target market into smaller groups of customers with similar characteristics. Cluster analysis can help identify these different customer groups.

Import Data

library(readr)
mydata <- read_csv("Segmentation.csv")
## Rows: 221 Columns: 22
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (22): ID, Fashn, Price, Convnience, ShpTime, Fitness, Perceptn, ChNoise,...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

Standardize Data and Create Hierarchical Clusters

use = scale(mydata[,-c(1)], center = TRUE, scale = TRUE)

dist = dist(use)

d <- dist(as.matrix(dist))

seg.hclust <- hclust(d)

plot(seg.hclust)

Identify Cluster Membership

groups.3 = cutree(seg.hclust, 3)

table(groups.3)
## groups.3
##   1   2   3 
##   9 170  42
mydata$ID[groups.3 == 1]
## [1]   1   3  16  59  98 101 143 167 170
mydata$ID[groups.3 == 2]
##   [1]   2   5   6   7   8  10  14  15  18  20  21  22  23  24  25  26  27  28
##  [19]  29  30  32  33  35  36  37  38  39  40  41  42  43  44  45  46  47  49
##  [37]  51  52  54  55  56  60  61  62  63  64  67  68  69  70  71  72  73  74
##  [55]  76  78  79  80  82  83  84  85  88  89  90  91  92  93  94  96  97  99
##  [73] 103 106 107 108 110 113 114 115 117 119 120 121 122 123 124 125 126 127
##  [91] 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 144 145 146
## [109] 147 148 150 151 153 154 156 157 158 159 160 161 162 163 164 165 166 168
## [127] 171 173 174 175 176 178 179 180 181 182 183 184 185 186 187 188 189 190
## [145] 192 193 195 196 197 198 199 201 202 203 204 205 207 208 209 210 211 212
## [163] 213 214 216 217 218 219 220 221
mydata$ID[groups.3 == 3]
##  [1]   4   9  11  12  13  17  19  31  34  48  50  53  57  58  65  66  75  77  81
## [20]  86  87  95 100 102 104 105 109 111 112 116 118 149 152 155 169 172 177 191
## [39] 194 200 206 215

Identify Common Features of Each Cluster

aggregate(mydata, list(groups.3), median)
##   Group.1    ID Fashn Price Convnience ShpTime Fitness Perceptn ChNoise
## 1       1  98.0     1     5          5       5       3        3       6
## 2       2 122.5     3     5          3       4       6        5       4
## 3       3  91.0     2     5          4       5       6        4       5
##   RetailEx KnowdgStaf Brand4Slf Brand4Els Populr StrDisp SaleStaf Fabric Cut
## 1      6.0          6         1         1    1.0       1        2    1.0   4
## 2      6.0          5         4         4    4.0       4        5    6.0   6
## 3      5.5          5         2         2    1.5       2        4    5.5   6
##   Seam ShpOHngr ShpOBody Colrs Match
## 1  1.0        1      4.0     4     1
## 2  5.5        4      7.0     6     4
## 3  5.0        4      6.5     5     2
aggregate(mydata, list(groups.3), mean)
##   Group.1        ID    Fashn    Price Convnience  ShpTime  Fitness Perceptn
## 1       1  84.22222 2.111111 5.555556   5.000000 5.000000 4.000000 3.222222
## 2       2 116.28235 3.352941 4.623529   3.582353 3.905882 5.917647 4.411765
## 3       3  95.35714 2.833333 4.666667   4.238095 4.595238 5.309524 3.928571
##    ChNoise RetailEx KnowdgStaf Brand4Slf Brand4Els   Populr  StrDisp SaleStaf
## 1 4.666667 5.444444   5.111111  1.666667  1.444444 1.777778 2.000000 3.444444
## 2 4.070588 5.300000   4.676471  4.111765  4.423529 4.064706 3.676471 4.535294
## 3 4.452381 5.119048   4.523810  2.761905  2.619048 2.404762 3.023810 4.119048
##     Fabric      Cut     Seam ShpOHngr ShpOBody    Colrs    Match
## 1 2.888889 3.333333 1.444444 2.333333 3.777778 3.222222 1.333333
## 2 5.658824 6.017647 5.341176 4.364706 6.458824 5.482353 4.323529
## 3 4.857143 5.785714 4.761905 3.619048 6.190476 4.595238 3.190476
aggregate(mydata[,-1], list(groups.3), median)
##   Group.1 Fashn Price Convnience ShpTime Fitness Perceptn ChNoise RetailEx
## 1       1     1     5          5       5       3        3       6      6.0
## 2       2     3     5          3       4       6        5       4      6.0
## 3       3     2     5          4       5       6        4       5      5.5
##   KnowdgStaf Brand4Slf Brand4Els Populr StrDisp SaleStaf Fabric Cut Seam
## 1          6         1         1    1.0       1        2    1.0   4  1.0
## 2          5         4         4    4.0       4        5    6.0   6  5.5
## 3          5         2         2    1.5       2        4    5.5   6  5.0
##   ShpOHngr ShpOBody Colrs Match
## 1        1      4.0     4     1
## 2        4      7.0     6     4
## 3        4      6.5     5     2
aggregate(mydata[,-1], list(groups.3), mean)
##   Group.1    Fashn    Price Convnience  ShpTime  Fitness Perceptn  ChNoise
## 1       1 2.111111 5.555556   5.000000 5.000000 4.000000 3.222222 4.666667
## 2       2 3.352941 4.623529   3.582353 3.905882 5.917647 4.411765 4.070588
## 3       3 2.833333 4.666667   4.238095 4.595238 5.309524 3.928571 4.452381
##   RetailEx KnowdgStaf Brand4Slf Brand4Els   Populr  StrDisp SaleStaf   Fabric
## 1 5.444444   5.111111  1.666667  1.444444 1.777778 2.000000 3.444444 2.888889
## 2 5.300000   4.676471  4.111765  4.423529 4.064706 3.676471 4.535294 5.658824
## 3 5.119048   4.523810  2.761905  2.619048 2.404762 3.023810 4.119048 4.857143
##        Cut     Seam ShpOHngr ShpOBody    Colrs    Match
## 1 3.333333 1.444444 2.333333 3.777778 3.222222 1.333333
## 2 6.017647 5.341176 4.364706 6.458824 5.482353 4.323529
## 3 5.785714 4.761905 3.619048 6.190476 4.595238 3.190476
cluster_means <- aggregate(mydata[,-1], list(groups.3), mean)

cluster_means
##   Group.1    Fashn    Price Convnience  ShpTime  Fitness Perceptn  ChNoise
## 1       1 2.111111 5.555556   5.000000 5.000000 4.000000 3.222222 4.666667
## 2       2 3.352941 4.623529   3.582353 3.905882 5.917647 4.411765 4.070588
## 3       3 2.833333 4.666667   4.238095 4.595238 5.309524 3.928571 4.452381
##   RetailEx KnowdgStaf Brand4Slf Brand4Els   Populr  StrDisp SaleStaf   Fabric
## 1 5.444444   5.111111  1.666667  1.444444 1.777778 2.000000 3.444444 2.888889
## 2 5.300000   4.676471  4.111765  4.423529 4.064706 3.676471 4.535294 5.658824
## 3 5.119048   4.523810  2.761905  2.619048 2.404762 3.023810 4.119048 4.857143
##        Cut     Seam ShpOHngr ShpOBody    Colrs    Match
## 1 3.333333 1.444444 2.333333 3.777778 3.222222 1.333333
## 2 6.017647 5.341176 4.364706 6.458824 5.482353 4.323529
## 3 5.785714 4.761905 3.619048 6.190476 4.595238 3.190476

Export Cluster Analysis Results

write.csv(groups.3, "clusterID.csv")

write.csv(cluster_means, "cluster_means.csv")

Discussion Questions

1. How many observations do we have in each cluster?

Answer: There are 9 observations in Cluster 1, 170 observations in Cluster 2, and 42 observations in Cluster 3. There are 221 observations total.

2. We can look at the medians (or means) for the variables in each cluster. Why is this important?

Answer: Looking at the means or medians is important because it helps us understand the characteristics and preferences of each customer group. It shows what each cluster values more or less compared to the other clusters.

3. Do you think mean or median should be used when it comes to analyzing the differences among different clusters? Why?

Answer: I think the mean should be used because it makes it easier to compare the average responses between each cluster and understand the differences in customer preferences.

4. What summary measures of each cluster are appropriate in a descriptive sense?

Answer: The means, medians, and size of each cluster are appropriate because they help us understand the characteristics and preferences of each customer group and compare the groups to one another.

5. Any major differences between K-means clustering and Hierarchical clustering? Which one do you like better? Why?

Answer: K-means clustering requires you to choose the number of clusters beforehand, while hierarchical clustering builds the clusters step-by-step and can be displayed using a dendrogram. I prefer hierarchical clustering because the dendrogram makes it easier for me to visualize how the different groups are formed.

6. Do a keyword search using “cluster analysis.” How many relevant job titles are there?

Answer: I found over 2,000 job results on Indeed using the keyword “cluster analysis.” Some relevant job titles included Market Research & Analysis Manager, Analytics Consultant, Research Analyst, and Data Analyst. This shows that cluster analysis can be used in many different careers, especially those involving marketing, research, and data analytics.

Interpretation of Results

The cluster analysis divided the 221 respondents into three different customer segments.

Cluster 1 - Price and Convenience Focused: Cluster 1 contained 9 respondents. This group had the highest average score for price at 5.56 and also had relatively high scores for convenience and shopping time. They had lower scores for fashion, brands, popularity, and several product characteristics. This suggests that these customers are more focused on price and convenience than fashion or brand image.

Cluster 2 - Fashion and Product Focused: Cluster 2 was the largest group with 170 respondents. This group had higher scores for factors such as fitness, fabric, cut, seam, colors, shopping on body, and brand. This suggests that these customers care more about how the product looks, fits, and feels.

Cluster 3 - Fit and Quality Focused: Cluster 3 contained 42 respondents. This group also had high scores for cut, shopping on body, fitness, and fabric, but they were less concerned with brands and popularity than Cluster 2. This suggests that they care about fit and product quality but are less concerned about brand image and popularity.

Overall, the results show how cluster analysis can divide consumers into groups based on similar preferences. Marketers can use these segments to create different targeting strategies based on what each group values.