What does Harmonic Surprise, Shepard Tones and Musical Chills conclude, in numbers, about “Harmony as a Markov Chain: an Illustrative Transition Matrix, Surprisal and Entropy Rate”?
Answer: Chapter 1 writes harmony as a Markov chain: under an illustrative matrix a deceptive cadence carries 3.06 bits of surprisal and an authentic cadence only 0.51.
Scope of the numbers: Its parameters are illustrative; all calculations are generated by its programs; it is not medical advice, claims no health effect, and is not marketing-compliance or legal advice. Chapter 1 writes harmony as a Markov chain: under an illustrative matrix a deceptive cadence carries 3.06 bits of surprisal and an authentic cadence only 0.51.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.51, 3.06
| cadence | IV | V | last | total | last/H(V) |
|---|---|---|---|---|---|
| authentic | 1.74 | 1.15 | 0.51 | 3.40 | 0.34 |
| deceptive | 1.74 | 1.15 | 3.06 | 5.95 | 2.04 |
| chromatic | 1.74 | 1.15 | 5.06 | 7.95 | 3.37 |
| entropy before the last chord H(V) = 1.500 bits | |||||
| odds V->I against V->vi = 5.83 to 1 | |||||
| bVI over vi: extra 2.00 bits = factor 4 in p |
Show the full program
# Chapter 1. p12: chord-by-chord surprisal -log2 p for three cadences
# that share the same approach I IV V and differ only in the last chord.
# Uses the ILLUSTRATIVE six-chord matrix of p11 (same numbers).
# Surprisal is the information of the event that happened; entropy is
# the expected surprisal before it happens.
import math
CH = ["I", "ii", "IV", "V", "vi", "bVI"]
P = {
"I": [0.05, 0.15, 0.30, 0.30, 0.15, 0.05],
"ii": [0.05, 0.05, 0.05, 0.75, 0.05, 0.05],
"IV": [0.25, 0.10, 0.05, 0.45, 0.10, 0.05],
"V": [0.70, 0.02, 0.05, 0.08, 0.12, 0.03],
"vi": [0.05, 0.30, 0.35, 0.20, 0.05, 0.05],
"bVI": [0.20, 0.05, 0.25, 0.40, 0.05, 0.05],
}
def p(a, b):
return P[a][CH.index(b)]
def bits(seq):
return [-math.log2(p(a, b)) for a, b in zip(seq, seq[1:])]
h_v = -math.fsum(q * math.log2(q) for q in P["V"])
cases = [("authentic", ["I", "IV", "V", "I"]),
("deceptive", ["I", "IV", "V", "vi"]),
("chromatic", ["I", "IV", "V", "bVI"])]
print("cadence IV V last total last/H(V)")
for name, seq in cases:
s = bits(seq)
print("{:<10} {:>5.2f} {:>5.2f} {:>6.2f} {:>7.2f} {:>8.2f}".format(
name, s[0], s[1], s[2], math.fsum(s), s[2] / h_v))
print("entropy before the last chord H(V) = {:.3f} bits".format(h_v))
print("odds V->I against V->vi = {:.2f} to 1".format(
p("V", "I") / p("V", "vi")))
gap = -math.log2(p("V", "bVI")) - -math.log2(p("V", "vi"))
print("bVI over vi: extra {:.2f} bits = factor {:.0f} in p".format(
gap, 2 ** gap))Single source and citation
Fan, Y. (2026). Harmonic-Expectation Violation Entropy in Orchestral Scoring, the Shepard-Tone Illusion and the Dynamics of Musical Chills (Version 1.0.0), Chapter 1: Harmony as a Markov Chain: an Illustrative Transition Matrix, Surprisal and Entropy Rate. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-163 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026163,
author = {Fan, Yafu},
title = {Harmonic-Expectation Violation Entropy in Orchestral Scoring, the Shepard-Tone Illusion and the Dynamics of Musical Chills},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 2 · Peaks of Violated Expectation: Deceptive Cadences, Chromatic Borrowing and the Five Responses of ITPRA
- Chapter 3 · Shepard Tones and the Endless Accelerando: Octave Partials, a Bell-Shaped Envelope and the Tritone Paradox
- Chapter 4 · The Dynamics of Chills: Skin-Conductance Delay, a Leaky Integrator with a Threshold, and Differences between Listeners
- Chapter 5 · The Loudness Ledger of a Crescendo: Phon, Sone and the Logarithmic Cost of Players
- Chapter 6 · The Surprisal of Persuasive Copy: Carrying the Harmonic Model over to Long Copy, and Drawing a Red Line against False Urgency
- Chapter 7 · The Classics Examined: Three Hearings of the Xianchi Music, Sound without Sorrow or Joy, and Hanslick's "Forms Moved in Sound"
- Chapter 8 · Practice and Falsification: the Persuasive-Copy Checker, a Pre-Registered Protocol and the Conditions of Refutation