Exploring Relationships Between Numerical Features
Scatterplots are a fundamental tool for exploring how two numerical features in retail data may relate to each other. When you want to visually analyze relationshipsβsuch as between product price and sales volumeβa scatterplot provides immediate insight. Each point represents an observation, such as a product, with its position determined by its price (x-axis) and units_sold (y-axis). This allows you to quickly spot possible trends, clusters, or anomalies in your retail dataset.
123456789101112131415161718import matplotlib.pyplot as plt import seaborn as sns import pandas as pd # Example retail data: Product price and units sold data = { "price": [5.99, 12.49, 7.99, 14.99, 9.99, 19.99, 4.99, 24.99, 8.49, 13.49], "units_sold": [120, 80, 150, 60, 110, 40, 170, 25, 130, 70] } df = pd.DataFrame(data) plt.figure(figsize=(8, 5)) sns.scatterplot(data=df, x="price", y="units_sold") plt.title("Scatterplot of Product Price vs. Units Sold") plt.xlabel("Product Price ($)") plt.ylabel("Units Sold") plt.show()
Once you have created a scatterplot, you can start interpreting the visual patterns that emerge.
In retail data, you may observe the following:
- As price increases, units sold tend to decrease, indicating a negative relationship;
- Clusters of points can reveal groups of products with similar pricing and sales characteristics;
- Some points may stand out as outliersβproducts that sell unusually well or poorly for their price.
Identifying these trends, clusters, and outliers helps you understand consumer behavior and can guide pricing strategies or inventory decisions. The scatterplot's visual cues are your first step toward uncovering deeper insights into how numerical retail features interact.
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 5.56
Exploring Relationships Between Numerical Features
Swipe to show menu
Scatterplots are a fundamental tool for exploring how two numerical features in retail data may relate to each other. When you want to visually analyze relationshipsβsuch as between product price and sales volumeβa scatterplot provides immediate insight. Each point represents an observation, such as a product, with its position determined by its price (x-axis) and units_sold (y-axis). This allows you to quickly spot possible trends, clusters, or anomalies in your retail dataset.
123456789101112131415161718import matplotlib.pyplot as plt import seaborn as sns import pandas as pd # Example retail data: Product price and units sold data = { "price": [5.99, 12.49, 7.99, 14.99, 9.99, 19.99, 4.99, 24.99, 8.49, 13.49], "units_sold": [120, 80, 150, 60, 110, 40, 170, 25, 130, 70] } df = pd.DataFrame(data) plt.figure(figsize=(8, 5)) sns.scatterplot(data=df, x="price", y="units_sold") plt.title("Scatterplot of Product Price vs. Units Sold") plt.xlabel("Product Price ($)") plt.ylabel("Units Sold") plt.show()
Once you have created a scatterplot, you can start interpreting the visual patterns that emerge.
In retail data, you may observe the following:
- As price increases, units sold tend to decrease, indicating a negative relationship;
- Clusters of points can reveal groups of products with similar pricing and sales characteristics;
- Some points may stand out as outliersβproducts that sell unusually well or poorly for their price.
Identifying these trends, clusters, and outliers helps you understand consumer behavior and can guide pricing strategies or inventory decisions. The scatterplot's visual cues are your first step toward uncovering deeper insights into how numerical retail features interact.
Thanks for your feedback!