powered by
meanH
Mean of a histogram (First moment of the distribution)
meanH(object)# S4 method for distributionH meanH(object)
# S4 method for distributionH meanH(object)
the mean of the distribution
a distributionH object
distributionH
Antonio Irpino
## ---- A mydist distribution ---- mydist <- distributionH(x = c(1, 2, 3, 10), p = c(0, 0.1, 0.5, 1)) ## ---- Compute the mean of mydist ---- meanH(mydist) #---> 4.4
Run the code above in your browser using DataLab