-- Compute Balmer's coefficient using linear regression m = (3,3,3,3,3,4,4,4,4,4,5,5,5,6,6,6,7,8,8,9,9,10,10,11,11) x = m^2 / (m^2 - 4) y = ( 6565.60, 6562.10, 6561.62, 6560.70, 6559.50, 4863.94, 4860.74, 4860.16, 4859.80, 4859.74, 4342.80, 4340.10, 4338.60, 4103.80, 4101.20, 4100.00, 3969.00, 3887.50, 3887.00, 3834.00, 3834.00, 3795.00, 3795.00, 3767.50, 3769.00) "Model coefficient" beta = dot(x,y) / dot(x,x) beta
Run