Hypotheses
H0(Null Hypotheses): There is no assication between parents and uniform design. H1(Alternate Hypotheses): There is an assocation between parents and uniform design.
Result
A Chi-Square Test of Independence was conducted to examine the association between parents (father, mother) and uniform design preference (Design A, Design B) among 100 participants. There was no statistical association between parent type and uniform design preference, χ²(1, N = 100) = 3.2452, p = .07, The effect size was small (Cramér’s V = 0.18).
R Code
# LOAD THE PACKAGE
library(readxl)
IMPORT THE EXCEL FILE INTO R STUDIO
dataset <- read_excel("C:/Users/hites/Downloads/RQ2.xlsx")
VISUALLY DISPLAY THE DATA
contingencytable <- table(dataset$Parent, dataset$Preferred_Design)
print(contingencytable)
##
## A B
## Father 21 29
## Mother 31 19
# ====================================
# CHI-SQUARE TEST OF INDEPENDENCE CODE
# ====================================
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 THE 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