the magnitude of y-axis in a ksdensity plot
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nguyen
el 5 de Oct. de 2014
Comentada: Nguyen
el 7 de Nov. de 2014
Dear all,
Can you explain the meaning of magnitude of y-axis in a plot using ksdensity function?
Thank you very much.
0 comentarios
Respuesta aceptada
the cyclist
el 5 de Oct. de 2014
Editada: the cyclist
el 5 de Oct. de 2014
It's the function f(x) such that
f(x) * dx
is the probability of a randomly selected value from the distribution being in that particular interval of x.
People are sometimes confused by the fact that the output of ksdensity doesn't sum to 1. You have to remember to multiply by the interval width. Then it will.
4 comentarios
the cyclist
el 6 de Oct. de 2014
MATLAB doesn't know that negative values of x don't make physical sense.
But you can tell the function not to allow negative values by using additional arguments:
[f xi] = ksdensity(...,'support','positive')
See the documentation for details.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!