Calculator: Jensen–Shannon divergence

Enter the labelled inputs to calculate: Entropy (bit); Distance √JSD.

Entropy (bit)
0.0487949407
Distance √JSD
0.2208957688

How the calculation works

M=(P+Q)/2; JSD=½DKL(P‖M)+½DKL(Q‖M)

Paired lists must have equal lengths. Variances use sample standard deviations where labelled. Probabilities must be nonnegative and sum to one; information is in bits, with zero-mass terms omitted. Pearson statistics use no continuity correction. Wilson uses the supplied normal critical value z.

Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Frequently asked questions

How is the result calculated?

M=(P+Q)/2; JSD=½DKL(P‖M)+½DKL(Q‖M)

What assumptions apply?

Paired lists must have equal lengths. Variances use sample standard deviations where labelled. Probabilities must be nonnegative and sum to one; information is in bits, with zero-mass terms omitted. Pearson statistics use no continuity correction. Wilson uses the supplied normal critical value z.

How precise are the displayed results?

Numerical results show up to ten significant digits. Rounding does not improve the accuracy of the input measurements or the model. Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Also try:

Back to category →