TotalVariation: Total Variation Distance

Description Usage Arguments Details Value See Also

Description

Compute the total variation distance between two probability distributions.

Usage

1
2
## S4 method for signature 'Distribution,Distribution'
TotalVariation(p1, p2)

Arguments

p1, p2

Distributions.

Details

Let p1 and p2 denote the vectors of probability mass assigned by two distributions defined on the same state space. Then, the total variation distance between p1 and p2 is given by 0.5 * sum(abs(p1 - p2)).

The total variation distance is equal to one half of either the 1-metric or the Manhattan distance.

Value

The total variation distance between distributions p1 and p2.

See Also

p-metric, Manhattan


patrickreidy/distdist documentation built on May 22, 2019, 12:40 p.m.