From 1114eaec62fc77af6c0244a773b1735ebeb72e2e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 04:10:41 +0000 Subject: [PATCH 01/12] Add a section on questions as partitions of a variable's values Ezra asked whether there is a standard typology of questions (polar is/does/did questions versus wh-questions) and wanted it in ids. The typology connects directly to entropy: a question about X partitions the values of X (Hamblin 1973; Groenendijk and Stokhof 1984), its answer is a function of X, so the information in the answer is the answer's entropy, at most log2 of the number of possible answers. A polar question therefore yields at most one bit, which MacKay's game of sixty-three illustrates. The new section sits on the entropy page after mutual information, because its main theorem uses mutual information and conditional entropy. It also proves that entropy is at most log2 k for k values, since no page in ids or pds states that bound yet. Hamblin (1973) and the Groenendijk-Stokhof thesis have no DOI, so the DOI check excludes them, as it does other DOI-less entries. Closes #197 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- .github/workflows/check-bibliography-dois.yml | 4 ++ _subfiles/_cor-question-information-bound.qmd | 35 +++++++++++ _subfiles/_def-answer.qmd | 12 ++++ _subfiles/_def-polar-question.qmd | 9 +++ _subfiles/_def-question.qmd | 12 ++++ _subfiles/_exm-answer-information.qmd | 33 +++++++++++ _subfiles/_exm-entropy-at-most-log-values.qmd | 21 +++++++ _subfiles/_exm-not-polar-question.qmd | 12 ++++ _subfiles/_exm-not-question.qmd | 11 ++++ _subfiles/_exm-question.qmd | 17 ++++++ _subfiles/_exm-sixty-three.qmd | 34 +++++++++++ _subfiles/_rem-question-partition-source.qmd | 11 ++++ _subfiles/_rem-question-types.qmd | 23 ++++++++ _subfiles/_thm-answer-information.qmd | 44 ++++++++++++++ _subfiles/_thm-entropy-at-most-log-values.qmd | 50 ++++++++++++++++ entropy.qmd | 58 +++++++++++++++++++ inst/WORDLIST | 1 + references.bib | 29 ++++++++++ 18 files changed, 416 insertions(+) create mode 100644 _subfiles/_cor-question-information-bound.qmd create mode 100644 _subfiles/_def-answer.qmd create mode 100644 _subfiles/_def-polar-question.qmd create mode 100644 _subfiles/_def-question.qmd create mode 100644 _subfiles/_exm-answer-information.qmd create mode 100644 _subfiles/_exm-entropy-at-most-log-values.qmd create mode 100644 _subfiles/_exm-not-polar-question.qmd create mode 100644 _subfiles/_exm-not-question.qmd create mode 100644 _subfiles/_exm-question.qmd create mode 100644 _subfiles/_exm-sixty-three.qmd create mode 100644 _subfiles/_rem-question-partition-source.qmd create mode 100644 _subfiles/_rem-question-types.qmd create mode 100644 _subfiles/_thm-answer-information.qmd create mode 100644 _subfiles/_thm-entropy-at-most-log-values.qmd diff --git a/.github/workflows/check-bibliography-dois.yml b/.github/workflows/check-bibliography-dois.yml index b7a7e527..de082b6c 100644 --- a/.github/workflows/check-bibliography-dois.yml +++ b/.github/workflows/check-bibliography-dois.yml @@ -25,6 +25,8 @@ jobs: # mackay2003information: the book has no DOI. # iec80000132008: the standard has no DOI. # grinstead1997introduction: the book has no DOI. + # hamblin1973questions: the journal article has no DOI (JSTOR only). + # groenendijk1984studies: the thesis has no DOI. # shannon1948mathematical: the publisher answers the checker with HTTP # 202, which the check reads as an error, though the DOI resolves. exclude-keys: >- @@ -33,3 +35,5 @@ jobs: iec80000132008 grinstead1997introduction renyi1961measures + hamblin1973questions + groenendijk1984studies diff --git a/_subfiles/_cor-question-information-bound.qmd b/_subfiles/_cor-question-information-bound.qmd new file mode 100644 index 00000000..53bae54a --- /dev/null +++ b/_subfiles/_cor-question-information-bound.qmd @@ -0,0 +1,35 @@ +:::{#cor-question-information-bound} +#### A polar question yields at most one bit + +Let $A$ be the [answer](#def-answer) to a [question](#def-question) with $k$ possible answers +about a [discrete random variable](https://morrison-lab.github.io/pds/random-variables.html#def-discrete-rv) $X$ +with finite [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy). +With base-2 [logarithms](https://morrison-lab.github.io/mds/algebra-exponentials.html#def-logarithm), +the [mutual information](#def-mutual-information) between $X$ and the answer is at most $\log_2 k$ [bits](#def-bit): + +$$\mutinfof{X}{A} \le \log_2 k,$$ + +with equality exactly when the $k$ possible answers are equally likely. +For a [polar question](#def-polar-question), $k = 2$, so the answer carries at most $1$ bit about $X$. + +::: + +::: {.proof} + +Each possible answer is a nonempty set of values of $X$ with positive [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability), +so the answer $A$ has exactly $k$ values with positive probability, +and its entropy is finite. +By @thm-answer-information and then @thm-entropy-at-most-log-values, + +$$ +\begin{aligned} +\mutinfof{X}{A} +&= \entropyf{A} \\ +&\le \log_2 k, +\end{aligned} +$$ + +with equality exactly when $A$ is [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) on its $k$ values. +A polar question has $k = 2$ possible answers, and $\log_2 2 = 1$. + +::: diff --git a/_subfiles/_def-answer.qmd b/_subfiles/_def-answer.qmd new file mode 100644 index 00000000..5ca09c57 --- /dev/null +++ b/_subfiles/_def-answer.qmd @@ -0,0 +1,12 @@ +:::{#def-answer} +#### Answer + +For a [question](#def-question) about $X$, +write $a(x)$ for the possible answer that holds the value $x$. +The **answer** to the question is the random variable + +$$A \eqdef a(X),$$ + +the possible answer that holds the value of $X$. + +::: diff --git a/_subfiles/_def-polar-question.qmd b/_subfiles/_def-polar-question.qmd new file mode 100644 index 00000000..1090e098 --- /dev/null +++ b/_subfiles/_def-polar-question.qmd @@ -0,0 +1,9 @@ +:::{#def-polar-question} +#### Polar question, yes-no question + +A **polar question**, or **yes-no question**, about $X$ is a [question](#def-question) with exactly two possible answers: +the values of $X$ for which some statement holds, the answer "yes", +and the values for which it fails, the answer "no". +"Polar question" is the name used below. + +::: diff --git a/_subfiles/_def-question.qmd b/_subfiles/_def-question.qmd new file mode 100644 index 00000000..f76a380e --- /dev/null +++ b/_subfiles/_def-question.qmd @@ -0,0 +1,12 @@ +:::{#def-question} +#### Question + +Let $X$ be a [discrete random variable](https://morrison-lab.github.io/pds/random-variables.html#def-discrete-rv), +and let $\srcalph$ be the set of its [values](https://morrison-lab.github.io/pds/random-variables.html#def-realization) +with positive [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability). +A **question** about $X$ is a collection of nonempty, disjoint subsets of $\srcalph$ whose union is $\srcalph$, +called its **possible answers**, +so that the events $\{X \in C\}$, one for each possible answer $C$, +form a [partition](https://morrison-lab.github.io/pds/probability-basics.html#def-partition) of the sample space. + +::: diff --git a/_subfiles/_exm-answer-information.qmd b/_subfiles/_exm-answer-information.qmd new file mode 100644 index 00000000..0f38df36 --- /dev/null +++ b/_subfiles/_exm-answer-information.qmd @@ -0,0 +1,33 @@ +:::{#exm-answer-information} +#### Two polar questions about the same number + + +Let $X$ be as in @exm-question, +let $A$ be the [answer](#def-answer) to each of the two questions below in turn, +and use base-2 [logarithms](https://morrison-lab.github.io/mds/algebra-exponentials.html#def-logarithm). + +- **"Is $X \ge 32$?"** + Each answer has [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $32/64 = 1/2$, + so its [surprisal](#def-surprisal) is $1$ [bit](#def-bit), + and the [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) of the answer, its expected surprisal, is $1$ bit. + By @thm-answer-information, the answer carries $\mutinfof{X}{A} = 1$ bit about $X$. +- **"Is $X = 0$?"** + The answer "yes" has probability $1/64$ and the answer "no" has probability $63/64$, + so the entropy of the answer is + + $$ + \begin{aligned} + \entropyf{A} + &= -\tfrac{1}{64} \log_2 \tfrac{1}{64} - \tfrac{63}{64} \log_2 \tfrac{63}{64} \\ + &\approx 0.094 + 0.022 \\ + &\approx 0.116 \text{ bits}. + \end{aligned} + $$ + + By @thm-answer-information, the answer carries about $0.116$ bits about $X$. + +The answer "yes" to "Is $X = 0$?" is worth $6$ bits, +but it is rare, +so the expected information from asking is far below the $1$ bit from "Is $X \ge 32$?". + +::: diff --git a/_subfiles/_exm-entropy-at-most-log-values.qmd b/_subfiles/_exm-entropy-at-most-log-values.qmd new file mode 100644 index 00000000..d75c817d --- /dev/null +++ b/_subfiles/_exm-entropy-at-most-log-values.qmd @@ -0,0 +1,21 @@ +:::{#exm-entropy-at-most-log-values} +#### A fair coin and a loaded coin + + +A coin toss $X$ has $k = 2$ values, so @thm-entropy-at-most-log-values gives $\entropyf{X} \le \log_2 2 = 1$ [bit](#def-bit). + +- A fair coin is [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) on its two values, + so its [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) equals the bound, $1$ bit. +- A coin that lands heads with [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $1/4$ + has entropy below the bound: + + $$ + \begin{aligned} + \entropyf{X} + &= -\tfrac{1}{4} \log_2 \tfrac{1}{4} - \tfrac{3}{4} \log_2 \tfrac{3}{4} \\ + &\approx 0.500 + 0.311 \\ + &\approx 0.811 \text{ bits}. + \end{aligned} + $$ + +::: diff --git a/_subfiles/_exm-not-polar-question.qmd b/_subfiles/_exm-not-polar-question.qmd new file mode 100644 index 00000000..1542f93d --- /dev/null +++ b/_subfiles/_exm-not-polar-question.qmd @@ -0,0 +1,12 @@ +:::{#exm-not-polar-question} +#### A question with four answers is not polar + + +Let $X$ be as in @exm-question. +The question "What is the remainder of $X$ divided by $4$?" has four possible answers, +one for each remainder $r \in \{0, 1, 2, 3\}$: +the set of values $x \in \srcalph$ whose remainder is $r$. +These four sets form a [question](#def-question), +but not a [polar question](#def-polar-question), which has exactly two possible answers. + +::: diff --git a/_subfiles/_exm-not-question.qmd b/_subfiles/_exm-not-question.qmd new file mode 100644 index 00000000..8bf6ac0d --- /dev/null +++ b/_subfiles/_exm-not-question.qmd @@ -0,0 +1,11 @@ +:::{#exm-not-question} +#### Overlapping answers do not form a question + + +Let $X$ be as in @exm-question. +The two sets $\{0, 1, \ldots, 40\}$ and $\{32, 33, \ldots, 63\}$ cover $\srcalph$, +but both hold the values $32, 33, \ldots, 40$. +They are not disjoint, so they do not form a [question](#def-question): +when $X = 35$, no single possible answer holds the value of $X$. + +::: diff --git a/_subfiles/_exm-question.qmd b/_subfiles/_exm-question.qmd new file mode 100644 index 00000000..e7d53171 --- /dev/null +++ b/_subfiles/_exm-question.qmd @@ -0,0 +1,17 @@ +:::{#exm-question} +#### Is the number at least 32? + + +Let $X$ be [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) on the integers $0, 1, \ldots, 63$, +so that $\srcalph = \{0, 1, \ldots, 63\}$. +The question "Is $X \ge 32$?" has two possible answers: + +- "yes", the set $\{32, 33, \ldots, 63\}$; +- "no", the set $\{0, 1, \ldots, 31\}$. + +These two sets are nonempty and disjoint, and their union is $\srcalph$, +so they form a [question](#def-question), +and a [polar question](#def-polar-question). +If $X = 35$, the [answer](#def-answer) is $a(35) = \{32, 33, \ldots, 63\}$, that is, "yes". + +::: diff --git a/_subfiles/_exm-sixty-three.qmd b/_subfiles/_exm-sixty-three.qmd new file mode 100644 index 00000000..c803b4de --- /dev/null +++ b/_subfiles/_exm-sixty-three.qmd @@ -0,0 +1,34 @@ +:::{#exm-sixty-three} +#### The game of sixty-three + + +In the game of twenty questions, +one player thinks of an object and the other identifies it by asking polar questions. +@mackay2003information [p. 70] simplifies the game to "sixty-three": +find an integer $X$ between $0$ and $63$, each equally likely, using [polar questions](#def-polar-question). +Six questions suffice: + +1. Is $X \ge 32$? +2. Is the remainder of $X$ divided by $32$ at least $16$? +3. Is the remainder of $X$ divided by $16$ at least $8$? +4. Is the remainder of $X$ divided by $8$ at least $4$? +5. Is the remainder of $X$ divided by $4$ at least $2$? +6. Is $X$ odd? + +Reading "yes" as $1$ and "no" as $0$, +the six [answers](#def-answer) spell the binary expansion of $X$: +$X = 35$ gives $100011$. +Given the answers so far, each next question splits the values still possible into two equal halves, +so each answer has [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $1/2$ +and carries $1$ [bit](#def-bit), +the most that @cor-question-information-bound allows for a polar question. +The six answers carry $6$ bits in all, +which is the [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) $\entropyf{X} = \log_2 64 = 6$ bits. +No strategy can be sure to finish in fewer than six polar questions: +five polar questions have at most $2^5 = 32$ combinations of answers, +too few to tell $64$ values apart. + +The single [variable question](#rem-question-types) "What is $X$?" has $64$ equally likely possible answers, +so by @cor-question-information-bound its answer carries all $\log_2 64 = 6$ bits at once. + +::: diff --git a/_subfiles/_rem-question-partition-source.qmd b/_subfiles/_rem-question-partition-source.qmd new file mode 100644 index 00000000..f268563e --- /dev/null +++ b/_subfiles/_rem-question-partition-source.qmd @@ -0,0 +1,11 @@ +::: {#rem-question-partition-source} +#### Questions as sets of answers in semantics + +@def-question follows a line of work in the semantics of natural language. +@hamblin1973questions took a question to denote the set of propositions that count as its answers, +so that a question "sets up a choice-situation between a set of propositions". +@groenendijk1984studies took a question's answers to be mutually exclusive and to cover every possibility, +so that a question partitions the possibilities, +as the possible answers of a question partition $\srcalph$. + +::: diff --git a/_subfiles/_rem-question-types.qmd b/_subfiles/_rem-question-types.qmd new file mode 100644 index 00000000..e94b18ac --- /dev/null +++ b/_subfiles/_rem-question-types.qmd @@ -0,0 +1,23 @@ +::: {#rem-question-types} +#### Kinds of questions in grammar + +@huddleston1994contrast sorts questions into three kinds, +by how each kind defines its set of answers: + +- A [polar question](#def-polar-question), such as "Is it raining?", has the two answers yes and no. +- An *alternative question*, such as "Is it red or green?", has one answer for each alternative it lists. +- A *variable question*, such as "Who called?", has one answer for each value of a variable, + here the person who called. + In English a variable question opens with an interrogative word, such as *who*, *what*, *which*, *where*, *when*, *why*, or *how*, + so it is often called a *wh-question*. + +Each kind is a [question](#def-question) with a different number of possible answers: +two for a polar question, +one per listed alternative for an alternative question, +and one per value of the variable for a variable question, +which can be many. +@huddleston1994contrast also separates these kinds of question from the *interrogative* clause, a grammatical form. +The two need not match: +a declarative clause said with rising intonation, such as "You're leaving?", asks a polar question. + +::: diff --git a/_subfiles/_thm-answer-information.qmd b/_subfiles/_thm-answer-information.qmd new file mode 100644 index 00000000..5ee99e58 --- /dev/null +++ b/_subfiles/_thm-answer-information.qmd @@ -0,0 +1,44 @@ +:::{#thm-answer-information} +#### The information in an answer is its entropy + +Let $X$ be a [discrete random variable](https://morrison-lab.github.io/pds/random-variables.html#def-discrete-rv), +and let $A$ be the [answer](#def-answer) to a [question](#def-question) about $X$. +If $X$ and $A$ have finite [entropies](https://morrison-lab.github.io/pds/expectation.html#def-entropy), +then the [mutual information](#def-mutual-information) between $X$ and the answer +is the entropy of the answer: + +$$\mutinfof{X}{A} = \entropyf{A}.$$ + +::: + +::: {.proof} + +Given $X=x$, the answer $A = a(X)$ equals $a(x)$ with [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $1$, +so $\P(A = a(x) \mid X = x) = 1$. +Hence the [conditional surprisal](#def-conditional-surprisal) of the answer $a(x)$ given $x$ is $-\log 1 = 0$, +and its [expectation](https://morrison-lab.github.io/pds/expectation.html#def-expectation) given $X=x$ is $0$: + +$$\entropyf{A \mid X=x} = 0.$$ + +By @thm-conditional-entropy-average, + +$$ +\begin{aligned} +\entropyf{A \mid X} +&= \sum_{x} p(x) \, \entropyf{A \mid X=x} \\ +&= 0, +\end{aligned} +$$ + +where $p(x) \eqdef \P(X=x)$. +By @thm-mutual-information-reduction with $Y = A$, + +$$ +\begin{aligned} +\mutinfof{X}{A} +&= \entropyf{A} - \entropyf{A \mid X} \\ +&= \entropyf{A}. +\end{aligned} +$$ + +::: diff --git a/_subfiles/_thm-entropy-at-most-log-values.qmd b/_subfiles/_thm-entropy-at-most-log-values.qmd new file mode 100644 index 00000000..d86b1e01 --- /dev/null +++ b/_subfiles/_thm-entropy-at-most-log-values.qmd @@ -0,0 +1,50 @@ +:::{#thm-entropy-at-most-log-values} +#### Entropy is at most the logarithm of the number of values + +Let $X$ be a [discrete random variable](https://morrison-lab.github.io/pds/random-variables.html#def-discrete-rv) +with exactly $k$ [values](https://morrison-lab.github.io/pds/random-variables.html#def-realization) +of positive [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability). +With base-2 [logarithms](https://morrison-lab.github.io/mds/algebra-exponentials.html#def-logarithm), +the [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) of $X$ is at most $\log_2 k$: + +$$\entropyf{X} \le \log_2 k,$$ + +with equality exactly when $X$ is [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) on those $k$ values. + +::: + +::: {.proof} + +Let $p$ be the [probability mass function](https://morrison-lab.github.io/pds/random-variables.html#def-pmf) of $X$, +and let $q$ be the uniform probability mass function on the $k$ values $x$ with $p(x) > 0$, +so $q(x) = 1/k$ at each of them. +The surprisal measured by $q$ is then the same at every one of those values: + +$$ +\begin{aligned} +\surprisalunderf{q}{x} +&= -\log_2 \tfrac{1}{k} \\ +&= \log_2 k. +\end{aligned} +$$ + +The [Kullback--Leibler divergence](https://morrison-lab.github.io/pds/expectation.html#def-kl-divergence) of $q$ from $p$ +is the expectation of the surprisal measured by $q$ minus the surprisal measured by $p$: + +$$ +\begin{aligned} +\kldivf{p}{q} +&= \E{\surprisalunderf{q}{X} - \surprisalf{X}} \\ +&= \E{\log_2 k - \surprisalf{X}} \\ +&= \log_2 k - \E{\surprisalf{X}} \\ +&= \log_2 k - \entropyf{X}. +\end{aligned} +$$ + +The sum in @thm-kl-divergence-nonnegative has finitely many terms, so it is finite, +and that theorem gives $\kldivf{p}{q} \ge 0$, +with equality exactly when $q = p$. +Hence $\log_2 k - \entropyf{X} \ge 0$, +with equality exactly when $p$ is uniform on its $k$ values. + +::: diff --git a/entropy.qmd b/entropy.qmd index 95c454f7..50d39a23 100644 --- a/entropy.qmd +++ b/entropy.qmd @@ -318,6 +318,64 @@ in *[Probability for Data Science](https://morrison-lab.github.io/pds/)*. {{< include ids/_subfiles/_sol-information-gain.qmd >}} +## Questions and answers {#sec-questions} + + + +{{< include ids/_subfiles/_def-question.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_def-answer.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_def-polar-question.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_exm-question.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_exm-not-question.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_exm-not-polar-question.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_rem-question-partition-source.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_rem-question-types.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_thm-answer-information.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_exm-answer-information.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_thm-entropy-at-most-log-values.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_exm-entropy-at-most-log-values.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_cor-question-information-bound.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_exm-sixty-three.qmd >}} + ## Chain rules {#sec-chain-rules} diff --git a/inst/WORDLIST b/inst/WORDLIST index bd403a97..7ea5602d 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -55,3 +55,4 @@ NP pseudorandom ELBO variational +wh diff --git a/references.bib b/references.bib index 589cd81c..1acb4e7f 100644 --- a/references.bib +++ b/references.bib @@ -167,3 +167,32 @@ @article{gallager1962low year = {1962}, doi = {10.1109/TIT.1962.1057683} } + +@article{hamblin1973questions, + author = {Hamblin, C. L.}, + title = {Questions in {M}ontague {E}nglish}, + journal = {Foundations of Language}, + volume = {10}, + number = {1}, + pages = {41--53}, + year = {1973}, + url = {https://www.jstor.org/stable/25000703} +} + +@phdthesis{groenendijk1984studies, + author = {Groenendijk, Jeroen and Stokhof, Martin}, + title = {Studies on the Semantics of Questions and the Pragmatics of Answers}, + school = {University of Amsterdam}, + year = {1984} +} + +@article{huddleston1994contrast, + author = {Huddleston, Rodney}, + title = {The contrast between interrogatives and questions}, + journal = {Journal of Linguistics}, + volume = {30}, + number = {2}, + pages = {411--439}, + year = {1994}, + doi = {10.1017/S0022226700016704} +} From c36033ad7dfabeed2ab41be55e0df1128084e7f8 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 04:12:35 +0000 Subject: [PATCH 02/12] Tighten question definitions and source attributions after review Review found that the partition claim held only up to a null event, a definition div carried a non-defining sentence, the remark credited Hamblin with the partition requirement that belongs to Groenendijk and Stokhof, and the corollary's title named only its polar case. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- _subfiles/_cor-question-information-bound.qmd | 2 +- _subfiles/_def-polar-question.qmd | 1 - _subfiles/_def-question.qmd | 7 ++++--- _subfiles/_rem-question-partition-source.qmd | 9 +++++---- _subfiles/_rem-question-types.qmd | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/_subfiles/_cor-question-information-bound.qmd b/_subfiles/_cor-question-information-bound.qmd index 53bae54a..b2c356f7 100644 --- a/_subfiles/_cor-question-information-bound.qmd +++ b/_subfiles/_cor-question-information-bound.qmd @@ -1,5 +1,5 @@ :::{#cor-question-information-bound} -#### A polar question yields at most one bit +#### An answer carries at most the logarithm of the number of answers Let $A$ be the [answer](#def-answer) to a [question](#def-question) with $k$ possible answers about a [discrete random variable](https://morrison-lab.github.io/pds/random-variables.html#def-discrete-rv) $X$ diff --git a/_subfiles/_def-polar-question.qmd b/_subfiles/_def-polar-question.qmd index 1090e098..baea117b 100644 --- a/_subfiles/_def-polar-question.qmd +++ b/_subfiles/_def-polar-question.qmd @@ -4,6 +4,5 @@ A **polar question**, or **yes-no question**, about $X$ is a [question](#def-question) with exactly two possible answers: the values of $X$ for which some statement holds, the answer "yes", and the values for which it fails, the answer "no". -"Polar question" is the name used below. ::: diff --git a/_subfiles/_def-question.qmd b/_subfiles/_def-question.qmd index f76a380e..1dad3572 100644 --- a/_subfiles/_def-question.qmd +++ b/_subfiles/_def-question.qmd @@ -5,8 +5,9 @@ Let $X$ be a [discrete random variable](https://morrison-lab.github.io/pds/rando and let $\srcalph$ be the set of its [values](https://morrison-lab.github.io/pds/random-variables.html#def-realization) with positive [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability). A **question** about $X$ is a collection of nonempty, disjoint subsets of $\srcalph$ whose union is $\srcalph$, -called its **possible answers**, -so that the events $\{X \in C\}$, one for each possible answer $C$, -form a [partition](https://morrison-lab.github.io/pds/probability-basics.html#def-partition) of the sample space. +called its possible answers. +Apart from an event of probability zero, +the events $\{X \in C\}$, one for each possible answer $C$, +then form a [partition](https://morrison-lab.github.io/pds/probability-basics.html#def-partition) of the sample space. ::: diff --git a/_subfiles/_rem-question-partition-source.qmd b/_subfiles/_rem-question-partition-source.qmd index f268563e..10f93bb5 100644 --- a/_subfiles/_rem-question-partition-source.qmd +++ b/_subfiles/_rem-question-partition-source.qmd @@ -1,11 +1,12 @@ ::: {#rem-question-partition-source} #### Questions as sets of answers in semantics -@def-question follows a line of work in the semantics of natural language. -@hamblin1973questions took a question to denote the set of propositions that count as its answers, +@hamblin1973questions took a question in natural language to denote the set of propositions that count as its answers, so that a question "sets up a choice-situation between a set of propositions". +Those answers need not exclude one another. @groenendijk1984studies took a question's answers to be mutually exclusive and to cover every possibility, -so that a question partitions the possibilities, -as the possible answers of a question partition $\srcalph$. +so that a question partitions the possibilities. +@def-question follows Groenendijk and Stokhof: +the possible answers of a question partition $\srcalph$. ::: diff --git a/_subfiles/_rem-question-types.qmd b/_subfiles/_rem-question-types.qmd index e94b18ac..37ebb06c 100644 --- a/_subfiles/_rem-question-types.qmd +++ b/_subfiles/_rem-question-types.qmd @@ -8,7 +8,7 @@ by how each kind defines its set of answers: - An *alternative question*, such as "Is it red or green?", has one answer for each alternative it lists. - A *variable question*, such as "Who called?", has one answer for each value of a variable, here the person who called. - In English a variable question opens with an interrogative word, such as *who*, *what*, *which*, *where*, *when*, *why*, or *how*, + In English a variable question usually contains an interrogative word, such as *who*, *what*, *which*, *where*, *when*, *why*, or *how*, so it is often called a *wh-question*. Each kind is a [question](#def-question) with a different number of possible answers: From 9b047ee5c8b2919524fd4e4f2b6fde966e2e579a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 04:16:18 +0000 Subject: [PATCH 03/12] Give possible answers their own definition and link terms at first use The repo's term-link check requires each defined term's first use in a div to link to its definition. Splitting "possible answer" out of the question definition (one term per definition div) also separates it from "answer", the random variable, which the check otherwise conflated. The partition-of-the-sample-space consequence moves to its own remark, since it is a property rather than part of the definition. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- _subfiles/_cor-question-information-bound.qmd | 10 +++++----- _subfiles/_def-answer.qmd | 8 +++----- _subfiles/_def-polar-question.qmd | 7 ++++--- _subfiles/_def-possible-answer.qmd | 8 ++++++++ _subfiles/_def-question.qmd | 10 ++++------ _subfiles/_exm-answer-information.qmd | 10 +++++----- _subfiles/_exm-entropy-at-most-log-values.qmd | 4 ++-- _subfiles/_exm-not-polar-question.qmd | 6 +++--- _subfiles/_exm-not-question.qmd | 10 ++++++---- _subfiles/_exm-question.qmd | 10 ++++++---- _subfiles/_exm-sixty-three.qmd | 6 +++--- _subfiles/_rem-question-partition-events.qmd | 11 +++++++++++ _subfiles/_rem-question-partition-source.qmd | 10 +++++----- _subfiles/_rem-question-types.qmd | 10 +++++----- _subfiles/_thm-entropy-at-most-log-values.qmd | 8 ++++---- entropy.qmd | 8 ++++++++ 16 files changed, 82 insertions(+), 54 deletions(-) create mode 100644 _subfiles/_def-possible-answer.qmd create mode 100644 _subfiles/_rem-question-partition-events.qmd diff --git a/_subfiles/_cor-question-information-bound.qmd b/_subfiles/_cor-question-information-bound.qmd index b2c356f7..e23e880f 100644 --- a/_subfiles/_cor-question-information-bound.qmd +++ b/_subfiles/_cor-question-information-bound.qmd @@ -1,7 +1,7 @@ :::{#cor-question-information-bound} -#### An answer carries at most the logarithm of the number of answers +#### An answer carries at most the logarithm of the number of possible answers -Let $A$ be the [answer](#def-answer) to a [question](#def-question) with $k$ possible answers +Let $A$ be the [answer](#def-answer) to a [question](#def-question) with $k$ [possible answers](#def-possible-answer) about a [discrete random variable](https://morrison-lab.github.io/pds/random-variables.html#def-discrete-rv) $X$ with finite [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy). With base-2 [logarithms](https://morrison-lab.github.io/mds/algebra-exponentials.html#def-logarithm), @@ -16,9 +16,9 @@ For a [polar question](#def-polar-question), $k = 2$, so the answer carries at m ::: {.proof} -Each possible answer is a nonempty set of values of $X$ with positive [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability), +Each [possible answer](#def-possible-answer) is a nonempty [set](https://morrison-lab.github.io/mcs/sets.html#def-set) of values of $X$ with positive [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability), so the answer $A$ has exactly $k$ values with positive probability, -and its entropy is finite. +and its [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) is finite. By @thm-answer-information and then @thm-entropy-at-most-log-values, $$ @@ -30,6 +30,6 @@ $$ $$ with equality exactly when $A$ is [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) on its $k$ values. -A polar question has $k = 2$ possible answers, and $\log_2 2 = 1$. +A [polar question](#def-polar-question) has $k = 2$ possible answers, and $\log_2 2 = 1$. ::: diff --git a/_subfiles/_def-answer.qmd b/_subfiles/_def-answer.qmd index 5ca09c57..be853f32 100644 --- a/_subfiles/_def-answer.qmd +++ b/_subfiles/_def-answer.qmd @@ -2,11 +2,9 @@ #### Answer For a [question](#def-question) about $X$, -write $a(x)$ for the possible answer that holds the value $x$. -The **answer** to the question is the random variable +write $a(x)$ for the [possible answer](#def-possible-answer) that holds the value $x$. +The **answer** to the question is the [random variable](https://morrison-lab.github.io/pds/random-variables.html#def-random-variable) -$$A \eqdef a(X),$$ - -the possible answer that holds the value of $X$. +$$A \eqdef a(X).$$ ::: diff --git a/_subfiles/_def-polar-question.qmd b/_subfiles/_def-polar-question.qmd index baea117b..d5efb0e6 100644 --- a/_subfiles/_def-polar-question.qmd +++ b/_subfiles/_def-polar-question.qmd @@ -1,8 +1,9 @@ :::{#def-polar-question} #### Polar question, yes-no question -A **polar question**, or **yes-no question**, about $X$ is a [question](#def-question) with exactly two possible answers: -the values of $X$ for which some statement holds, the answer "yes", -and the values for which it fails, the answer "no". +A **polar question**, or **yes-no question**, about $X$ is a [question](#def-question) +with exactly two [possible answers](#def-possible-answer): +the values of $X$ for which some statement holds, labeled "yes", +and the values for which it fails, labeled "no". ::: diff --git a/_subfiles/_def-possible-answer.qmd b/_subfiles/_def-possible-answer.qmd new file mode 100644 index 00000000..e4fd840b --- /dev/null +++ b/_subfiles/_def-possible-answer.qmd @@ -0,0 +1,8 @@ +:::{#def-possible-answer} +#### Possible answer + +A **possible answer** to a [question](#def-question) about $X$ +is one of the [subsets](https://morrison-lab.github.io/mcs/sets.html#def-subset) of $\srcalph$, as in @def-question, +that make up the question. + +::: diff --git a/_subfiles/_def-question.qmd b/_subfiles/_def-question.qmd index 1dad3572..d7d1aeb4 100644 --- a/_subfiles/_def-question.qmd +++ b/_subfiles/_def-question.qmd @@ -2,12 +2,10 @@ #### Question Let $X$ be a [discrete random variable](https://morrison-lab.github.io/pds/random-variables.html#def-discrete-rv), -and let $\srcalph$ be the set of its [values](https://morrison-lab.github.io/pds/random-variables.html#def-realization) +and let $\srcalph$ be the [set](https://morrison-lab.github.io/mcs/sets.html#def-set) of its [values](https://morrison-lab.github.io/pds/random-variables.html#def-realization) with positive [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability). -A **question** about $X$ is a collection of nonempty, disjoint subsets of $\srcalph$ whose union is $\srcalph$, -called its possible answers. -Apart from an event of probability zero, -the events $\{X \in C\}$, one for each possible answer $C$, -then form a [partition](https://morrison-lab.github.io/pds/probability-basics.html#def-partition) of the sample space. +A **question** about $X$ is a [collection](https://morrison-lab.github.io/mcs/sets.html#def-collection) +of nonempty, [disjoint](https://morrison-lab.github.io/pds/probability-basics.html#def-mutually-exclusive) [subsets](https://morrison-lab.github.io/mcs/sets.html#def-subset) of $\srcalph$ +whose [union](https://morrison-lab.github.io/mcs/sets.html#def-union) is $\srcalph$. ::: diff --git a/_subfiles/_exm-answer-information.qmd b/_subfiles/_exm-answer-information.qmd index 0f38df36..e01fca12 100644 --- a/_subfiles/_exm-answer-information.qmd +++ b/_subfiles/_exm-answer-information.qmd @@ -7,12 +7,12 @@ let $A$ be the [answer](#def-answer) to each of the two questions below in turn, and use base-2 [logarithms](https://morrison-lab.github.io/mds/algebra-exponentials.html#def-logarithm). - **"Is $X \ge 32$?"** - Each answer has [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $32/64 = 1/2$, + Each [possible answer](#def-possible-answer) has [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $32/64 = 1/2$, so its [surprisal](#def-surprisal) is $1$ [bit](#def-bit), - and the [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) of the answer, its expected surprisal, is $1$ bit. + and the [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) of the answer, its [expected](https://morrison-lab.github.io/pds/expectation.html#def-expectation) surprisal, is $1$ bit. By @thm-answer-information, the answer carries $\mutinfof{X}{A} = 1$ bit about $X$. - **"Is $X = 0$?"** - The answer "yes" has probability $1/64$ and the answer "no" has probability $63/64$, + The possible answer "yes" has probability $1/64$ and the possible answer "no" has probability $63/64$, so the entropy of the answer is $$ @@ -26,8 +26,8 @@ and use base-2 [logarithms](https://morrison-lab.github.io/mds/algebra-exponenti By @thm-answer-information, the answer carries about $0.116$ bits about $X$. -The answer "yes" to "Is $X = 0$?" is worth $6$ bits, +The reply "yes" to "Is $X = 0$?" is worth $6$ bits, but it is rare, -so the expected information from asking is far below the $1$ bit from "Is $X \ge 32$?". +so on average asking "Is $X = 0$?" gains far less than the $1$ bit from "Is $X \ge 32$?". ::: diff --git a/_subfiles/_exm-entropy-at-most-log-values.qmd b/_subfiles/_exm-entropy-at-most-log-values.qmd index d75c817d..a11eb207 100644 --- a/_subfiles/_exm-entropy-at-most-log-values.qmd +++ b/_subfiles/_exm-entropy-at-most-log-values.qmd @@ -5,9 +5,9 @@ A coin toss $X$ has $k = 2$ values, so @thm-entropy-at-most-log-values gives $\entropyf{X} \le \log_2 2 = 1$ [bit](#def-bit). - A fair coin is [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) on its two values, - so its [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) equals the bound, $1$ bit. + so its [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) equals $\log_2 2 = 1$ bit. - A coin that lands heads with [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $1/4$ - has entropy below the bound: + has entropy below $1$ bit: $$ \begin{aligned} diff --git a/_subfiles/_exm-not-polar-question.qmd b/_subfiles/_exm-not-polar-question.qmd index 1542f93d..49e5bc08 100644 --- a/_subfiles/_exm-not-polar-question.qmd +++ b/_subfiles/_exm-not-polar-question.qmd @@ -1,11 +1,11 @@ :::{#exm-not-polar-question} -#### A question with four answers is not polar +#### A question with four possible answers is not polar Let $X$ be as in @exm-question. -The question "What is the remainder of $X$ divided by $4$?" has four possible answers, +The question "What is the remainder of $X$ divided by $4$?" has four [possible answers](#def-possible-answer), one for each remainder $r \in \{0, 1, 2, 3\}$: -the set of values $x \in \srcalph$ whose remainder is $r$. +the [set](https://morrison-lab.github.io/mcs/sets.html#def-set) of values $x \in \srcalph$ whose remainder is $r$. These four sets form a [question](#def-question), but not a [polar question](#def-polar-question), which has exactly two possible answers. diff --git a/_subfiles/_exm-not-question.qmd b/_subfiles/_exm-not-question.qmd index 8bf6ac0d..d2a7220c 100644 --- a/_subfiles/_exm-not-question.qmd +++ b/_subfiles/_exm-not-question.qmd @@ -1,11 +1,13 @@ :::{#exm-not-question} -#### Overlapping answers do not form a question +#### Overlapping sets do not form a question Let $X$ be as in @exm-question. -The two sets $\{0, 1, \ldots, 40\}$ and $\{32, 33, \ldots, 63\}$ cover $\srcalph$, +The two [sets](https://morrison-lab.github.io/mcs/sets.html#def-set) $\{0, 1, \ldots, 40\}$ and $\{32, 33, \ldots, 63\}$ cover $\srcalph$, but both hold the values $32, 33, \ldots, 40$. -They are not disjoint, so they do not form a [question](#def-question): -when $X = 35$, no single possible answer holds the value of $X$. +They are not [disjoint](https://morrison-lab.github.io/pds/probability-basics.html#def-mutually-exclusive), +so they do not form a [question](#def-question), +and neither set is a [possible answer](#def-possible-answer): +when $X = 35$, no single one of the two sets holds the value of $X$. ::: diff --git a/_subfiles/_exm-question.qmd b/_subfiles/_exm-question.qmd index e7d53171..d43745b5 100644 --- a/_subfiles/_exm-question.qmd +++ b/_subfiles/_exm-question.qmd @@ -2,14 +2,16 @@ #### Is the number at least 32? -Let $X$ be [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) on the integers $0, 1, \ldots, 63$, +Let $X$ be [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) +on the [integers](https://morrison-lab.github.io/mcs/number-systems.html#def-integers) $0, 1, \ldots, 63$, so that $\srcalph = \{0, 1, \ldots, 63\}$. -The question "Is $X \ge 32$?" has two possible answers: +The question "Is $X \ge 32$?" has two [possible answers](#def-possible-answer): -- "yes", the set $\{32, 33, \ldots, 63\}$; +- "yes", the [set](https://morrison-lab.github.io/mcs/sets.html#def-set) $\{32, 33, \ldots, 63\}$; - "no", the set $\{0, 1, \ldots, 31\}$. -These two sets are nonempty and disjoint, and their union is $\srcalph$, +These two sets are nonempty and [disjoint](https://morrison-lab.github.io/pds/probability-basics.html#def-mutually-exclusive), +and their [union](https://morrison-lab.github.io/mcs/sets.html#def-union) is $\srcalph$, so they form a [question](#def-question), and a [polar question](#def-polar-question). If $X = 35$, the [answer](#def-answer) is $a(35) = \{32, 33, \ldots, 63\}$, that is, "yes". diff --git a/_subfiles/_exm-sixty-three.qmd b/_subfiles/_exm-sixty-three.qmd index c803b4de..42298ff2 100644 --- a/_subfiles/_exm-sixty-three.qmd +++ b/_subfiles/_exm-sixty-three.qmd @@ -3,9 +3,9 @@ In the game of twenty questions, -one player thinks of an object and the other identifies it by asking polar questions. +one player thinks of an object and the other identifies it by asking [polar questions](#def-polar-question). @mackay2003information [p. 70] simplifies the game to "sixty-three": -find an integer $X$ between $0$ and $63$, each equally likely, using [polar questions](#def-polar-question). +find an [integer](https://morrison-lab.github.io/mcs/number-systems.html#def-integers) $X$ between $0$ and $63$, each equally likely, using polar questions. Six questions suffice: 1. Is $X \ge 32$? @@ -28,7 +28,7 @@ No strategy can be sure to finish in fewer than six polar questions: five polar questions have at most $2^5 = 32$ combinations of answers, too few to tell $64$ values apart. -The single [variable question](#rem-question-types) "What is $X$?" has $64$ equally likely possible answers, +The single [variable question](#rem-question-types) "What is $X$?" has $64$ equally likely [possible answers](#def-possible-answer), so by @cor-question-information-bound its answer carries all $\log_2 64 = 6$ bits at once. ::: diff --git a/_subfiles/_rem-question-partition-events.qmd b/_subfiles/_rem-question-partition-events.qmd new file mode 100644 index 00000000..22fd887f --- /dev/null +++ b/_subfiles/_rem-question-partition-events.qmd @@ -0,0 +1,11 @@ +::: {#rem-question-partition-events} +#### A question partitions the sample space + +The [events](https://morrison-lab.github.io/pds/probability-basics.html#def-event) $\{X \in C\}$, +one for each [possible answer](#def-possible-answer) $C$ to a [question](#def-question) about $X$, +are disjoint, and together they hold every outcome at which $X$ takes a value in $\srcalph$, +an event of [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $1$. +So, apart from an event of probability $0$, they form a +[partition of the sample space](https://morrison-lab.github.io/pds/probability-basics.html#def-partition). + +::: diff --git a/_subfiles/_rem-question-partition-source.qmd b/_subfiles/_rem-question-partition-source.qmd index 10f93bb5..8b03728b 100644 --- a/_subfiles/_rem-question-partition-source.qmd +++ b/_subfiles/_rem-question-partition-source.qmd @@ -1,12 +1,12 @@ ::: {#rem-question-partition-source} #### Questions as sets of answers in semantics -@hamblin1973questions took a question in natural language to denote the set of propositions that count as its answers, +@hamblin1973questions took a question in natural language to denote the [set](https://morrison-lab.github.io/mcs/sets.html#def-set) of propositions that count as its replies, so that a question "sets up a choice-situation between a set of propositions". -Those answers need not exclude one another. -@groenendijk1984studies took a question's answers to be mutually exclusive and to cover every possibility, -so that a question partitions the possibilities. +Hamblin's account does not require those propositions to exclude one another. +@groenendijk1984studies took a question's replies to be [mutually exclusive](https://morrison-lab.github.io/pds/probability-basics.html#def-mutually-exclusive) and to cover every possibility, +so that a question [partitions](https://morrison-lab.github.io/pds/probability-basics.html#def-partition) the possibilities. @def-question follows Groenendijk and Stokhof: -the possible answers of a question partition $\srcalph$. +the [possible answers](#def-possible-answer) to a [question](#def-question) partition $\srcalph$. ::: diff --git a/_subfiles/_rem-question-types.qmd b/_subfiles/_rem-question-types.qmd index 37ebb06c..8bf2524e 100644 --- a/_subfiles/_rem-question-types.qmd +++ b/_subfiles/_rem-question-types.qmd @@ -2,16 +2,16 @@ #### Kinds of questions in grammar @huddleston1994contrast sorts questions into three kinds, -by how each kind defines its set of answers: +by how each kind defines the [set](https://morrison-lab.github.io/mcs/sets.html#def-set) of its replies: -- A [polar question](#def-polar-question), such as "Is it raining?", has the two answers yes and no. -- An *alternative question*, such as "Is it red or green?", has one answer for each alternative it lists. -- A *variable question*, such as "Who called?", has one answer for each value of a variable, +- A [polar question](#def-polar-question), such as "Is it raining?", has the two replies yes and no. +- An *alternative question*, such as "Is it red or green?", has one reply for each alternative it lists. +- A *variable question*, such as "Who called?", has one reply for each value of a variable, here the person who called. In English a variable question usually contains an interrogative word, such as *who*, *what*, *which*, *where*, *when*, *why*, or *how*, so it is often called a *wh-question*. -Each kind is a [question](#def-question) with a different number of possible answers: +Each kind is a [question](#def-question) with a different number of [possible answers](#def-possible-answer): two for a polar question, one per listed alternative for an alternative question, and one per value of the variable for a variable question, diff --git a/_subfiles/_thm-entropy-at-most-log-values.qmd b/_subfiles/_thm-entropy-at-most-log-values.qmd index d86b1e01..118f5484 100644 --- a/_subfiles/_thm-entropy-at-most-log-values.qmd +++ b/_subfiles/_thm-entropy-at-most-log-values.qmd @@ -18,7 +18,7 @@ with equality exactly when $X$ is [uniform](https://morrison-lab.github.io/pds/r Let $p$ be the [probability mass function](https://morrison-lab.github.io/pds/random-variables.html#def-pmf) of $X$, and let $q$ be the uniform probability mass function on the $k$ values $x$ with $p(x) > 0$, so $q(x) = 1/k$ at each of them. -The surprisal measured by $q$ is then the same at every one of those values: +The [surprisal](#def-surprisal) measured by $q$ is then the same at every one of those values: $$ \begin{aligned} @@ -29,7 +29,7 @@ $$ $$ The [Kullback--Leibler divergence](https://morrison-lab.github.io/pds/expectation.html#def-kl-divergence) of $q$ from $p$ -is the expectation of the surprisal measured by $q$ minus the surprisal measured by $p$: +is the [expectation](https://morrison-lab.github.io/pds/expectation.html#def-expectation) of the surprisal measured by $q$ minus the surprisal measured by $p$: $$ \begin{aligned} @@ -41,8 +41,8 @@ $$ \end{aligned} $$ -The sum in @thm-kl-divergence-nonnegative has finitely many terms, so it is finite, -and that theorem gives $\kldivf{p}{q} \ge 0$, +The sum in @thm-kl-divergence-nonnegative has [finitely many](https://morrison-lab.github.io/mcs/functions.html#def-finite-set) terms, so it is finite, +and @thm-kl-divergence-nonnegative then gives $\kldivf{p}{q} \ge 0$, with equality exactly when $q = p$. Hence $\log_2 k - \entropyf{X} \ge 0$, with equality exactly when $p$ is uniform on its $k$ values. diff --git a/entropy.qmd b/entropy.qmd index 50d39a23..f596e905 100644 --- a/entropy.qmd +++ b/entropy.qmd @@ -326,6 +326,14 @@ in *[Probability for Data Science](https://morrison-lab.github.io/pds/)*. {{< slidebreak >}} +{{< include ids/_subfiles/_def-possible-answer.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_rem-question-partition-events.qmd >}} + +{{< slidebreak >}} + {{< include ids/_subfiles/_def-answer.qmd >}} {{< slidebreak >}} From a137184e61322cb26d7ebf85a8c34db9c5365db8 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 04:17:01 +0000 Subject: [PATCH 04/12] Retitle the semantics remark to match its wording Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- _subfiles/_rem-question-partition-source.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_subfiles/_rem-question-partition-source.qmd b/_subfiles/_rem-question-partition-source.qmd index 8b03728b..c8df15de 100644 --- a/_subfiles/_rem-question-partition-source.qmd +++ b/_subfiles/_rem-question-partition-source.qmd @@ -1,5 +1,5 @@ ::: {#rem-question-partition-source} -#### Questions as sets of answers in semantics +#### Questions as sets of replies in semantics @hamblin1973questions took a question in natural language to denote the [set](https://morrison-lab.github.io/mcs/sets.html#def-set) of propositions that count as its replies, so that a question "sets up a choice-situation between a set of propositions". From a3535d21aa5ce2b8c076aec9210e1d6a88ccbc8a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 04:17:14 +0000 Subject: [PATCH 05/12] Link disjoint and outcome at first use in the partition remark Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- _subfiles/_rem-question-partition-events.qmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_subfiles/_rem-question-partition-events.qmd b/_subfiles/_rem-question-partition-events.qmd index 22fd887f..b044ae8c 100644 --- a/_subfiles/_rem-question-partition-events.qmd +++ b/_subfiles/_rem-question-partition-events.qmd @@ -3,7 +3,8 @@ The [events](https://morrison-lab.github.io/pds/probability-basics.html#def-event) $\{X \in C\}$, one for each [possible answer](#def-possible-answer) $C$ to a [question](#def-question) about $X$, -are disjoint, and together they hold every outcome at which $X$ takes a value in $\srcalph$, +are [disjoint](https://morrison-lab.github.io/pds/probability-basics.html#def-mutually-exclusive), +and together they hold every [outcome](https://morrison-lab.github.io/pds/probability-basics.html#def-experiment-outcome) at which $X$ takes a value in $\srcalph$, an event of [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $1$. So, apart from an event of probability $0$, they form a [partition of the sample space](https://morrison-lab.github.io/pds/probability-basics.html#def-partition). From a04a2401d4d2a3b3504152b44989f6500996a454 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 04:18:22 +0000 Subject: [PATCH 06/12] Prove that entropy is at most log2 of the number of values The questions section planned in #197 needs this bound to show that a polar question yields at most one bit, and no page in ids or pds states it yet. It follows from the nonnegativity of the KL divergence against the uniform distribution, written with surprisals, so it sits right after that theorem. This is the first batch of #197, split to keep each PR small. Part of #197 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- _subfiles/_exm-entropy-at-most-log-values.qmd | 21 ++++++++ _subfiles/_thm-entropy-at-most-log-values.qmd | 50 +++++++++++++++++++ entropy.qmd | 8 +++ 3 files changed, 79 insertions(+) create mode 100644 _subfiles/_exm-entropy-at-most-log-values.qmd create mode 100644 _subfiles/_thm-entropy-at-most-log-values.qmd diff --git a/_subfiles/_exm-entropy-at-most-log-values.qmd b/_subfiles/_exm-entropy-at-most-log-values.qmd new file mode 100644 index 00000000..a11eb207 --- /dev/null +++ b/_subfiles/_exm-entropy-at-most-log-values.qmd @@ -0,0 +1,21 @@ +:::{#exm-entropy-at-most-log-values} +#### A fair coin and a loaded coin + + +A coin toss $X$ has $k = 2$ values, so @thm-entropy-at-most-log-values gives $\entropyf{X} \le \log_2 2 = 1$ [bit](#def-bit). + +- A fair coin is [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) on its two values, + so its [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) equals $\log_2 2 = 1$ bit. +- A coin that lands heads with [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $1/4$ + has entropy below $1$ bit: + + $$ + \begin{aligned} + \entropyf{X} + &= -\tfrac{1}{4} \log_2 \tfrac{1}{4} - \tfrac{3}{4} \log_2 \tfrac{3}{4} \\ + &\approx 0.500 + 0.311 \\ + &\approx 0.811 \text{ bits}. + \end{aligned} + $$ + +::: diff --git a/_subfiles/_thm-entropy-at-most-log-values.qmd b/_subfiles/_thm-entropy-at-most-log-values.qmd new file mode 100644 index 00000000..118f5484 --- /dev/null +++ b/_subfiles/_thm-entropy-at-most-log-values.qmd @@ -0,0 +1,50 @@ +:::{#thm-entropy-at-most-log-values} +#### Entropy is at most the logarithm of the number of values + +Let $X$ be a [discrete random variable](https://morrison-lab.github.io/pds/random-variables.html#def-discrete-rv) +with exactly $k$ [values](https://morrison-lab.github.io/pds/random-variables.html#def-realization) +of positive [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability). +With base-2 [logarithms](https://morrison-lab.github.io/mds/algebra-exponentials.html#def-logarithm), +the [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) of $X$ is at most $\log_2 k$: + +$$\entropyf{X} \le \log_2 k,$$ + +with equality exactly when $X$ is [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) on those $k$ values. + +::: + +::: {.proof} + +Let $p$ be the [probability mass function](https://morrison-lab.github.io/pds/random-variables.html#def-pmf) of $X$, +and let $q$ be the uniform probability mass function on the $k$ values $x$ with $p(x) > 0$, +so $q(x) = 1/k$ at each of them. +The [surprisal](#def-surprisal) measured by $q$ is then the same at every one of those values: + +$$ +\begin{aligned} +\surprisalunderf{q}{x} +&= -\log_2 \tfrac{1}{k} \\ +&= \log_2 k. +\end{aligned} +$$ + +The [Kullback--Leibler divergence](https://morrison-lab.github.io/pds/expectation.html#def-kl-divergence) of $q$ from $p$ +is the [expectation](https://morrison-lab.github.io/pds/expectation.html#def-expectation) of the surprisal measured by $q$ minus the surprisal measured by $p$: + +$$ +\begin{aligned} +\kldivf{p}{q} +&= \E{\surprisalunderf{q}{X} - \surprisalf{X}} \\ +&= \E{\log_2 k - \surprisalf{X}} \\ +&= \log_2 k - \E{\surprisalf{X}} \\ +&= \log_2 k - \entropyf{X}. +\end{aligned} +$$ + +The sum in @thm-kl-divergence-nonnegative has [finitely many](https://morrison-lab.github.io/mcs/functions.html#def-finite-set) terms, so it is finite, +and @thm-kl-divergence-nonnegative then gives $\kldivf{p}{q} \ge 0$, +with equality exactly when $q = p$. +Hence $\log_2 k - \entropyf{X} \ge 0$, +with equality exactly when $p$ is uniform on its $k$ values. + +::: diff --git a/entropy.qmd b/entropy.qmd index 95c454f7..2b656c4c 100644 --- a/entropy.qmd +++ b/entropy.qmd @@ -276,6 +276,14 @@ in *[Probability for Data Science](https://morrison-lab.github.io/pds/)*. {{< slidebreak >}} +{{< include ids/_subfiles/_thm-entropy-at-most-log-values.qmd >}} + +{{< slidebreak >}} + +{{< include ids/_subfiles/_exm-entropy-at-most-log-values.qmd >}} + +{{< slidebreak >}} + {{< include ids/_subfiles/_thm-mutual-information-nonnegative.qmd >}} {{< slidebreak >}} From 856ff172c9943f21b6f0ed8e68425fab5b484e55 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 04:21:43 +0000 Subject: [PATCH 07/12] Include the entropy bound once, in the mutual information section Merging the full questions section brought a second include of the bound and its example. The bound now sits only after the KL theorem it uses, and the corollary refers back to it there. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- entropy.qmd | 8 -------- 1 file changed, 8 deletions(-) diff --git a/entropy.qmd b/entropy.qmd index dba9c7d4..5e2ce9c2 100644 --- a/entropy.qmd +++ b/entropy.qmd @@ -378,14 +378,6 @@ in *[Probability for Data Science](https://morrison-lab.github.io/pds/)*. {{< slidebreak >}} -{{< include ids/_subfiles/_thm-entropy-at-most-log-values.qmd >}} - -{{< slidebreak >}} - -{{< include ids/_subfiles/_exm-entropy-at-most-log-values.qmd >}} - -{{< slidebreak >}} - {{< include ids/_subfiles/_cor-question-information-bound.qmd >}} {{< slidebreak >}} From 1186b12da022adcc96d0d4ecacf7cb01b1278da7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 04:23:12 +0000 Subject: [PATCH 08/12] Break multi-clause lines at clause boundaries The automated review flagged two lines that each held two clauses, against the semantic-line-break rule. The same pattern appeared on two more new lines, fixed here too. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- _subfiles/_cor-question-information-bound.qmd | 3 ++- _subfiles/_exm-entropy-at-most-log-values.qmd | 6 ++++-- _subfiles/_exm-question.qmd | 3 ++- _subfiles/_thm-entropy-at-most-log-values.qmd | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/_subfiles/_cor-question-information-bound.qmd b/_subfiles/_cor-question-information-bound.qmd index e23e880f..ef825353 100644 --- a/_subfiles/_cor-question-information-bound.qmd +++ b/_subfiles/_cor-question-information-bound.qmd @@ -10,7 +10,8 @@ the [mutual information](#def-mutual-information) between $X$ and the answer is $$\mutinfof{X}{A} \le \log_2 k,$$ with equality exactly when the $k$ possible answers are equally likely. -For a [polar question](#def-polar-question), $k = 2$, so the answer carries at most $1$ bit about $X$. +For a [polar question](#def-polar-question), $k = 2$, +so the answer carries at most $1$ bit about $X$. ::: diff --git a/_subfiles/_exm-entropy-at-most-log-values.qmd b/_subfiles/_exm-entropy-at-most-log-values.qmd index a11eb207..e4d3d6fb 100644 --- a/_subfiles/_exm-entropy-at-most-log-values.qmd +++ b/_subfiles/_exm-entropy-at-most-log-values.qmd @@ -2,10 +2,12 @@ #### A fair coin and a loaded coin -A coin toss $X$ has $k = 2$ values, so @thm-entropy-at-most-log-values gives $\entropyf{X} \le \log_2 2 = 1$ [bit](#def-bit). +A coin toss $X$ has $k = 2$ values, +so @thm-entropy-at-most-log-values gives $\entropyf{X} \le \log_2 2 = 1$ [bit](#def-bit). - A fair coin is [uniform](https://morrison-lab.github.io/pds/random-variables.html#def-uniform) on its two values, - so its [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) equals $\log_2 2 = 1$ bit. + so by the equality case of @thm-entropy-at-most-log-values + its [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) equals $\log_2 2 = 1$ bit. - A coin that lands heads with [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability) $1/4$ has entropy below $1$ bit: diff --git a/_subfiles/_exm-question.qmd b/_subfiles/_exm-question.qmd index d43745b5..449e1a4a 100644 --- a/_subfiles/_exm-question.qmd +++ b/_subfiles/_exm-question.qmd @@ -14,6 +14,7 @@ These two sets are nonempty and [disjoint](https://morrison-lab.github.io/pds/pr and their [union](https://morrison-lab.github.io/mcs/sets.html#def-union) is $\srcalph$, so they form a [question](#def-question), and a [polar question](#def-polar-question). -If $X = 35$, the [answer](#def-answer) is $a(35) = \{32, 33, \ldots, 63\}$, that is, "yes". +If $X = 35$, the [answer](#def-answer) is $a(35) = \{32, 33, \ldots, 63\}$, +that is, "yes". ::: diff --git a/_subfiles/_thm-entropy-at-most-log-values.qmd b/_subfiles/_thm-entropy-at-most-log-values.qmd index 118f5484..f3b26383 100644 --- a/_subfiles/_thm-entropy-at-most-log-values.qmd +++ b/_subfiles/_thm-entropy-at-most-log-values.qmd @@ -41,7 +41,8 @@ $$ \end{aligned} $$ -The sum in @thm-kl-divergence-nonnegative has [finitely many](https://morrison-lab.github.io/mcs/functions.html#def-finite-set) terms, so it is finite, +The sum in @thm-kl-divergence-nonnegative has [finitely many](https://morrison-lab.github.io/mcs/functions.html#def-finite-set) terms, +so it is finite, and @thm-kl-divergence-nonnegative then gives $\kldivf{p}{q} \ge 0$, with equality exactly when $q = p$. Hence $\log_2 k - \entropyf{X} \ge 0$, From 38698621e6d7516a85d810539b7f72f07ccd449d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 04:26:17 +0000 Subject: [PATCH 09/12] Correct the overlapping-sets example and break more clause lines The automated review caught that the overlapping-sets example said no set holds X = 35, when both do; the defect is that the answer is not unique. It also flagged four more lines that each held two clauses. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- _subfiles/_exm-not-polar-question.qmd | 3 ++- _subfiles/_exm-not-question.qmd | 6 ++++-- _subfiles/_exm-question.qmd | 3 ++- _subfiles/_exm-sixty-three.qmd | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/_subfiles/_exm-not-polar-question.qmd b/_subfiles/_exm-not-polar-question.qmd index 49e5bc08..d4063a5d 100644 --- a/_subfiles/_exm-not-polar-question.qmd +++ b/_subfiles/_exm-not-polar-question.qmd @@ -7,6 +7,7 @@ The question "What is the remainder of $X$ divided by $4$?" has four [possible a one for each remainder $r \in \{0, 1, 2, 3\}$: the [set](https://morrison-lab.github.io/mcs/sets.html#def-set) of values $x \in \srcalph$ whose remainder is $r$. These four sets form a [question](#def-question), -but not a [polar question](#def-polar-question), which has exactly two possible answers. +but not a [polar question](#def-polar-question), +which has exactly two possible answers. ::: diff --git a/_subfiles/_exm-not-question.qmd b/_subfiles/_exm-not-question.qmd index d2a7220c..b81d250e 100644 --- a/_subfiles/_exm-not-question.qmd +++ b/_subfiles/_exm-not-question.qmd @@ -7,7 +7,9 @@ The two [sets](https://morrison-lab.github.io/mcs/sets.html#def-set) $\{0, 1, \l but both hold the values $32, 33, \ldots, 40$. They are not [disjoint](https://morrison-lab.github.io/pds/probability-basics.html#def-mutually-exclusive), so they do not form a [question](#def-question), -and neither set is a [possible answer](#def-possible-answer): -when $X = 35$, no single one of the two sets holds the value of $X$. +and neither set is a [possible answer](#def-possible-answer). +When $X = 35$, +both sets hold the value of $X$, +so no single set is its answer. ::: diff --git a/_subfiles/_exm-question.qmd b/_subfiles/_exm-question.qmd index 449e1a4a..1045fa0f 100644 --- a/_subfiles/_exm-question.qmd +++ b/_subfiles/_exm-question.qmd @@ -14,7 +14,8 @@ These two sets are nonempty and [disjoint](https://morrison-lab.github.io/pds/pr and their [union](https://morrison-lab.github.io/mcs/sets.html#def-union) is $\srcalph$, so they form a [question](#def-question), and a [polar question](#def-polar-question). -If $X = 35$, the [answer](#def-answer) is $a(35) = \{32, 33, \ldots, 63\}$, +If $X = 35$, +the [answer](#def-answer) is $a(35) = \{32, 33, \ldots, 63\}$, that is, "yes". ::: diff --git a/_subfiles/_exm-sixty-three.qmd b/_subfiles/_exm-sixty-three.qmd index 42298ff2..57884b33 100644 --- a/_subfiles/_exm-sixty-three.qmd +++ b/_subfiles/_exm-sixty-three.qmd @@ -3,7 +3,8 @@ In the game of twenty questions, -one player thinks of an object and the other identifies it by asking [polar questions](#def-polar-question). +one player thinks of an object, +and the other identifies it by asking [polar questions](#def-polar-question). @mackay2003information [p. 70] simplifies the game to "sixty-three": find an [integer](https://morrison-lab.github.io/mcs/number-systems.html#def-integers) $X$ between $0$ and $63$, each equally likely, using polar questions. Six questions suffice: From 78493efd6b52d31d11484fc9aebbac6fbf3984e4 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 04:48:42 +0000 Subject: [PATCH 10/12] Pin lint runners to ubuntu-24.04 to match their noble R binaries ubuntu-latest moved to a newer release whose system libraries lack libxml2.so.2, which the noble xml2 binary from the pinned Posit Package Manager URL needs, so both lint jobs failed while installing lintr. Pinning the runner to the release the URL names keeps the binaries and the system libraries in step. Fixes #199 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- .github/workflows/lint-changed-files.yaml | 3 ++- .github/workflows/lint-project.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-changed-files.yaml b/.github/workflows/lint-changed-files.yaml index fd16d4b3..41151d37 100644 --- a/.github/workflows/lint-changed-files.yaml +++ b/.github/workflows/lint-changed-files.yaml @@ -19,7 +19,8 @@ concurrency: jobs: lint-changed-files: - runs-on: ubuntu-latest + # Pinned to match the noble binary repo used below (issue #199). + runs-on: ubuntu-24.04 env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: diff --git a/.github/workflows/lint-project.yaml b/.github/workflows/lint-project.yaml index df0c5c81..65fd53a6 100644 --- a/.github/workflows/lint-project.yaml +++ b/.github/workflows/lint-project.yaml @@ -11,7 +11,8 @@ permissions: read-all jobs: lint-project: - runs-on: ubuntu-latest + # Pinned to match the noble binary repo used below (issue #199). + runs-on: ubuntu-24.04 env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: From 4fe4cec8e136c67bd0553d6cca4926d522436238 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 05:10:15 +0000 Subject: [PATCH 11/12] State finiteness of k and scope the not-a-question claim A cross-model review (deepseek-v4.1-flash via OpenCode Go) pointed out that the bound H(X) <= log2 k and its corollary rely on k being finite, which the statements left implicit, and that "neither set is a possible answer" is false out of context: {0, ..., 40} is a possible answer of the question {{0, ..., 40}, {41, ..., 63}}. The claim now says neither set is a possible answer of a question made from these two sets. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- _subfiles/_cor-question-information-bound.qmd | 2 +- _subfiles/_exm-not-question.qmd | 2 +- _subfiles/_thm-entropy-at-most-log-values.qmd | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/_subfiles/_cor-question-information-bound.qmd b/_subfiles/_cor-question-information-bound.qmd index ef825353..be4dcc31 100644 --- a/_subfiles/_cor-question-information-bound.qmd +++ b/_subfiles/_cor-question-information-bound.qmd @@ -1,7 +1,7 @@ :::{#cor-question-information-bound} #### An answer carries at most the logarithm of the number of possible answers -Let $A$ be the [answer](#def-answer) to a [question](#def-question) with $k$ [possible answers](#def-possible-answer) +Let $A$ be the [answer](#def-answer) to a [question](#def-question) with [finitely many](https://morrison-lab.github.io/mcs/functions.html#def-finite-set) [possible answers](#def-possible-answer), $k$ of them, about a [discrete random variable](https://morrison-lab.github.io/pds/random-variables.html#def-discrete-rv) $X$ with finite [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy). With base-2 [logarithms](https://morrison-lab.github.io/mds/algebra-exponentials.html#def-logarithm), diff --git a/_subfiles/_exm-not-question.qmd b/_subfiles/_exm-not-question.qmd index b81d250e..e8ecd5c0 100644 --- a/_subfiles/_exm-not-question.qmd +++ b/_subfiles/_exm-not-question.qmd @@ -7,7 +7,7 @@ The two [sets](https://morrison-lab.github.io/mcs/sets.html#def-set) $\{0, 1, \l but both hold the values $32, 33, \ldots, 40$. They are not [disjoint](https://morrison-lab.github.io/pds/probability-basics.html#def-mutually-exclusive), so they do not form a [question](#def-question), -and neither set is a [possible answer](#def-possible-answer). +and neither set is a [possible answer](#def-possible-answer) of a question made from these two sets. When $X = 35$, both sets hold the value of $X$, so no single set is its answer. diff --git a/_subfiles/_thm-entropy-at-most-log-values.qmd b/_subfiles/_thm-entropy-at-most-log-values.qmd index f3b26383..8d0a7bd4 100644 --- a/_subfiles/_thm-entropy-at-most-log-values.qmd +++ b/_subfiles/_thm-entropy-at-most-log-values.qmd @@ -3,7 +3,8 @@ Let $X$ be a [discrete random variable](https://morrison-lab.github.io/pds/random-variables.html#def-discrete-rv) with exactly $k$ [values](https://morrison-lab.github.io/pds/random-variables.html#def-realization) -of positive [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability). +of positive [probability](https://morrison-lab.github.io/pds/probability-basics.html#def-probability), +for a [positive integer](https://morrison-lab.github.io/mcs/number-systems.html#def-positive-integer) $k$. With base-2 [logarithms](https://morrison-lab.github.io/mds/algebra-exponentials.html#def-logarithm), the [entropy](https://morrison-lab.github.io/pds/expectation.html#def-entropy) of $X$ is at most $\log_2 k$: From eedb921ab3958e842adee33593f5e0395bf6e223 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 05:20:12 +0000 Subject: [PATCH 12/12] Add the cited authors' names to the spelling wordlist A cross-model review noted that Groenendijk, Stokhof and Hamblin's appear in prose but not in inst/WORDLIST. The CI spellcheck passes today because it does not scan _subfiles, but a local spelling::spell_check_files run flags them, so list them (and Huddleston) now rather than when the check widens. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019xfc9qRDBvWFuW2CN5Ypxm --- inst/WORDLIST | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inst/WORDLIST b/inst/WORDLIST index 7ea5602d..1005fe06 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -56,3 +56,8 @@ pseudorandom ELBO variational wh +Groenendijk +Hamblin +Huddleston +Stokhof +Hamblin's