+--------------------------------------+ |VARIAB = HSTATI (ID,ICASE,CHOICE,NUM) | +--------------------------------------+
Action: This function of type REAL returns the mean value, standard deviation or number of equivalent events of a 1-dimensional distribution. Underflows and overflows are not included in the calculation.
If HIDOPT(ID,'STAT') STAT has been called, the results are based on the information stored at filling time. Otherwise the results are based on the channel contents only. If x and w represent the value and i i contents of event i, then one has the following relations:
n n Expectation value E(x) = ((sum w x )/(sum w )) i=1 i i i=1 i Mean value = E(x) n Central moment of order n, M(n) = E((x-E(x)) ) Standard deviation = sqrt(M(2)) n 2 n 2 Number of equivalent events = (((sum w ) )/(sum w )) i=1 i i=1 i