geekLections — inClement elections, geekily.
geekLections Forecasting Engine · Arm 1 (PyMC v5) + Arm 2 (Svelte 5) Gamma-Quotient Simplex + Booth GP

Bayesian Multi-Party Polling Aggregation & Lower-House Booth Model

Gamma-Quotient Bayesian State-Space Polling Fan Chart (50% & 90% Credible Ribbons)

Loading posterior polling trajectory...

Pollster House Effects Forest Plot (CLR-Anchored Percentage-Point Bias)

Loading pollster house effects...

Interactive Gamma-Quotient (GQD) & Division 2CP Posterior Simulator (Outputs A–E)

Live Browser Monte Carlo (N = 2,500)

Adjust individual party primary shares and party-specific standard deviations (σp) below. The browser computes the exact Gamma Quotient Distribution parameters (αp, βp), simulates preference transfers, and outputs (A) 2PP Beta, (B) First-Preference GQD, (C) 2CP Matchup Probabilities, (D) Conditional 2CP Betas, and (E) Candidate Win Probabilities.

Output (E) — Overall Candidate Win Probabilities (Σ P(Winc) = 100%):
ALP
93.0%
LNP
7.0%
GRN
0.0%
IND
0.0%
ONP
0.0%
Output (B) — Division First-Preference Gamma Quotient Distribution GQD(α, β):
0%10%20%30%40%50%
PartyAdjust ShareAdjust SD (σp)Simplex μpσpGQD αpGQD βp
ALP Labor (ALP)31.5%±2.2%96.2304.4
LNP Coalition (LNP)34.5%±2.4%88.7256.0
GRN The Greens (GRN)14.5%±1.8%47.4326.2
IND Independent / Teal12.5%±2.6%17.7140.6
ONP One Nation (ONP)7.0%±1.4%21.6307.9

Output (A) — Classic 2PP Beta (ALP vs LNP)

θ2PP ~ Beta(169.0, 153.5)

ALP 2PP Mean: 52.4% (±2.8%)

Outputs (C) & (D) — 2CP Matchup Probabilities & Conditional Betas

Final-Two PairMatchup Prob (C)Conditional Beta(a, b) (D)Cand 1 MeanP(Win1 | Pair)
ALP vs LNP100.0%Beta(142.8, 121.0)54.1%93.0%

Mathematical Summary & Manual CLI Pipeline

1. Why Gamma Quotients (Scaled Dirichlet) Instead of Standard Dirichlet?

A standard n-party Dirichlet distribution Dir(α1, …, αn) has only one global concentration parameter α0 = Σαi, locking all n party variances to Var(Xi) = μi(1 − μi) / (α0 + 1). By drawing independent Gamma random variables Yi ~ Gamma(αi, βi) with party-specific rate parameters βi and normalizing Pi = Yi / ΣYj, we gain 2n − 1 degrees of freedom on the simplex—allowing major parties (ALP, L/NP) and minor/micro parties (GRN, ONP, Ind/Teals) to exhibit realistic, independent volatility and pollster house effects while remaining strictly order-invariant.

2. Lower-House Booth Covariance, Redistributions & Declaration Votes (Outputs A–E)

On election night, ordinary polling booths report early while Pre-Poll Voting Centres (PPVCs), Postal Votes (modeled via daily AEC Issued PVA counts × return rate ρd and arrival curve F(t)), and Absent votes arrive over subsequent days with systematic late-Coalition / Green-Absent tilts. Our spatial-demographic Gaussian Process updates unobserved booths and non-ordinary vote pools in real time, producing for every electoral division:

  • Output (A): Marginal Two-Party Preferred (2PP) Beta distribution Beta(α2PP, β2PP).
  • Output (B): First-Preference Gamma-Quotient Distribution GQD(αd, βd).
  • Output (C): Final Two-Candidate Preferred (2CP) matchup probabilities Pr(2CP = {i, j}) across Classic, Green, Teal/Independent, and One Nation contests.
  • Output (D): Conditional Beta distribution Beta(αij, βij) for every plausible 2CP pair.
  • Output (E): Total candidate win probability Wi ∈ [0, 100%] marginalizing over all 2CP matchups.

3. Running the Python Pipeline Locally

Raw AEC CSVs, boundary shapefiles, and PyMC NetCDF chains are stored outside Git in your cloud-synced GL_DATA_DIR directory, while distilled JSON summaries with SHA-256 provenance manifests are written to static/data/:

uv run python -m pipeline.cli check-env
uv run python -m pipeline.cli generate-demo-data