Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

how to get mean and std from a known CDF curve

Asked by Ziyan on 28 Jul 2013

Hello,

I'm a student now doing a project associated with stats a little bit. I need to find the mean and std values from a cumulative distribution plot. The cdf plot is obtained from a documentation and there is no other information but the curve. Is there any tool or function of Matlab can help me finding out the mean and std values? thanks a lot.

0 Comments

Ziyan

Products

No products are associated with this question.

1 Answer

Answer by Roger Stafford on 28 Jul 2013
Accepted answer

If you can manage to transform the cdf plot into two arrays, one the discrete variable values, 'v', and the second the corresponding cumulative probability values, 'p', of these values, then you can use matlab's 'trapz' function to find the distribution's mean and standard deviation values from these arrays. The mean value, 'm', would simply be the integral of 'v' with respect to 'p' and the standard deviation would be the square root of the integral of (v-m)^2 with respect to 'p'.

I am not very knowledgeable about tracing plots to create discrete arrays, but I notice at least one File Exchange routine that appears to undertake such a task. It is located at:

 http://www.mathworks.com/matlabcentral/fileexchange/3832-matlab-plot-tracing-utility/content/GTrace.m

There may be more in the File Exchange or even in one of Mathworks' toolboxes.

1 Comment

Ziyan on 29 Jul 2013

thanks a lot Roger!

Roger Stafford

Contact us