What is y axis in seaborn distplot?

后端 未结 2 843
孤城傲影
孤城傲影 2020-12-13 01:45

I have some geometrically distributed data. When I want to take a look at it, I use

sns.distplot(data, kde=False, norm_hist=True, bins=100)

2条回答
  •  既然无缘
    2020-12-13 02:06

    The x-axis is the value of the variable just like in a histogram, but what exactly does the y-axis represent?

    ANS-> The y-axis in a density plot is the probability density function for the kernel density estimation. However, we need to be careful to specify this is a probability density and not a probability. The difference is the probability density is the probability per unit on the x-axis. To convert to an actual probability, we need to find the area under the curve for a specific interval on the x-axis. Somewhat confusingly, because this is a probability density and not a probability, the y-axis can take values greater than one. The only requirement of the density plot is that the total area under the curve integrates to one. I generally tend to think of the y-axis on a density plot as a value only for relative comparisons between different categories.

    from the reference of https://towardsdatascience.com/histograms-and-density-plots-in-python-f6bda88f5ac0

提交回复
热议问题