Play with the Direction of KL Divergence

KL divergence averages a pointwise log-ratio under the distribution on the left. Switch that source distribution, then move the commute time to see why the two directions ask different questions.

What is happening right now?

Car density Train density Selected time
Source density c(x)
0.1330
Comparison density t(x)
5.52e-88
Pointwise extra surprise
198.901 nats
D(Car ∥ Train) = 202.901 nats. At 35.0 minutes, the train model is far more surprised than the car model. The pointwise contribution here is 26.450 nats per minute.
Car z-score: 0.00 Train z-score: −20.00

The same time under both commute models

The train is slower but much more predictable, so its density is tall and narrow. The car is faster but more variable.

Where the selected KL value comes from

The curve is c(x) log(c(x) / t(x)). Across the full real line, its signed area is D(Car ∥ Train): 202.901 nats. The vertical scale stays fixed when the direction changes, so the two areas are directly comparable.