Suppose I have a dataframe documenting the offering prices in USD of a certain product in a certain market at a certain time. The product is manufactured by one of two manufacturers: M1 and M2. The prices of items vary per item, so that two different items that were manufactured by the same manufacturer may be offered for different prices.

The dataframe consists of two columns: manufacturer and price. The manufacturer column is categorical and contains one of two values: M1 or M2, whereas the price column contains numerical data consisting of positive decimal numbers.

Suppose there are 100 rows in the dataframe, and suppose 30 of these rows have M1 as the manufacturer, and the rest of the rows have M2 as the manufacturer.

Suppose I now visualize this table using Seaborn's kdeplot function, using the function's hue parameter to draw two graphs simultaneously in the same plot, one graph for each manufacturer.

A kdeplot of two subsets of rows from the same dataframe

If I now calculate the area under each of these graphs, will the area under the graph visualizing the M1 data be 0.3 and the area under the other graph be 0.7, mirroring the different percentages of entries in the table ascribed to each manufacturer? Or will the areas under both graphs be 1.0 as the case should be if each of them represents a probability density function?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.