Total Variation Distance Calculator
Free online total variation distance calculator. Enter your values and get instant results with the formula, step-by-step working, a worked example and FAQs — everything runs locally in your browser on Calcton, no signup required.
中文版:总变差距离计算器
原理:总变差距离 TVD = 0.5·Σ|p_i − q_i|,是两个离散分布逐项差异绝对值总和的一半。它有直观的概率解释:TVD 等于用同一个事件能制造出的最大概率差,也等于两分布的重叠系数 1 − TVD 之外的「分离量」。
步骤:① 输入两个分布;② 点击计算;③ 读出 TVD、重叠系数与等先验贝叶斯错误率下界。
示例:p = (0.7, 0.3)、q = (0.2, 0.8) 时 TVD = 0.5、重叠系数 = 0.5、贝叶斯错误率 = 0.25;p = (0.5, 0.25, 0.25)、q = (0.25, 0.25, 0.5) 时 TVD = 0.25、错误率 = 0.375。
注意事项:两个分布必须同长且各自归一;TVD 取值范围 0 到 1,0 表示完全相同、1 表示完全分离;TVD 与 KL 散度不同——它对称、有界,但不可加;等先验两类分类的错误率下界 (1−TVD)/2 由贝叶斯错误率计算器给出完整分析。
相关:贝叶斯错误率计算器把 TVD 翻译成分类难度下界;KL 散度计算器给出对数口径的非对称差异;Hellinger 距离计算器是另一种有界对称距离。
How to use the Total Variation Distance Calculator
- Fill in the inputs with your own numbers — every field shows what it expects.
- The result updates instantly as you type; no "Calculate" click needed.
- Read the result card for the main figure, the step-by-step formula, and practical notes.
Frequently asked questions
Is the Total Variation Distance Calculator free?
Yes — all math calculators on Calcton are free, with no sign-up required. Your inputs are processed in your browser and never sent to a server.
Is there a Chinese version of this tool?
Yes. Use the Chinese version link above — it is the same calculator with the interface in Simplified Chinese.
References
Formulas and benchmarks used by this calculator follow these published sources.
KevinContent LeadCalcton Editorial Team · Last updated 2026-10-06
Kevin maintains Calcton's formula verification and content: every calculator cites the standard it implements, worked examples are recomputed programmatically, and health benchmarks follow WHO and international guidelines.
Related calculators
More in this category: Math calculators
About math calculators
Free online math calculators for algebra, statistics, number theory and everyday arithmetic — from quadratic equations and matrices to percentages, fractions and prime factorization, each with step-by-step formulas.