Un’appendice culturale che collega la probabilità all’informazione. L’entropia misura il “disordine” o l’incertezza di una variabile aleatoria: la stessa formula descrive il numero medio minimo di bit necessari per identificare un esito e ha la stessa struttura dell’entropia termodinamica di Boltzmann. Claude Shannon la introdusse negli anni ‘40 come misura dell’informazione media trasmessa da una sorgente probabilistica.
A cultural appendix that connects probability to information. Entropy measures the “disorder” or the uncertainty of a random variable: the same formula describes the minimum average number of bits needed to identify an outcome and has the same structure as Boltzmann’s thermodynamic entropy. Claude Shannon introduced it in the 1940s as a measure of the average information transmitted by a probabilistic source.
L’entropia è una grandezza che misura il “disordine”. In termodinamica la si introduce come “tasso di cambio” tra energia e disordine: (Borghi, Entropioni, 2019). Claude Shannon negli anni ‘40 scoprì che la stessa formula descrive l’informazione media trasmessa da una sorgente probabilistica (Shannon, 1948).
Definizione — Entropia di Shannon
Sia una variabile aleatoria discreta con valori e probabilità (con ). L’entropia di è misurata in bit. Convenzione: (limite di per ). Cambiando la base del logaritmo cambia l’unità: base dà nat, base dà hartley.
Collegamenti
Argomenti: Distribuzioni probabilita
Concetti: Entropia · Variabile aleatoria
Competenze: Modellizzare
Persone: Shannon
Entropy is a quantity that measures “disorder”. In thermodynamics it is introduced as the “exchange rate” between energy and disorder: (Borghi, Entropioni, 2019). Claude Shannon in the 1940s discovered that the same formula describes the average information transmitted by a probabilistic source (Shannon, 1948).
Definition — Shannon entropy
Let be a discrete random variable with values and probabilities (with ). The entropy of is measured in bits. Convention: (limit of as ). Changing the base of the logarithm changes the unit: base gives nats, base gives hartleys.
Links
Topics: Distribuzioni probabilita
Concepts: Entropia · Variabile aleatoria
Skills: Modellizzare
People: Shannon
La definizione di entropia diventa concreta se la si legge come una domanda: quante domande “sì / no” servono in media per scoprire il valore di ?
Osservazione — Significato operativo
è il numero medio minimo di domande sì / no (o di bit, in una codifica binaria ottimale) necessari per identificare il valore di . Distribuzione uniforme su valori: bit (servono esattamente domande). Distribuzione deterministica: (non c’è nulla da scoprire).
Questa lettura spiega perché l’entropia si misura in bit: un bit è esattamente la risposta a una domanda binaria ben posta. Più una distribuzione è “prevedibile”, meno domande servono, e più bassa è la sua entropia.
Collegamenti
Argomenti: Distribuzioni probabilita
Concetti: Entropia
Competenze: Interpretare grafico
The definition of entropy becomes concrete if you read it as a question: how many “yes / no” questions are needed on average to discover the value of ?
Remark — Operational meaning
is the minimum average number of yes / no questions (or of bits, in an optimal binary encoding) needed to identify the value of . Uniform distribution over values: bits (exactly questions are needed). Deterministic distribution: (there is nothing to discover).
This reading explains why entropy is measured in bits: a bit is exactly the answer to a well-posed binary question. The more “predictable” a distribution, the fewer questions are needed, and the lower its entropy.
Links
Topics: Distribuzioni probabilita
Concepts: Entropia
Skills: Interpretare grafico
Il caso più semplice — una moneta eventualmente truccata — mostra come l’entropia sia una funzione della probabilità , con un massimo ben preciso.
Esempio — Lancio di una moneta
con , . Allora Studio di funzione: massimo in con bit (totale incertezza); minimo in o con (nessuna sorpresa).
Entropia della moneta : massimo bit in , nulla agli estremi e .
Collegamenti
Argomenti: Distribuzioni probabilita
Concetti: Entropia
Competenze: Interpretare grafico · Studiare funzione
The simplest case — a possibly biased coin — shows how entropy is a function of the probability , with a well-defined maximum.
Example — Tossing a coin
with , . Then Function study: maximum at with bit (total uncertainty); minimum at or with (no surprise).
Entropy of the coin : maximum bit at , zero at the extremes and .
Links
Topics: Distribuzioni probabilita
Concepts: Entropia
Skills: Interpretare grafico · Studiare funzione
Con più di due esiti l’entropia cresce, ma dipende da quanto la distribuzione è “sbilanciata”: un dado equo è più imprevedibile di uno truccato.
Esempio — Dado a sei facce
uniforme su : Servono in media circa domande sì / no ben scelte per indovinare l’esito.
Dado truccato con e : Sapere che il è probabile riduce l’incertezza: meno bit per descrivere il risultato medio.
Il confronto illustra un principio generale: a parità di numero di esiti, la distribuzione uniforme è quella di entropia massima; ogni squilibrio nelle probabilità abbassa l’entropia.
Collegamenti
Argomenti: Distribuzioni probabilita
Concetti: Entropia
Competenze: Calcolare · Interpretare grafico
With more than two outcomes the entropy grows, but it depends on how “unbalanced” the distribution is: a fair die is more unpredictable than a biased one.
Example — Six-sided die
uniform over : On average about well-chosen yes / no questions are needed to guess the outcome.
Biased die with and : Knowing that the is likely reduces the uncertainty: fewer bits to describe the average result.
The comparison illustrates a general principle: for a given number of outcomes, the uniform distribution is the one of maximum entropy; any imbalance in the probabilities lowers the entropy.
Links
Topics: Distribuzioni probabilita
Concepts: Entropia
Skills: Calcolare · Interpretare grafico
Tre proprietà racchiudono il comportamento dell’entropia: è sempre non negativa, ha un massimo ben preciso, e si somma per variabili indipendenti.
Proprietà — Proprietà fondamentali
- , con se e solo se è costante;
- , con se e solo se è uniforme (l’uniforme massimizza l’entropia, intuitivamente: la massima ignoranza);
- additività per indipendenza: se sono indipendenti.
La seconda proprietà è la versione rigorosa dell’osservazione sul dado: fra tutte le distribuzioni su esiti, quella uniforme è la più imprevedibile e la sua entropia è il massimo possibile.
Collegamenti
Argomenti: Distribuzioni probabilita
Concetti: Entropia
Competenze: Dimostrare
Three properties capture the behaviour of entropy: it is always non-negative, it has a well-defined maximum, and it adds up for independent variables.
Property — Fundamental properties
- , with if and only if is constant;
- , with if and only if is uniform (the uniform maximises entropy, intuitively: maximum ignorance);
- additivity under independence: if are independent.
The second property is the rigorous version of the observation about the die: among all distributions over outcomes, the uniform one is the most unpredictable and its entropy is the maximum possible.
Links
Topics: Distribuzioni probabilita
Concepts: Entropia
Skills: Dimostrare
Il nome “entropia” scelto da Shannon non è un caso: la sua formula ha la stessa struttura di quella della termodinamica, e il ponte tra i due mondi è uno dei fili conduttori più affascinanti della matematica applicata.
Osservazione — Dal disordine termodinamico al disordine informatico
La formula di Shannon ha la stessa struttura della formula di Boltzmann (con = numero di microstati equiprobabili). Per questo motivo Shannon, su suggerimento di von Neumann, la chiamò “entropia” con la celebre giustificazione: “vincerai sempre i dibattiti perché nessuno sa davvero cosa sia l’entropia” (Shannon, 1948). È il filo conduttore di Borghi (Entropioni): la stessa grandezza descrive trasferimenti reversibili di energia, ottimalità dei codici di compressione, e l’incertezza di un esperimento aleatorio.
Collegamenti
Argomenti: Distribuzioni probabilita
Concetti: Entropia
Persone: Boltzmann · Shannon · Von Neumann
The name “entropy” chosen by Shannon is no coincidence: his formula has the same structure as the one in thermodynamics, and the bridge between the two worlds is one of the most fascinating threads of applied mathematics.
Remark — From thermodynamic disorder to information disorder
Shannon’s formula has the same structure as Boltzmann’s formula (with = number of equiprobable microstates). For this reason Shannon, on von Neumann’s suggestion, called it “entropy” with the celebrated justification: “you will always win debates because nobody really knows what entropy is” (Shannon, 1948). It is the guiding thread of Borghi (Entropioni): the same quantity describes reversible transfers of energy, the optimality of compression codes, and the uncertainty of a random experiment.
Links
Topics: Distribuzioni probabilita
Concepts: Entropia
People: Boltzmann · Shannon · Von Neumann