Visualizes maximum likelihood estimation with fixed Bernoulli data: θ moves along a slider while the likelihood L(θ) and log-likelihood ℓ(θ)=log L(θ) curves are plotted. The MLE θ̂ is highlighted as the argmax of both L(θ) and ℓ(θ), and a score indicator shows the first-order condition dℓ/dθ=0 at the maximizer.
Self-contained Canvas2D rendering. Uses responsive scaling via scale=min(w,h)/240, grid-snapped rectangles for a retro blocky look, and time-based ping-pong animation for θ. Likelihood is computed from Bernoulli sufficient statistics (k,n) and normalized for plotting; log-likelihood is min/max normalized. Score sign is derived from d/dθ logL = k/θ − (n−k)/(1−θ).