Shannon entropy is a measure of uncertainty. It is maximized when the distribution is uniform, and is zero if it is a point mass. It is used in stochastic portfolio theory as a measure of market diversity. It is also the generating function of the entropy-weighted portfolio (see EntropyPortfolio
). See Examples 3.1.2 and 3.4.3 of Fernholz (2002) for more information.
It will be checked whether the input x
is reasonably close to a probability vector. If some entries are negative or the sum of the entries is not close enough to 1 (the error margin is 0.01), an error message will be displayed.