๐ Day 12: Scatter Plot in Python
๐น What is a Scatter Plot?
A Scatter Plot displays data points on a 2D plane using dots to represent the relationship between two numerical variables.
๐น When Should You Use It?
Use a scatter plot when:
-
Exploring relationships or correlations
-
Identifying patterns or trends
-
Detecting outliers
-
Comparing two continuous variables
๐น Example Scenario
Suppose you are analyzing:
-
Study hours vs exam scores
-
Advertising spend vs sales
-
Temperature vs electricity usage
A scatter plot helps you see:
-
Positive or negative correlation
-
Clusters of data points
-
Unusual or extreme values
๐น Key Idea Behind It
๐ Each dot represents one observation
๐ X-axis and Y-axis show two variables
๐ Pattern of dots reveals relationships
๐น Python Code (Scatter Plot)
๐น Output Explanation
-
Each point corresponds to a data pair (x, y)
-
Random spread → weak or no correlation
-
Tight upward pattern → positive correlation
-
Isolated points → potential outliers
๐น Scatter Plot vs Line Chart
| Feature | Scatter Plot | Line Chart |
|---|---|---|
| Data order | Not required | Required |
| Relationship | Shows correlation | Shows trend |
| Points | Individual | Connected |
| Use case | Exploration | Time series |
๐น Key Takeaways
-
Scatter plots reveal relationships quickly
-
Ideal for correlation analysis
-
Excellent for outlier detection
-
Foundation of many ML visualizations


0 Comments:
Post a Comment