Skip to contents

Variance of probabilistically-described gambles (without N-1 correction)

Usage

varG(p, x)

Arguments

p

A numeric vector or matrix, the probabilities.

x

A numeric vector or matrix, outcomes, same length as x.

Value

The variance of the gamble or (if input is a matrix) the gambles

Examples

# Variance of the gamble 0 with 10% otherwise 10:

varG(p = c(.9,.1), x = c(0,10))
#> [1] 9