This EDA explores how respondents’ attitudes and entertainment spending relate to movie theater attendance.
The dependent variable is Theater_freq. Higher codes
mean respondents go to the theater less often. The
predictors are Home_better, Price_influence,
and Ent_spend. The dataset contains 21 responses, so treat
the patterns as exploratory.
survey <- read_csv("Movie_Survey_Clean(in).csv", show_col_types = FALSE)
vars <- c("Theater_freq", "Home_better", "Price_influence", "Ent_spend")
glimpse(select(survey, all_of(vars)))
## Rows: 21
## Columns: 4
## $ Theater_freq <dbl> 4, 2, 2, 3, 2, 1, 3, 4, 3, 3, 3, 3, 2, 1, 3, 4, 3, 2, …
## $ Home_better <dbl> 5.0, 3.0, 4.0, 4.0, 2.0, 1.0, 4.0, 5.0, 4.0, 4.0, 4.0,…
## $ Price_influence <dbl> 1.00, 5.00, 1.00, 3.33, 5.00, 3.33, 3.00, 5.00, 4.00, …
## $ Ent_spend <dbl> 90, 80, 50, 400, 300, 120, 90, 500, 200, 100, 0, 0, 50…
summary(survey[vars])
## Theater_freq Home_better Price_influence Ent_spend
## Min. :1.000 Min. :1.0 Min. :1.000 Min. : 0.0
## 1st Qu.:2.000 1st Qu.:3.0 1st Qu.:3.000 1st Qu.: 80.0
## Median :3.000 Median :3.4 Median :3.000 Median : 200.0
## Mean :2.667 Mean :3.4 Mean :3.333 Mean : 255.2
## 3rd Qu.:3.000 3rd Qu.:4.0 3rd Qu.:4.000 3rd Qu.: 400.0
## Max. :4.000 Max. :5.0 Max. :5.000 Max. :1000.0
summary_table <- survey %>%
select(all_of(vars)) %>%
pivot_longer(
cols = everything(),
names_to = "Variable",
values_to = "Value"
) %>%
group_by(Variable) %>%
summarise(
n = sum(!is.na(Value)),
Mean = mean(Value, na.rm = TRUE),
Median = median(Value, na.rm = TRUE),
SD = sd(Value, na.rm = TRUE),
Min = min(Value, na.rm = TRUE),
Max = max(Value, na.rm = TRUE),
.groups = "drop"
) %>%
mutate(across(where(is.numeric), ~ round(.x, 2)))
kable(summary_table, caption = "Summary statistics for the outcome and predictors")
| Variable | n | Mean | Median | SD | Min | Max |
|---|---|---|---|---|---|---|
| Ent_spend | 21 | 255.24 | 200.0 | 246.97 | 0 | 1000 |
| Home_better | 21 | 3.40 | 3.4 | 1.16 | 1 | 5 |
| Price_influence | 21 | 3.33 | 3.0 | 1.26 | 1 | 5 |
| Theater_freq | 21 | 2.67 | 3.0 | 0.86 | 1 | 4 |
ggplot(survey, aes(x = factor(Theater_freq))) +
geom_bar(fill = "steelblue") +
labs(
title = "Movie theater visit frequency",
subtitle = "Higher Theater_freq codes mean going less often",
x = "Theater_freq code",
y = "Number of respondents"
) +
theme_minimal()
survey %>%
select(Home_better, Price_influence) %>%
pivot_longer(
cols = everything(),
names_to = "Question",
values_to = "Agreement"
) %>%
ggplot(aes(x = Agreement)) +
geom_histogram(binwidth = 1, boundary = 0.5,
fill = "steelblue", color = "white") +
facet_wrap(~ Question) +
scale_x_continuous(breaks = 0:5) +
labs(
title = "Responses to the attitude questions",
subtitle = "0 = strongly disagree; 5 = strongly agree",
x = "Agreement score",
y = "Number of respondents"
) +
theme_minimal()
ggplot(survey, aes(x = Ent_spend)) +
geom_histogram(bins = 10, fill = "steelblue", color = "white") +
labs(
title = "Monthly entertainment spending",
x = "Dollars per month",
y = "Number of respondents"
) +
theme_minimal()
ggplot(survey, aes(y = Ent_spend)) +
geom_boxplot(fill = "steelblue", alpha = 0.5) +
labs(
title = "Monthly entertainment spending and possible outliers",
y = "Dollars per month"
) +
theme_minimal()
The points show individual respondents. The fitted lines are descriptive linear trends.
ggplot(survey, aes(x = Home_better, y = Theater_freq)) +
geom_jitter(width = 0.08, height = 0.08, size = 3,
alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", se = TRUE, color = "grey20") +
labs(
title = "Home-viewing preference and theater frequency",
x = "Watching at home is better (0–5)",
y = "Theater_freq code (higher = less often)"
) +
theme_minimal()
ggplot(survey, aes(x = Price_influence, y = Theater_freq)) +
geom_jitter(width = 0.08, height = 0.08, size = 3,
alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", se = TRUE, color = "grey20") +
labs(
title = "Price influence and theater frequency",
x = "Prices strongly influence me (0–5)",
y = "Theater_freq code (higher = less often)"
) +
theme_minimal()
ggplot(survey, aes(x = Ent_spend, y = Theater_freq)) +
geom_jitter(width = 0, height = 0.08, size = 3,
alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", se = TRUE, color = "grey20") +
labs(
title = "Entertainment spending and theater frequency",
x = "Monthly entertainment spending ($)",
y = "Theater_freq code (higher = less often)"
) +
theme_minimal()
ggplot(survey, aes(x = factor(Theater_freq), y = Home_better)) +
geom_boxplot(fill = "steelblue", alpha = 0.5, outlier.shape = NA) +
geom_jitter(width = 0.12, height = 0, alpha = 0.65) +
labs(
title = "Home-viewing preference by theater frequency group",
x = "Theater_freq code (higher = less often)",
y = "Watching at home is better (0–5)"
) +
theme_minimal()
These are Pearson correlations. They summarize linear associations and should be interpreted cautiously with this small sample.
cor_mat <- round(
cor(survey[vars], use = "pairwise.complete.obs"),
2
)
cor_mat
## Theater_freq Home_better Price_influence Ent_spend
## Theater_freq 1.00 0.47 0.11 -0.21
## Home_better 0.47 1.00 -0.11 -0.09
## Price_influence 0.11 -0.11 1.00 0.13
## Ent_spend -0.21 -0.09 0.13 1.00
cor_long <- as.data.frame(as.table(cor_mat)) %>%
rename(
Variable1 = Var1,
Variable2 = Var2,
Correlation = Freq
)
ggplot(cor_long, aes(x = Variable1, y = Variable2, fill = Correlation)) +
geom_tile(color = "white") +
geom_text(aes(label = sprintf("%.2f", Correlation))) +
scale_fill_gradient2(
low = "firebrick",
mid = "white",
high = "steelblue",
midpoint = 0,
limits = c(-1, 1),
name = "Pearson r"
) +
labs(
title = "Correlations among survey variables",
x = NULL,
y = NULL
) +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
Respondents allocated 100 points across five theater features. The dashed line shows 20 points, which would be the average allocation if points were split equally.
points_long <- survey %>%
select(starts_with("Pts_")) %>%
pivot_longer(
cols = everything(),
names_to = "Feature",
values_to = "Points"
) %>%
mutate(
Feature = recode(
Feature,
Pts_low_price = "Low ticket price",
Pts_premium = "Premium format/seating",
Pts_concessions = "Concessions",
Pts_showtimes = "Showtimes",
Pts_proximity = "Proximity"
)
)
points_summary <- points_long %>%
group_by(Feature) %>%
summarise(
Mean_points = mean(Points, na.rm = TRUE),
Median_points = median(Points, na.rm = TRUE),
.groups = "drop"
) %>%
arrange(desc(Mean_points))
kable(
mutate(points_summary, across(where(is.numeric), ~ round(.x, 1))),
caption = "Points allocated to theater features"
)
| Feature | Mean_points | Median_points |
|---|---|---|
| Low ticket price | 33.3 | 20 |
| Concessions | 17.6 | 20 |
| Premium format/seating | 16.4 | 20 |
| Showtimes | 16.4 | 20 |
| Proximity | 16.2 | 10 |
ggplot(points_summary,
aes(x = reorder(Feature, Mean_points), y = Mean_points)) +
geom_col(fill = "steelblue") +
geom_hline(yintercept = 20, linetype = "dashed") +
coord_flip() +
labs(
title = "Average points allocated to theater features",
subtitle = "Dashed line = 20 points, an equal split across five features",
x = NULL,
y = "Average points"
) +
theme_minimal()
price_points_r <- cor(
survey$Price_influence,
survey$Pts_low_price,
use = "complete.obs"
)
price_points_r
## [1] 0.3873911
ggplot(survey, aes(x = Price_influence, y = Pts_low_price)) +
geom_jitter(width = 0.08, height = 0, size = 3,
alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", se = TRUE, color = "grey20") +
labs(
title = "Price influence and points given to low ticket price",
x = "Prices strongly influence me (0–5)",
y = "Points allocated to low ticket price"
) +
theme_minimal()
survey %>%
count(Age_group, name = "Respondents") %>%
kable(caption = "Respondents by coded age group")
| Age_group | Respondents |
|---|---|
| 1 | 19 |
| 5 | 2 |
Because higher Theater_freq codes mean going less often,
a positive relationship between a predictor and
Theater_freq means that higher predictor values are
associated with less frequent theater visits. These plots describe
patterns in this sample; they do not show that a predictor causes a
change in attendance. The small sample and uneven age-group counts also
limit broader conclusions.