R Markdown

library(readxl)
library(ggpubr)
## Loading required package: ggplot2
library(ggplot2)
A5Q2 <- read_excel("A5Q2.xlsx")
A5Q2
## # A tibble: 300 × 3
##    student_id nationality scholarship_awarded
##         <dbl> <chr>                     <dbl>
##  1          1 Domestic                      1
##  2          2 Domestic                      0
##  3          3 Domestic                      1
##  4          4 Domestic                      0
##  5          5 Domestic                      0
##  6          6 Domestic                      1
##  7          7 Domestic                      1
##  8          8 Domestic                      0
##  9          9 Domestic                      1
## 10         10 Domestic                      1
## # ℹ 290 more rows
colnames(A5Q2)
## [1] "student_id"          "nationality"         "scholarship_awarded"
A5Q2_tbl <- table(A5Q2$nationality,A5Q2$scholarship_awarded)
A5Q2_tbl
##                
##                   0   1
##   Domestic       39 111
##   International 118  32
barplot(A5Q2_tbl, beside = TRUE,
        col = c("blue", "orange"),
        legend = rownames(A5Q2_tbl))

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

A Chi-Square Test of Independence was conducted to determine whether there was an association between nationality and scholarship awarded.

The results showed that there was a statistically significant association between the two variables, χ²(1) = 81.30, p < .001.

The strength of the association was strong, as indicated by Cramér’s V = 0.53.