Skip to content

Fix inaccuracies and bugs in study notes#32

Merged
Alexdruso merged 1 commit into
masterfrom
claude/study-notes-accuracy-ps9j3j
Jun 23, 2026
Merged

Fix inaccuracies and bugs in study notes#32
Alexdruso merged 1 commit into
masterfrom
claude/study-notes-accuracy-ps9j3j

Conversation

@Alexdruso

Copy link
Copy Markdown
Owner

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

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
@Alexdruso Alexdruso merged commit 454c9b7 into master Jun 23, 2026
2 checks passed
@Alexdruso Alexdruso deleted the claude/study-notes-accuracy-ps9j3j branch June 23, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants