Is there an association between student nationality and whether the student received a scholarship?
library(readxl)
library(rcompanion)
A4Q2 <- read_excel("C:/Users/nehab/OneDrive/A5221/Assignment 4/A4Q2.xlsx")
observed <- table(A4Q2$status, A4Q2$scholarship)
observed
##
## 0 1
## Domestic 39 111
## International 118 32
barplot(
observed,
beside = TRUE,
col = rainbow(nrow(observed)),
legend.text = rownames(observed),
main = "Nationality and Scholarship Awarded",
xlab = "No or Yes",
ylab = "Count"
)
chi_result <- chisq.test(observed)
chi_result
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: observed
## X-squared = 81.297, df = 1, p-value < 2.2e-16
rcompanion::cramerV(observed)
## Cramer V
## 0.5272
# I corrected the effect-size calculation by using cramerV().
# My original manual calculation produced .52.
# The corrected Cramer's V is .53.
# I also updated the interpretation to explain that the association was strong.
A Chi-Square Test of Independence was conducted to determine whether there was an association between student nationality and scholarship status