跳转到主要内容
Calcton

Surprisal Calculator

Free online surprisal 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.

中文版:自信息计算器

Surprisal Calculator
事件概率 p(0 与 1 之间)

原理:自信息(惊奇度)I = −log2 p——概率越小的事件发生时携带的信息越多。掷出均匀硬币正面 I = 1 比特,掷中 1/10 的事件 I ≈ 3.32 比特,必然事件 I = 0。log2 的底 2 决定了单位是比特,换自然对数就是奈特。

步骤:① 输入事件概率;② 点击计算;③ 读出比特数与等效状态数。

示例:p = 0.1 时 I = 3.321928094887 比特,等效于在约 10 个等概率结果中指定其一;p = 0.5 时 I = 1 比特。

注意事项:p 必须大于 0——概率为 0 的事件自信息无穷大,因为「不可能事件居然发生」无法用有限比特描述;独立事件的自信息相加,对应联合概率相乘;多个事件的自信息平均就是香农熵。

相关:信息熵计算器把自信息按概率加权平均;KL 散度计算器比较两个分布的信息差异;密码熵计算器用同样的比特度量评估密码强度。

How to use the Surprisal Calculator

  1. Fill in the inputs with your own numbers — every field shows what it expects.
  2. The result updates instantly as you type; no "Calculate" click needed.
  3. Read the result card for the main figure, the step-by-step formula, and practical notes.

Frequently asked questions

Is the Surprisal 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.

  1. dlmf.nist.gov
  2. mathworld.wolfram.com
Kevin's profile

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.

搜索计算器

搜索全站计算器、分类与页面,回车直达