Skip to content
← All questions

What is conditional entropy H(X|Y) and how is it defined for discrete random variables?

Conditional entropy H(X|Y) measures the average remaining uncertainty or surprise about a random variable X after another random variable Y has been observed. It is defined as the expected value of the conditional self-information h(x|y) over the joint distribution of X and Y.

Conditions

  • X and Y are discrete random variables.
  • The sum is taken over the joint alphabet Ax×AyA_x \times A_y.

Reasoning, step by step

  1. Define the conditional self-information for specific outcomes x and y as h(x|y) = -\log_2 p(x|y).
  2. Take the expected value of h(x|y) over the joint probability distribution p(x,y)p(x,y).
  3. This yields the formula H(X|Y) = ∑x∈Ax∑y∈Ayp(x,y)log⁡21p(x∣y)\sum_{x \in A_x} \sum_{y \in A_y} p(x,y) \log_2 \frac{1}{p(x|y)}.

Example

The slide displays the formula H(X|Y) = ∑x∈Ax∑y∈Ayp(x,y)log⁡21p(x∣y)\sum_{x \in A_x} \sum_{y \in A_y} p(x,y) \log_2 \frac{1}{p(x|y)} and defines it as the average surprise remaining about sample x of X if we already know the sample y of Y.

Common misconceptions

  • Confusing conditional entropy with joint entropy or marginal entropy.
  • Assuming H(X|Y) is the entropy of X minus the entropy of Y, rather than an expectation over the joint distribution.

Watch the explanation

Connected concepts

Explore next

Related questions

Understand why

↗
Meet the concept

↗
Find a method

↗
Understand why

↗
Know when to use it

↗

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.