Open A-A-Abdelhamid opened 1 year ago
Consulting "Wikipedia" as advised, this is the simplified error propagation formula:
Acceptance (A) = passed events/(passed+ non-passed events) = p/(p+n) Uncertainty for p (passed) is square root p, for n (did not pass) is square root n
dA/dp = n/(p+n)^2
dA/dn = p/(p+n)^2
p = 7856 # Number of passed events
n= 20000-p # Number of events that did not pass
p_err= math.sqrt(p)
n_err= math.sqrt(n)
dA_dp= n/((n+p)**2)
dA_dn= p/((n+p)**2)
sigma_A= math.sqrt((dA_dp*p_err)**2 + (dA_dn*n_err)**2 )
A= p/(p+n)
print("Acceptance is: ", A, "with uncertainty of +/-", sigma_A)
And the output is:
Acceptance is: 0.3928 with uncertainty of +/- 0.0034533184040861334
Both methods agree to 2 significant-figure value of uncertainty = "0.0034"
Using this code:
I got
I also did it manually in the next comment, and they reasonably agree.