y-axis meaning using a ksdensity plot

3 visualizaciones (últimos 30 días)
Sha
Sha el 29 de Sept. de 2020
Respondida: Jeff Miller el 29 de Sept. de 2020
Hi,
I have a vectore with 10 000 observations, each takes a value between 0 and 1.
I used a the ksdensity function.
I get the following plot (see figure 1) but I don't get why the range of the y-axis is from 0 to 5.
How do I interpret that? Shouldn't it be between 0 and 1 ?
Thank you!
I also provided the histogram of the same vector (see figure 2)
P.S: i checked this answer but it is stil not clear.

Respuesta aceptada

Jeff Miller
Jeff Miller el 29 de Sept. de 2020
The y-axis is scaled such that the total area under the density is 1. (area = probability with continuous distributions.) Since the total range on the X dimension is slightly less than 1, some of the y values have to go above 1.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by