Testing if one binary variable is related to another binary variable I was given an exercise question in class where the 2 variables in the given dataset was gender and grade. Both are binary variables - if a student got a grade over 70, he/she would be recorded as 1 (a success for that student, according to the problem), and 0 otherwise.
The question is asking me if grade success rate is related to the gender of the student. I am supposed to conduct a statistical hypothesis test (using R) on the significance level of 5%.
This class was basic statistical methods class (And I also only have basic statistical knowledge), and the first test I thought of was the correlation analysis. But I soon realized it was not going to work since correlation analysis was only effective on continuous variables.
I am stumped on this question (it's my first time trying to test the relationship between two binary variables), and I haven't learned that many testing methods so far (I have learned test on independence and test on homogeneity using chi-square test, one way anova and two way anova, and simple and multiple linear regression tests).
Would any of these testing methods be valid on this question? The best candidate for me would be the test on homogeneity using contingency tables, but I'm not completely sure. If this is right, would someone be able to kindly explain to me why this is the right testing method and how to approach the problem using the testing method? Thanks.

If you have individual-level data, you can present this as a $2\times 2$ contingency table, and then use a chi-squared test.
These are treated in many posts on this ste, for some examles

*

*In a $2 \times 2$ contingency table, does the dependent variable go on the rows or columns?


*What does it mean when odds ratio and risk ratio aren't approximately equal ? $2 \times 2$ contingency table


*Chi^2 test for 2x2-contingency table using probabilities instead of count data
