Research Question

Is there an association between student nationality (domestic versus international) and whether or not they have a scholarship (yes versus no)?

Load Required Packages

library(readxl)
library(ggpubr)
## Loading required package: ggplot2
library(rcompanion)
library(rmarkdown)

Import Dataset

A5Q2 <- read_excel("C:/Users/wmacklin/Downloads/A5Q2.xlsx")

Create the Contingency Table

Table <- table(A5Q2$nationality, A5Q2$scholarship_awarded)
Table
##                
##                   0   1
##   Domestic       39 111
##   International 118  32

Create the Bar Graph

barplot(Table,
        beside = TRUE,
        col = rainbow(nrow(Table)),
        legend = rownames(Table),
        main = "Nationality and Scholarship Awarded",
        xlab = "Scholarship Awarded (0 = No, 1 = Yes)",
        ylab = "Count")

## Chi-Square Test

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

Effect Size (Cramer’s V)

cramerV(Table)
## Cramer V 
##   0.5272

Interpretation

A Chi-Square Test of Independence was conducted to determine if there was an association between student nationality (domestic versus international) and whether or not the student received a scholarship.

There was a statistically significant association between the two variables, χ²(1) = 81.30, p < .001. The association was strong (Cramer’s V = 0.53).

Therefore, we reject the null hypothesis and conclude that scholarship status is associated with student nationality.