How to find the relationship between categorical variables?
Is Outcome also a boolean variable?  If so, a simple prop.test will do.  

Here's a toy dataset where a judge from the same country is less likely to give a guilty verdict.

library(tidyverse)
n&lt;-1000
dataset&lt;-tibble(country_judge = sample(c(TRUE,FALSE), n, 
                                           replace=T, prob=c(0.2,0.8))) %&gt;%
  mutate(outcome = ifelse(country_judge,
                          sample(c("Guilty", "Innocent"), n, 
                                     replace=T, prob=c(0.4,0.6)),
                          sample(c("Guilty", "Innocent"), n, 
                                     replace=T, prob=c(0.5,0.5))))

dataset %&gt;%
  group_by(country_judge) %&gt;%
  summarise(p_guilty=mean(outcome=="Guilty"))


This will give something like:

# A tibble: 2 x 2
  country_judge  p_guilty
          &lt;lgl&gt;     &lt;dbl&gt;
1         FALSE 0.5108835
2          TRUE 0.3698630


Now, pull out vectors of trials, and "successes", and feed those into prop.test.

trials &lt;- dataset %&gt;%
  group_by(country_judge) %&gt;%
  count() %&gt;%
  pull(n)

successes &lt;- dataset %&gt;%
  filter(outcome=="Guilty") %&gt;%
  group_by(country_judge) %&gt;%
  count() %&gt;%
  pull(n)

prop.test(successes, trials)


Which gives something like:

    2-sample test for equality of proportions with continuity correction

data:  successes out of trials
X-squared = 13.068, df = 1, p-value = 0.0003003
alternative hypothesis: two.sided
95 percent confidence interval:
 0.06517776 0.21686317
sample estimates:
   prop 1    prop 2 
0.5108835 0.3698630