Math lab

Mathematics you can poke

AIME qualifier, Prairie Math League problem writer, Math Club leader. These are pieces of mathematics you can play with directly.

Markov chain

The Monopoly board lab

Every roll moves the token from one square to another with probabilities that depend only on where it is now. Write those as a 40×40 matrix and you can compute how often each square gets landed on in the long run. I first built this model for a Markov chains project (the slides were made with classmates Ollie and Zack). Click a square to start there.

Exactly what the model assumes

    Simulation vs the model

    Roll real dice with properly shuffled Chance and Community Chest decks (cards go back to the bottom), count every landing, and compare with the matrix's long-run answer. The same seed always gives the same run.

    Red bar: simulated share. Black tick: the model's prediction. Total variation distance measures the gap (0 = identical).

    Open the original (heatmap and stationary distribution)

    Dual numbers

    ε² = 0

    Invent a number ε that isn't zero but squares to zero. Feed a+ε into a function and the coefficient of ε comes out as exactly the derivative: the slope of the tangent. Drag a and watch them move together. From my essay ε: The Number That Squares to Zero.


    Modelling

    Fit a line by hand

    Drag the ends of the black line to make the red squares (the squared errors) as small as you can; the dashed green line is the least-squares answer. Drag the red points to change the data, or add an outlier and watch it drag the line. Demonstration data, not measurements.

    Why squares? Squaring punishes big misses harder and gives the best line a neat closed formula. The price: a single outlier can pull the line a long way.


    The Riemann hypothesis

    The zeta function on the critical line

    The Riemann hypothesis says every non-trivial zero of ζ has real part exactly ½. Left: Hardy's Z function, which crosses zero exactly where ζ(½+it) = 0. Right: the path ζ(σ+it) traces as t grows. At σ = 0.5 the path keeps passing through the origin; move σ off ½ and it swerves around it. Companion to What is the Riemann hypothesis?

    Computed live: ζ via Borwein's accelerated alternating series, Z(t) via the Riemann–Siegel formula. Zeros marked are the known first thirteen.


    Probability calibration

    When you say 80%, are you right 80% of the time?

    After ten questions you'll see your calibration chart and Brier score here.


    Spot the flaw

    Which step is wrong?


      七可模

      Two tricks with mod 7

      My poem sequence 七 ends with “七可模”: seven can be taken modulo. A week has seven days, so “what weekday was it?” is a mod-7 problem.

      What weekday was it?

      Is it divisible by 7?

      Rule: chop off the last digit and subtract twice it from the rest. The result is divisible by 7 exactly when the original was, because 10a + b ≡ 0 ⇔ a − 2b ≡ 0 (mod 7).


      Game theory

      Prisoner's dilemma: a mystery opponent and a tournament

      Each round you both secretly choose Cooperate (C) or Defect (D). Both cooperate: 3 each. Both defect: 1 each. One defects on a cooperator: 5 for the defector, 0 for the sucker. My original lab is on the Play page.

      1. Play 10 rounds against a mystery opponent

      You

      Them

      2. Design a strategy and enter the tournament

      Round robin, 200 rounds per match, against eight classic strategies plus any of yours saved on this device.