How Are β Coefficients Calculated?
In a real clinical model, β₀, β₁, and β₂ are never manually set. They are calculated from patient training data using Ordinary Least Squares (OLS).
OLS finds values of β that minimise the total squared gap between each patient's actual SBP and the model's prediction. This has an exact mathematical solution:
β = (XᵀX)⁻¹ Xᵀy
Training data → OLS → optimal β₀, β₁, β₂
The sliders let you explore the impact
of different values. Click "Auto-Fit" to watch
gradient descent learn the correct β values
from the data.