Probability Density function plot

5 visualizaciones (últimos 30 días)
sphinx mo
sphinx mo el 4 de Oct. de 2012
Hy,
I have two value one is for mean and another Standard deviation. how i can plot PDF for it ?

Respuesta aceptada

Wayne King
Wayne King el 4 de Oct. de 2012
Editada: Wayne King el 4 de Oct. de 2012
That very much depends on the PDF. For some distributions, the mean itself is necessary and sufficient (like the exponential), for others the mean and standard deviation are necessary and sufficient (the Gaussian), and for still others the distribution is not parametrized by the mean and std. If this is Gaussian, then I'll assume mu is the mean and sigma the standard deviation.
mu = 10; sigma = 1.5;
x = mu-(4*sigma):0.01:mu+(4*sigma);
y = normpdf(x,mu,sigma);
plot(x,y)
So basically you really need to know which PDF you have the first moment (mean) and second central moment (variance) of.
  2 comentarios
sphinx mo
sphinx mo el 4 de Oct. de 2012
hy many thanks..
can you explain a little bit , what is meaning x = mu-(4*sigma):0.01:mu+(4*sigma);
Wayne King
Wayne King el 4 de Oct. de 2012
By assuming a Gaussian distribution, essentially all the probability is the mean plus/minus 3 standard deviations, so I just put an extra one (sigma) in there as a cushion. Any Gaussian function really has infinite support, but for all intents and purposes, you can characterize the PDF by just considering that interval.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by