variance_binary: Compute Variance of Binary Variable

Description Usage Arguments

View source: R/utilities.R

Description

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)

Usage

1
variance_binary(bin_array)

Arguments

bin_array

Array of binary data (1/0, or TRUE/FALSE)


mandel94/easyAnalysis documentation built on Jan. 2, 2022, 9:52 a.m.