A Chi-Square Test of Independence was conducted to determine whether there was a relationship between parent type (Mother or Father) and preferred uniform design (Design A or Design B). The results indicated that there was no statistically significant relationship between parent type and uniform design preference, χ²(1, N = 100) = 3.25, p = 0.071 This suggests that mothers and fathers showed similar preferences for the two uniform designs. The effect size was small (Cramér’s V = 0.18), indicating a weak association between parent type and design preference.

LOAD THE PACKAGE

library(readxl)

Import excel dataset

dataset <- read_excel("C:/Users/sharl/Downloads/RQ2.xlsx")

Create a contingency table

contingencytable <- table(dataset$Parent, dataset$Preferred_Design)
print(contingencytable)
##         
##           A  B
##   Father 21 29
##   Mother 31 19

Run chi-square test of independence

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

LOAD REQUIRED PACKAGE

library(lsr)

CALCULATE CRAMER’S V

cramers_v <- cramersV(contingencytable)
cat("Cramer's V (effect size):", round(cramers_v, 3), "\n")
## Cramer's V (effect size): 0.18