You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example 4 of lectures/ge_arrow.md defines a 3-state transition matrix whose second row does not sum to 1, so it is not a valid stochastic matrix (ge_arrow.md#L1270 on main):
All of Example 4's published output (Q, R, A, α, ψ, J) is computed from this matrix, so the numbers shown on the live lecture page for that example don't correspond to a well-defined Markov economy.
Likely intended matrix
The natural reading, given row 3's pattern of splitting the off-diagonal mass, is that row 2 was meant to be [(1-μ)/2, μ, (1-μ)/2] = [0.05, 0.9, 0.05] — a sticky "moderate" state — which sums to 1. Someone closer to the original intent (perhaps Tom) should confirm before we change the published numbers.
Suggested fix
Correct row 2 (pending confirmation of intent) and refresh Example 4's discussion if any printed values are referenced in the text.
Add a cheap validation when the model is constructed, e.g. assert np.allclose(P.sum(axis=1), 1), so an invalid transition matrix fails loudly instead of silently producing plausible-looking output. The NumPy restructure discussed in [ge_arrow] Update to JAX and compare runtime #717 (a validating factory alongside the NamedTuple) is a natural home for this.
Context
Found during the style-guide review that wrapped up #717. The bug pre-dates that PR — it is present on main and was carried over unchanged by the JAX rewrite.
Problem
Example 4 of
lectures/ge_arrow.mddefines a 3-state transition matrix whose second row does not sum to 1, so it is not a valid stochastic matrix (ge_arrow.md#L1270 onmain):Row sums: row 1 =
0.1 + 0.9 + 0 = 1✅, row 2 =0.45 + 0.9 + 0.45 = 1.8❌, row 3 =0.475 + 0.475 + 0.05 = 1✅.All of Example 4's published output (
Q,R,A,α,ψ,J) is computed from this matrix, so the numbers shown on the live lecture page for that example don't correspond to a well-defined Markov economy.Likely intended matrix
The natural reading, given row 3's pattern of splitting the off-diagonal mass, is that row 2 was meant to be
[(1-μ)/2, μ, (1-μ)/2]=[0.05, 0.9, 0.05]— a sticky "moderate" state — which sums to 1. Someone closer to the original intent (perhaps Tom) should confirm before we change the published numbers.Suggested fix
assert np.allclose(P.sum(axis=1), 1), so an invalid transition matrix fails loudly instead of silently producing plausible-looking output. The NumPy restructure discussed in [ge_arrow] Update to JAX and compare runtime #717 (a validating factory alongside theNamedTuple) is a natural home for this.Context
Found during the style-guide review that wrapped up #717. The bug pre-dates that PR — it is present on
mainand was carried over unchanged by the JAX rewrite.