options(repos = c(CRAN = "https://cloud.r-project.org"))
install.packages("readxl")
## Installing package into 'C:/Users/sweth/AppData/Local/R/win-library/4.5'
## (as 'lib' is unspecified)
## package 'readxl' successfully unpacked and MD5 sums checked
## 
## The downloaded binary packages are in
##  C:\Users\sweth\AppData\Local\Temp\Rtmpa82NVd\downloaded_packages
library(readxl)
RQ2 <- read_excel("C:\\Users\\sweth\\Downloads\\RQ2.xlsx")
contingencytable <- table(RQ2$Parent, RQ2$Preferred_Design)
print(contingencytable)
##         
##           A  B
##   Father 21 29
##   Mother 31 19
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
install.packages("lsr")
## Installing package into 'C:/Users/sweth/AppData/Local/R/win-library/4.5'
## (as 'lib' is unspecified)
## package 'lsr' successfully unpacked and MD5 sums checked
## 
## The downloaded binary packages are in
##  C:\Users\sweth\AppData\Local\Temp\Rtmpa82NVd\downloaded_packages
library(lsr)
cramers_v <- cramersV(contingencytable)
cat("Cramer's V (effect size):", round(cramers_v, 3), "\n")
## Cramer's V (effect size): 0.18

SUMMARY OF RESULTS

A Chi-Square Test of Independence was conducted to examine the association between Parents (Mother, Father) and preferred design (Preferred A, Preferred B) among 100 participants. There was a statistically insignificant association between parents and design preference, χ²(1, N = 100) = 3.2452, p-value = 0.07163 (p < .005). There is no correlation between uniform design and parent