# Entropy

> Source: https://modeladay.com/models/entropy/
> Category: principle | Topics: science | Difficulty: 3/5

## Definition

A source's average uncertainty, H equaling negative sum of p times log p. It also floors the fewest average bits lossless description needs.

## Core Rule

The average uncertainty of a source, H = −Σp·log(p); it is also the lower bound on "the minimum average number of bits needed to losslessly describe that source." Common patterns: a uniform distribution has maximum entropy, a certain distribution has zero entropy.

## Opening Context

Open Claude Shannon's paper and you'll see lines that start out as a jumble of letters. Farther down, the letters start bunching up the way they do in English. Then whole words appear, but when you read a line through, it scarcely makes sense.

Why put a page of almost readable nonsense into a paper about saving space in communication?

Information entropy measures how uncertain you are, on average, about what a source will produce. Let's follow Shannon as he gives his made up text more structure, and see why being able to predict even part of a message makes it easier to compress.

## How It Works (Preview)

In nineteen forty-eight, Shannon wanted to know how much room a sender could save by using patterns in the text. To see what those patterns looked like, he made several versions of something like English. In the simplest one, every letter and space had the same chance of appearing, independently.

Next he let the letters turn up at their usual English frequencies, still picking each one on its own. Then he took account of letters that appear together. Once he'd done that, seeing the letters already chosen gave you a better guess at the next one.

## When It Fails (Preview)

Before you put the number to work, write down what you're counting and what you know when you make a prediction.

## Full Lesson, Audio & Practice

Get the full Entropy breakdown, 5-minute audio lesson, interactive mechanism animation, and decision checklist in the ConceptFlow app:
- iOS App Store: https://apps.apple.com/app/conceptflow-mental-models/id6756862333
- Google Play: https://play.google.com/store/apps/details?id=com.juxianyp.conceptflow
- Web page: https://modeladay.com/models/entropy/

## Related Mental Models

- [Landauer's principle](https://modeladay.com/models/landauers-principle/)
- [Bandwidth and SNR](https://modeladay.com/models/bandwidth-and-snr/)
- [Channel capacity](https://modeladay.com/models/channel-capacity/)
