library(readxl)

A4Q2 <- read_excel("C:/Users/eboni/Downloads/A4Q2.xlsx")

table <- table(A4Q2$Nationality, A4Q2$`Scholarship Awarded`)
table
##                
##                   0   1
##   Domestic       39 111
##   International 118  32
barplot(table,
        beside = TRUE,
        col = rainbow(nrow(table)),
        legend = rownames(table),
        main = "Scholarship Awarded by Nationality",
        xlab = "Scholarship Awarded",
        ylab = "Count")

chi_result <- chisq.test(table)
chi_result
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  table
## X-squared = 81.297, df = 1, p-value < 2.2e-16
rcompanion::cramerV(table)
## Cramer V 
##   0.5272

#Interpretation

A Chi-Square Test of Independence was conducted to determine if there was an association between Nationality and Scholarship Awarded. The results showed that there was a significant association between the two variables, χ²(1) = 81.30, p < .001.