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:
parent
1b92d88403
commit
b4c463b16f
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user