Old post about R

Let’s write some code snippet here for future reference.

calc_bin_var <- function(p, n) {
  var <- p * (1 - p)
  
  var 
}

bin_var = calc_bin_var(0.2, 25)
bin_var