-- www.eigenmath.org/muon-production-4.txt -- Compute R-squared for electroweak theory. -- Data from www.hepdata.net/record/ins216031 (Table 1, 29.0 GeV) N = 20 -- number of observations -- x is cos(theta) x = ( -0.925, -0.85, -0.75, -0.65, -0.55, -0.45, -0.35, -0.25, -0.15, -0.05, 0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.925) -- y is (2E)^2 times differential cross section (2E = 29 GeV) y = ( 67.08, 58.67, 54.66, 51.72, 43.7, 41.12, 39.71, 35.34, 33.35, 34.69, 34.05, 34.48, 34.66, 35.23, 35.6, 40.13, 42.56, 46.37, 49.28, 55.7) "predicted values" alpha = 0.0072973525693 hbar = 6.582119569 10^(-25) -- GeV seconds c = 299792458.0 gA = -0.5 gV = -0.0348 mZ = 91.17 -- GeV G1 = 1.166 10^(-5) -- Fermi coupling constant in GeV^(-2) s = 29.0^2 -- GeV^2 F = alpha^2/4 (1 + gV^2/(sqrt(2) pi) mZ^2/(s - mZ^2) s G1/alpha + (gA^2 + gV^2)^2/(8 pi^2) (mZ^2/(s - mZ^2))^2 (s G1/alpha)^2) G = alpha^2/4 (sqrt(2) gA^2/pi mZ^2/(s - mZ^2) s G1/alpha + gA^2 gV^2/pi^2 (mZ^2/(s - mZ^2))^2 (s G1/alpha)^2) yhat = zero(N) for(k,1,N, yhat[k] = 2 pi (F (1 + x[k]^2) + G x[k]) (hbar c)^2 10^37 ) yhat = float(yhat) yhat "coefficient of determination (R-squared)" ybar = 1/N sum(k,1,N,y[k]) SSE = sum(k,1,N,(y[k] - yhat[k])^2) SST = sum(k,1,N,(y[k] - ybar)^2) 1 - SSE/SST