How this calculation works
Measure the average log-loss penalty of using a reference model for a binary event.
D(p∥q)=p ln(p/q)+(1−p)ln((1−p)/(1−q))A worked example
A fair coin measured against q=0.25 gives about 0.144 nats.
Good to know
Changing which model is the reference can change the answer.
Reference: OpenStax Introductory Statistics (opens in a new tab) ↗
Read the result
Measure the average log-loss penalty of using a reference model for a binary event.
The primary result is labeled “Divergence (nats)”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
Changing which model is the reference can change the answer.
For a related exercise, try the statistics calculator.
A few questions, answered
How can I check the default inputs by hand?
A fair coin measured against q=0.25 gives about 0.144 nats.
Which rule does this calculator apply?
D(p∥q)=p ln(p/q)+(1−p)ln((1−p)/(1−q))