search for: riemann_integral

Displaying 1 result from an estimated 1 matches for "riemann_integral".

2010 Mar 13
2
Is this a bug (or a feature) in hist(x)$density ??
Hi all, A friend send me a question on why does this: x<-rpois(100,1) sum( hist(x)$density ) Gives out "2" I tried this: sum( hist(x, freq =T)$density ) It didn't help. Then he came back with the following insight: # with breaks b<-c(0,0.9,1:8) sum(hist(x,breaks=b)$density) # Much more then 2 # but if we add weights according to the interval length