This EDA uses charts to explore our Qualtrics survey on movie theater attendance (n = 21).
library(ggplot2)
# Movie_Survey_Clean.csv must be saved in the same folder as this .Rmd file
survey <- read.csv("Movie_Survey_Clean.csv")
ggplot(survey, aes(x = factor(Theater_freq))) +
geom_bar(fill = "steelblue") +
labs(title = "Theater visit frequency",
x = "Theater_freq code (higher = goes less often)",
y = "Number of respondents")
Interpretation: Code 3 is the most common answer, chosen by 10 of the 21 respondents. Code 2 is next with 6 respondents, while only 2 people chose code 1 (going the most often) and 3 chose code 4 (going the least often). This means most of our respondents go to the theater sometimes, but not regularly. Because the answers are bunched in the middle, there is not a lot of variation in Y for the regression to explain.
ggplot(survey, aes(x = Home_better)) +
geom_histogram(binwidth = 1, fill = "steelblue", color = "white") +
labs(title = "Home viewing is better (0 = disagree, 5 = agree)",
x = "Agreement", y = "Number of respondents")
Interpretation: Answers to “watching at home is better” are spread across most of the scale. Scores of 3 and 4 are tied as the most common answers, with 6 respondents each, and 4 respondents chose 5. Only 5 respondents scored 2 or below, so very few people disagree that home viewing is better. The average score is 3.4, which shows our sample leans toward preferring to watch movies at home.
ggplot(survey, aes(x = Price_influence)) +
geom_histogram(binwidth = 1, fill = "steelblue", color = "white") +
labs(title = "Prices strongly influence me (0 = disagree, 5 = agree)",
x = "Agreement", y = "Number of respondents")
Interpretation: Price influence clusters heavily in the middle, with 11 of the 21 respondents in the bar at 3. Five respondents chose 5, meaning ticket and concession prices strongly affect whether they go, and 2 chose 4. Only 3 respondents chose 1, and nobody chose 0 or 2. With an average of 3.3, most people feel prices matter to some degree, but few feel strongly either way.
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")
Interpretation: Monthly entertainment spending is right-skewed, with most of the bars on the left side of the chart. Nine of the 21 respondents spend $100 or less a month, and 2 spend nothing at all. Only 4 respondents spend $500 or more, and one person reported $1,000. Because of these few high spenders, the average ($255) is higher than the median ($200).
ggplot(survey, aes(y = Ent_spend)) +
geom_boxplot(fill = "steelblue", alpha = 0.5) +
labs(title = "Entertainment spending: checking for outliers",
y = "Dollars per month")
Interpretation: The box shows that the middle half of respondents spend between $80 and $400 a month, and the line inside the box marks the median of $200. The $1,000 respondent appears as a single dot above the top whisker, which means R flags that value as an outlier. Everyone else falls within the normal range of the data. We need to keep this outlier in mind because one extreme value can pull a regression line toward it.
ggplot(survey, aes(x = Home_better, y = Theater_freq)) +
geom_jitter(width = 0.1, height = 0.1, size = 3, alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", color = "grey20") +
labs(title = "Home viewing preference vs. theater frequency",
x = "Home viewing is better (0-5)",
y = "Theater_freq (higher = less often)")
Interpretation: This chart shows a clear upward trend: respondents who agree more that home viewing is better have higher Theater_freq codes. Since a higher code means going less often, people who prefer watching at home go to the theater less. The line rises about 0.35 on the Theater_freq scale for each one-point increase in Home_better. The correlation is 0.47, a moderate positive relationship and the strongest of our three predictors. This makes Home_better the most promising predictor for the regression in Part 2.
ggplot(survey, aes(x = Price_influence, y = Theater_freq)) +
geom_jitter(width = 0.1, height = 0.1, size = 3, alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", color = "grey20") +
labs(title = "Price influence vs. theater frequency",
x = "Prices strongly influence me (0-5)",
y = "Theater_freq (higher = less often)")
Interpretation: The trend line for price influence is almost flat, so theater frequency barely changes as price influence goes up. The correlation is only 0.11, which is a very weak relationship. The dots are scattered above and below the line with no clear pattern. This suggests that how much prices matter to someone does not tell us much about how often they actually go to the theater.
ggplot(survey, aes(x = Ent_spend, y = Theater_freq)) +
geom_jitter(width = 0, height = 0.1, size = 3, alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", color = "grey20") +
labs(title = "Entertainment spending vs. theater frequency",
x = "Monthly entertainment spending ($)",
y = "Theater_freq (higher = less often)")
Interpretation: The trend line slopes slightly downward, which would suggest that higher spenders go to the theater a little more often. However, the correlation is weak (r = -0.21). Most of that slope comes from the one respondent who spends $1,000 a month and has a code of 1, the most frequent theater visitor. If that person is left out, the correlation becomes a weak positive 0.15. So entertainment spending does not show a reliable relationship with theater frequency in our sample.
ggplot(survey, aes(x = factor(Theater_freq), y = Home_better)) +
geom_boxplot(fill = "steelblue", alpha = 0.5) +
geom_jitter(width = 0.15, alpha = 0.6) +
labs(title = "Home viewing preference by theater frequency group",
x = "Theater_freq code (higher = less often)",
y = "Home viewing is better (0-5)")
Interpretation: This box plot shows the same pattern as the Home_better scatter plot from a different angle. The middle line of each box (the median) climbs steadily from 2 for code 1, to 3.2 for code 2, 4 for code 3 and 5 for code 4. In other words, the less often people go to the theater, the more they agree that watching at home is better. Codes 1 and 4 only have 2 and 3 respondents, so those boxes are based on very few people and should be read with caution.
vars <- c("Theater_freq", "Home_better", "Price_influence", "Ent_spend")
cor_mat <- round(cor(survey[, vars]), 2)
ggplot(as.data.frame(as.table(cor_mat)), aes(Var1, Var2, fill = Freq)) +
geom_tile(color = "white") +
geom_text(aes(label = Freq)) +
scale_fill_gradient2(low = "firebrick", mid = "white", high = "steelblue",
midpoint = 0, limits = c(-1, 1)) +
labs(title = "Correlations among survey variables", x = NULL, y = NULL, fill = "r")
Interpretation: The heatmap shows the correlation between every pair of variables, with blue for positive and red for negative relationships. The strongest correlation with Theater_freq is Home_better at 0.47, a moderate positive relationship. Price_influence (0.11) and Ent_spend (-0.21) are both weak. The three predictors are barely related to each other (none stronger than 0.13 in either direction), so they are not repeating the same information. That means multicollinearity should not be a problem in the Part 2 regression.
pts <- data.frame(
Feature = c("Low ticket price", "Premium format/seating", "Concessions",
"Showtimes", "Proximity"),
Points = colMeans(survey[, c("Pts_low_price", "Pts_premium", "Pts_concessions",
"Pts_showtimes", "Pts_proximity")])
)
ggplot(pts, aes(x = reorder(Feature, Points), y = Points)) +
geom_col(fill = "steelblue") +
geom_hline(yintercept = 20, linetype = "dashed") +
coord_flip() +
labs(title = "Average points given to each theater feature",
subtitle = "Dashed line = 20 points, an equal split across five features",
x = NULL, y = "Average points (out of 100)")
Interpretation: Low ticket price is clearly the most important feature, with an average of 33.3 out of 100 points. That is about double each of the other four features, which all land between 16 and 18 points. Low ticket price is also the only feature above the dashed 20-point line, which marks an equal split. Nine of the 21 respondents gave low price 40 points or more. For theaters, this suggests pricing is the biggest lever for attracting customers.
ggplot(survey, aes(x = Price_influence, y = Pts_low_price)) +
geom_jitter(width = 0.1, height = 0, size = 3, alpha = 0.7, color = "steelblue") +
geom_smooth(method = "lm", se = FALSE, color = "grey20") +
labs(title = "Price influence vs. points given to low ticket price",
x = "Prices strongly influence me (0-5)",
y = "Points given to low ticket price")
Interpretation: The trend line slopes upward, so respondents who say prices strongly influence them also give more points to low ticket price. The correlation is 0.39, a moderate positive relationship. This makes sense because both questions measure price sensitivity, so the two answers back each other up. However, only 7 respondents chose 4 or 5 on price influence, so the pattern rests on a small number of people.
I used AI tools to assist in creating the R Markdown (RMD) file for this project. AI was also used to help organize the code, improve documentation, and troubleshoot potential errors. The analysis, interpretation of results, and final review were conducted to ensure the accuracy and relevance of the project.