Skip to contents

Entropy of a distribution

Usage

entropy(p, base = 2)

Arguments

p

Discrete probability distribution

base

Desired base for entropy, eg, 2 for bits

Value

Calculated Shannon entropy