One more thing: In the macro I sent you the value of Result depends on the number of bins. I am not sure that’s something you want. For example with NumberOfBins = 50 you get Result = 8.86793 and with NumberOfBins = 100 you get Result = 18.7001. Somehow you will need to normalize the computation of Result in order to make it independent of the number of bins.
Dear Olivier,
Yes, I noticed that.
I got the values I was looking for when I increased the number of bins to 6000.
I do not know if that is the right thing to do