April 2018
Intermediate to advanced
408 pages
10h 42m
English
The
value is based on
, where the e values are the expected values and the o values are the observed values. In our case, we have two dimensions, shift, s, and defect type, t, which leads to
.
We can compute the specified formula's value as follows:
diff = lambda e, o: (e-o)**2/echi2 = sum( diff(expected[s, t], defects[s, t]) for s in shift_totals for t in type_totals)
We've defined a small lambda to help us optimize ...