A private all-girls elementary school has developed two different uniform designs: Design A and Design B. They are hoping at least one of the designs will be preferred by both mothers and fathers. We want to determine if there is a relationship between uniform design and parent.
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 required libraries
library(readxl)
library(lsr)
# Import the Excel dataset
dataset <- read_excel("C:/Users/Nithin Kumar Adki/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
# Calculate Cramer's V (effect size)
cramers_v <- cramersV(contingencytable)
cat("Cramer's V (effect size):", round(cramers_v, 3), "\n")
## Cramer's V (effect size): 0.18