Bugfix in from_pick: Something was wrong with calculation of expectation value. However, this might still not be fully correctly!

This commit is contained in:
Ludger Küperkoch 2017-02-23 15:43:05 +01:00
parent 1b92d88403
commit b4c463b16f

View File

@ -307,10 +307,14 @@ class ProbabilityDensityFunction(object):
:return float: rval :return float: rval
''' '''
rval = 0 #rval = 0
for x in self.axis: #for x in self.axis:
rval += x * self.data(x) # rval += x * self.data(x)
return rval * self.incr rval = self.mu
# Not sure about this! That might not be the barycentre.
# However, for std calculation (next function)
# self.mu is also used!! (LK, 02/2017)
return rval
def standard_deviation(self): def standard_deviation(self):
mu = self.mu mu = self.mu