MATLAB: How to analyze a distribution parameters

distributionmaxmeanmedianparameter estimationsignal processingstatisticsstd

Hi,
I have a distribution of pixels (y) as a function of a parameter (x) where every y value (bin) is the total number of pixels at a given value of x. I'd like to analyze this distribution for mean, median, max, std, etc, and find the corresponding x values for these measurements. Anybody have a way to do this?
Thanks,
Avi

Best Answer

I fail to see what the difficulty is here. If x is a vector containing all the values of the parameter in question, then y is a vector of all the corresponding pixel counts and y/sum(y) is a vector of the probabilities of each value of x. The mean value of x would then be:
m = sum(x.*y/sum(y))
The standard deviation would be:
s = sqrt(sum((x-m).^2*y/sum(y)))
Related Question