Objective

Market segmentation divides a broad market into smaller groups of similar customers so a marketer can design a strategy for each group. Here we use hierarchical clustering, the same method from our Nov 5 lab, on our group’s Qualtrics movie theater survey. The goal is to see whether there are distinct types of moviegoers, and how each type could be targeted.

Dataset

The cleaned survey file (Movie_Survey_Clean.csv, n = 21) is the same one used in the EDA and regression. The first column is ID, so it is left out of the clustering. We cluster on nine variables:

library(readr)
mydata <- read_csv("Movie_Survey_Clean.csv")
mydata <- mydata[, c("ID", "Theater_freq", "Home_better", "Price_influence", "Ent_spend",
                     "Pts_low_price", "Pts_premium", "Pts_concessions", "Pts_showtimes", "Pts_proximity")]
summary(mydata[, -1])
##   Theater_freq    Home_better  Price_influence   Ent_spend      Pts_low_price  
##  Min.   :1.000   Min.   :1.0   Min.   :1.000   Min.   :   0.0   Min.   : 0.00  
##  1st Qu.:2.000   1st Qu.:3.0   1st Qu.:3.000   1st Qu.:  80.0   1st Qu.:20.00  
##  Median :3.000   Median :3.4   Median :3.000   Median : 200.0   Median :20.00  
##  Mean   :2.667   Mean   :3.4   Mean   :3.333   Mean   : 255.2   Mean   :33.33  
##  3rd Qu.:3.000   3rd Qu.:4.0   3rd Qu.:4.000   3rd Qu.: 400.0   3rd Qu.:50.00  
##  Max.   :4.000   Max.   :5.0   Max.   :5.000   Max.   :1000.0   Max.   :80.00  
##   Pts_premium    Pts_concessions Pts_showtimes   Pts_proximity  
##  Min.   : 0.00   Min.   : 0.00   Min.   : 0.00   Min.   : 0.00  
##  1st Qu.:10.00   1st Qu.:10.00   1st Qu.:10.00   1st Qu.:10.00  
##  Median :20.00   Median :20.00   Median :20.00   Median :10.00  
##  Mean   :16.43   Mean   :17.62   Mean   :16.43   Mean   :16.19  
##  3rd Qu.:20.00   3rd Qu.:20.00   3rd Qu.:20.00   3rd Qu.:20.00  
##  Max.   :50.00   Max.   :60.00   Max.   :30.00   Max.   :60.00

Standardize, build the distance matrix and plot the dendrogram

The variables are on very different scales (dollars, points out of 100, 0-5 ratings), so we standardize each one to a mean of 0 and a standard deviation of 1 before measuring distance. Otherwise spending in dollars would dominate.

use <- scale(mydata[, -1], center = TRUE, scale = TRUE)
d <- dist(use)                       # Euclidean distance between respondents
seg.hclust <- hclust(d)              # complete linkage (the default, as in the lab)
plot(seg.hclust, labels = mydata$ID, main = "Dendrogram of moviegoers", xlab = "Respondent ID", sub = "")
rect.hclust(seg.hclust, k = 3, border = c("#8C1C2B", "#D99A1E", "#2E4057"))

Cluster membership

groups.3 <- cutree(seg.hclust, 3)
table(groups.3)
## groups.3
##  1  2  3 
## 12  7  2
mydata$ID[groups.3 == 1]
##  [1]  1  2  3  4  7  8  9 10 11 17 19 21
mydata$ID[groups.3 == 2]
## [1]  5  6 13 14 15 16 18
mydata$ID[groups.3 == 3]
## [1] 12 20

Profiling each cluster

Following the lab, we use mydata[,-1] with aggregate so the ID column is not averaged. Medians describe the typical member, and means show the pull of larger values.

aggregate(mydata[, -1], list(cluster = groups.3), median)
##   cluster Theater_freq Home_better Price_influence Ent_spend Pts_low_price
## 1       1            3           4            3.00        95            20
## 2       2            2           2            3.33       400            50
## 3       3            3           3            3.00        30             5
##   Pts_premium Pts_concessions Pts_showtimes Pts_proximity
## 1          20              15            20            20
## 2          10              10            10            10
## 3          35              40            15             5
cluster_means <- aggregate(mydata[, -1], list(cluster = groups.3), mean)
round(cluster_means, 2)
##   cluster Theater_freq Home_better Price_influence Ent_spend Pts_low_price
## 1       1         2.92        3.95            3.11    181.67         25.83
## 2       2         2.14        2.57            3.81    445.71         54.29
## 3       3         3.00        3.00            3.00     30.00          5.00
##   Pts_premium Pts_concessions Pts_showtimes Pts_proximity
## 1       16.25           14.17         21.25         22.50
## 2       11.43           17.14          8.57          8.57
## 3       35.00           40.00         15.00          5.00
library(dplyr)
library(tidyr)
library(ggplot2)
 
profile <- as.data.frame(use) %>%
  mutate(cluster = factor(groups.3)) %>%
  pivot_longer(-cluster, names_to = "variable", values_to = "z") %>%
  group_by(cluster, variable) %>%
  summarise(mean_z = mean(z), .groups = "drop")
 
ggplot(profile, aes(x = mean_z, y = variable, fill = cluster)) +
  geom_col(position = "dodge") +
  geom_vline(xintercept = 0) +
  scale_fill_manual(values = c("#8C1C2B", "#D99A1E", "#2E4057")) +
  labs(title = "Cluster profiles (standardized means; 0 = sample average)",
       x = "Standard deviations from the average", y = NULL, fill = "Cluster") +
  theme_minimal()

Export results

write.csv(data.frame(ID = mydata$ID, cluster = groups.3), "clusterID.csv", row.names = FALSE)
write.csv(cluster_means, "cluster_means.csv", row.names = FALSE)

Interpretation: three moviegoer segments

Cluster 1, “Home-leaning viewers” (12 of 21). This is the largest group. They agree most strongly that watching at home is better (mean 3.95 of 5) and go to the theater less often (mean code 2.92). They spread their 100 points fairly evenly. Low price is still their top feature (25.8 points), but far below cluster 2, and proximity (22.5) and showtimes (21.3) are close behind. They spend about $182 a month on entertainment.

Cluster 2, “Value-seeking regulars” (7 of 21). These respondents go to the theater most often (mean code 2.14) and spend the most on entertainment (about $446 a month). They care most about price: they give low ticket price 54 of 100 points on average and rate price influence highest (3.81). They are the least likely to say home is better (2.57). They are heavy users who want a deal.

Cluster 3, “Experience seekers” (2 of 21). Only two respondents, who spend little ($30 a month) but give most of their points to premium formats (35) and concessions (40) and almost none to price (5). The group is too small to treat as a real segment, but it hints at a premium-experience niche worth checking with a larger sample.

Targeting ideas

Limitations. With 21 respondents the clusters are small and sensitive to the linkage method. Ward’s method, for example, splits the sample 11 / 4 / 6. The segments should be treated as exploratory.

AI Usage Disclaimer

I used AI tools to assist in creating the R Markdown (RMD) file for this project, adapting the Nov 5 hierarchical clustering lab to our survey data. AI was also used to help organize the code and troubleshoot errors. The analysis, interpretation of results, and final review were conducted to ensure the accuracy and relevance of the project.