Fix inaccuracies and bugs in study notes#32
Merged
Conversation
Audited all six interactive study notes for factual/mathematical errors and code bugs, then verified each finding before fixing: - MDP: corrected the "after convergence" value vector and worked Q-value arithmetic ([70,80,94,106,113] → [74,84,96,107,114]) to match the values the embedded value-iteration demo actually produces. - Rigged coin: theoryPower() passed the flips slider (nS) as the bias p, giving p>1 → sqrt of a negative → NaN in the predicted-power bar. Use the bias slider pS instead so the predicted bar matches the simulation. - Options: the numeric E[payoff] integral was truncated at a fixed x<600, undershooting Black–Scholes by up to ~16% at high vol where the lognormal tail extends past 600. Integrate over a distribution-scaled domain (6σ above E[log S_T]) with a fixed sample count so it converges onto the closed form without blowing up per-redraw cost. - Boltzmann: DEMO C legend swatch for "high energy" used --sn-bad (red) but the bars interpolate toward --sn-muted; aligned the swatch to --sn-muted. - Shannon entropy: "exactly 1 bit" message fired across p∈(0.45,0.55) where single-outcome surprise −log2 p ranges 0.86–1.15 bits; tightened to p≈0.5. - Temperature/entropy: "nats are bits × ln 2" read as a unit identity (backwards); reworded as an entropy-value conversion (1 nat ≈ 1.44 bits). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MHHjQGmN3Rm3rG8XgD1R7j
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audited all six interactive study notes for factual/mathematical errors
and code bugs, then verified each finding before fixing:
arithmetic ([70,80,94,106,113] → [74,84,96,107,114]) to match the values
the embedded value-iteration demo actually produces.
giving p>1 → sqrt of a negative → NaN in the predicted-power bar. Use the
bias slider pS instead so the predicted bar matches the simulation.
undershooting Black–Scholes by up to ~16% at high vol where the lognormal
tail extends past 600. Integrate over a distribution-scaled domain
(6σ above E[log S_T]) with a fixed sample count so it converges onto the
closed form without blowing up per-redraw cost.
the bars interpolate toward --sn-muted; aligned the swatch to --sn-muted.
single-outcome surprise −log2 p ranges 0.86–1.15 bits; tightened to p≈0.5.
(backwards); reworded as an entropy-value conversion (1 nat ≈ 1.44 bits).
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01MHHjQGmN3Rm3rG8XgD1R7j