This is the Chi-square test of Independence to figure out if there is an association between parents (Mother or Father) and their preferred uniform designs (Design A or Design B)

library(readxl)
RQ2 <- read_excel("D:/20251021 AA 5221 Applied Analytics & Methods 1/Week 4/RQ2.xlsx")
contingencytable <- table(RQ2$Parent, RQ2$Preferred_Design)
chisq_indep <- chisq.test(contingencytable)
print(chisq_indep)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  contingencytable
## X-squared = 3.2452, df = 1, p-value = 0.07163

Test results: A Chi-square test of Independence was conducted to determine whether there is an association between parents (Mother or Father) and their preferred uniform design (Design A or design B)

Among 100 mothers and fathers, there was NO statistical significant association in preferred uniform design X² (1, 100) = 3.245, p = 0.072