# Python KDE plot for a value and not a count

I'm using a KDE plot to analyze the distribution of a sample population in terms of count by division. However, if I want to see how that distribution looks by some value (for example, dollar amount), but with the same x-axis (division) previously mentioned is there a way to do this?

To expand, I can currently look at a KDE plot and get a count of transactions by division (I've numbered the division on the x-axis). Now, for those same numbered divisions, I'd like to see the dollar amount contribution for the density (and not the count) since some divisions have high counts but low dollar amounts, and that is also relevant.

Any thoughts?

• I don't think I understand what you're asking. Can you clarify with an example? Commented Aug 30, 2018 at 21:50
• I expanded with an example and more detail. Commented Aug 30, 2018 at 21:55
• Do you understand what a density is? What you're asking doesn't really make sense. Commented Aug 30, 2018 at 22:01
• There are some divisions that have high density in terms of transaction count, but low density in terms of dollar amount. Is there another plot you might suggest that could accomplish what I'm trying to do? Commented Aug 30, 2018 at 22:05
• Comparing densities is hard because kernel densities are not normalized probabilities. Also, it's a bit of an odd thing to compare the kernel density between observations. One thing you can do is to compare the ranks of the kernel densities, e.g. on a simple scatterplot. What's the point of comparing densities like this? Are you trying to measure how much of an outlier each observation is? Commented Aug 30, 2018 at 22:22