This function returns the variance of a binary variable, compute as
p(1-p)
, where p
is the proportion of ones in the data (this
is the variance of a bernoullian distribution)
1 | variance_binary(bin_array)
|
bin_array |
Array of binary data (1/0, or TRUE/FALSE) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.