streaming_analytics %>%
count(AgeCat)
## # A tibble: 3 × 2
## AgeCat n
## <chr> <int>
## 1 18–25 100
## 2 26–40 100
## 3 41+ 100
streaming_analytics %>%
count(Platform)
## # A tibble: 5 × 2
## Platform n
## <chr> <int>
## 1 Amazon 54
## 2 Disney+ 61
## 3 Hulu 46
## 4 Netflix 111
## 5 Other 28
contingency<- table(streaming_analytics$AgeCat, streaming_analytics$Platform)
contingency
##
## Amazon Disney+ Hulu Netflix Other
## 18–25 4 22 23 47 4
## 26–40 11 25 16 41 7
## 41+ 39 14 7 23 17
ggplot(streaming_analytics, aes(x = AgeCat, fill = Platform)) +
geom_bar(position = "fill") +
labs(
title = "Platform Preference by Age Group (proportion)",
x = "Age Group",
y = "Percentage of Respondents",
fill = "Streaming Platform"
)+
ggthemes::theme_fivethirtyeight()
ggplot(streaming_analytics, aes(x = Platform, fill = AgeCat)) +
geom_bar()+
labs(
title = "Platform Counts by Age Group",
x = "Platform",
y = "Count of Respondents",
fill = "Age Group"
) +
ggthemes::theme_economist()
contingency <- xtabs(~ AgeCat + Platform, data = streaming_analytics)
chi_result <- chisq.test(contingency)
chi_result
##
## Pearson's Chi-squared test
##
## data: contingency
## X-squared = 68.044, df = 8, p-value = 1.203e-11
chi_result$observed
## Platform
## AgeCat Amazon Disney+ Hulu Netflix Other
## 18–25 4 22 23 47 4
## 26–40 11 25 16 41 7
## 41+ 39 14 7 23 17
chi_result$expected
## Platform
## AgeCat Amazon Disney+ Hulu Netflix Other
## 18–25 18 20.33333 15.33333 37 9.333333
## 26–40 18 20.33333 15.33333 37 9.333333
## 41+ 18 20.33333 15.33333 37 9.333333
chi_result$residuals
## Platform
## AgeCat Amazon Disney+ Hulu Netflix Other
## 18–25 -3.2998316 0.3696106 1.9578900 1.6439899 -1.7457431
## 26–40 -1.6499158 1.0349098 0.1702513 0.6575959 -0.7637626
## 41+ 4.9497475 -1.4045204 -2.1281413 -2.3015858 2.5095057
The observed and expected frequency tables show clear differences in platform preferences across age groups. Respondents aged 41+ are significantly more likely to prefer Amazon than expected, and less likely to prefer Netflix and Hulu. Respondents aged 18-25 are less likely to prefer Amazon and moderately more likely to prefer Hulu and Netflix than expected. Respondents aged 26-40 were moderately less likely to prefer Amazon and preferred Disney ever so slightly more than expected.
contributions <- chi_result$residuals^2
contrib_percent <- contributions / sum(contributions)*100
contributions
## Platform
## AgeCat Amazon Disney+ Hulu Netflix Other
## 18–25 10.88888889 0.13661202 3.83333333 2.70270270 3.04761905
## 26–40 2.72222222 1.07103825 0.02898551 0.43243243 0.58333333
## 41+ 24.50000000 1.97267760 4.52898551 5.29729730 6.29761905
contrib_percent
## Platform
## AgeCat Amazon Disney+ Hulu Netflix Other
## 18–25 16.00277665 0.20077087 5.63363056 3.97200744 4.47891125
## 26–40 4.00069416 1.57404361 0.04259834 0.63552119 0.85729161
## 41+ 36.00624747 2.89913133 6.65599073 7.78513459 9.25525020
The cell that contributed the most by far was 41+ preferring Amazon (36%), followed by 18-25 year old’s preference against Amazon (16%). The 26-40 age group did not contribute much to the test result, suggesting their platform preferences are similar to the expected pattern distribution. Overall, platform choice differs most at the youngest and oldest group, especially with their use of Amazon.
cramers_v <- cramerV(contingency)
cramers_v
## Cramer V
## 0.3368
Cramer’s V = 0.34, which indicates a moderate strength association between age group and streaming platform preference. This suggests that while platform preferences vary by age, age is not the only factor influencing platform choice.
The Chi-Square test showed a statistically significant relationship between age group and streaming platform preference, χ²(8, N = 300) = 68.04, p < .001. The largest contributions came from the 41+ and 18-25 Amazon cells, with 41+’s preferring Amazon much more than expected and 18-25s preferring Amazon much less than expected. The 26-40 age group showed preferences close to the overall sample pattern, thus contributing very little to the Chi-Square test statistic. The overall association between age group and platform preference was moderate in strength (Cramer’s V = 0.34), which means there are other factors outside of age that determine streaming platform preferences. These results may be useful in deciding marketing strategies to use, as well as what types of ads may be most effective depending on the platform. For example, Amazon’s ads should target 41+ year olds over 18-25 year olds.