Two Variable Relationships: Side-by-Side Boxplots, Scatterplots, and Correlation
Comparative Graphs: Side-by-Side Boxplots
- Application and Variables:
- Analysis focuses on 2025 electric vehicles to predict vehicle acceleration time based on vehicle class.
- Explanatory Variable: Vehicle Class, categorized as Hybrid, Plug-in Hybrid (PHEV), or Battery Only (BEV).
- Response Variable: Acceleration time to (measured in seconds).

Evaluating Association from Boxplots:
- There is an association between vehicle class and acceleration time because the interquartile range boxes show very little overlap, demonstrating that acceleration times differ substantially across the three classes.
Central Tendencies and Extremes Across Classes:
- Highest Typical Acceleration Time: The Hybrid class tends to have the highest acceleration time, as its median line () and box are positioned furthest to the right.
- Highest Overall Individual Acceleration Time: The Plug-in Hybrid (PHEV) class possesses the single highest overall value due to an extreme high outlier located near .
- Lowest Typical Acceleration Time: The Battery-Only (BEV) class tends to have the lowest acceleration time, with its median () and entire box shifted furthest to the left.
Outliers and Spread:
- Presence of Outliers: The Plug-in Hybrid (PHEV) class contains an isolated outlier plotted beyond the upper whisker at approximately .
- Variability and Spread: Comparing overall spread across the classes, the Battery-Only (BEV) class displays the highest spread/variability, while the Hybrid class displays the lowest spread/variability; however, the difference in spread among the three groups is not extreme.
Scatterplots and Bivariate Trends
- Bivariate Quantitative Relationships:
- When both the explanatory variable and the response variable are quantitative, bivariate data are plotted on a scatterplot.
- The explanatory variable is placed on the horizontal axis (), and the response variable is placed on the vertical axis ().
- Point Interpretation: In a plot of 2025 gas vehicles comparing Highway MPG () to City MPG (), an individual coordinate point such as represents a specific vehicle that achieves on the highway and in city driving.
- General Trend: Vehicles that possess higher fuel economy on the highway tend to also possess higher fuel economy on city streets.

- Directional Trends of Association:
- Positive Association:
- Occurs when an increase in the explanatory variable is associated with a tendency for the response variable to increase.
- Moving from left to right, data points trend upward.
- Example: The association between Highway MPG and City MPG is positive.
- Negative Association:
- Occurs when an increase in the explanatory variable is associated with a tendency for the response variable to decrease.
- Moving from left to right, data points trend downward.
- Example: The association between Vehicle Weight (in pounds) and City MPG is negative, meaning heavier vehicles tend to have lower fuel efficiency in city driving.
Describing Bivariate Association
- Core Components of Association Descriptions:
- Any comprehensive description of an association between two quantitative variables must specify three distinct features:
- Direction: Positive or Negative.
- Shape: Linear or Nonlinear.
- Strength: Very strong, Strong, Moderate, Weak, or None.
- Critical Caveat: If there is no association ("none"), it is impossible and invalid to describe a direction or a shape.

Shape Classifications:
- Linear: The overall pattern of points follows an approximately straight-line path across the scatterplot (e.g., College Admissions data comparing Median ACT Score to Mean SAT Score).
- Nonlinear: The points follow a curved or peaked functional form rather than a straight line (e.g., Austin, TX monthly weather data comparing Average High Temperature to Average Precipitation, which increases to a central peak and then falls).
Strength Classifications:
- Strong Association: Points fall very close to the underlying line or curve, showing minimal vertical dispersion around the trend (e.g., Roller Coaster data comparing Drop Height in feet to Speed in , where points tightly hug a line).
- Weak Association: Points are widely dispersed and scattered loosely, exhibiting substantial variability around the trend line (e.g., College Experience data comparing Phone Unlocked minutes per month to a Feel Good rating on a scale from to ).
Comprehensive Example:
- The relationship between Vehicle Weight (pounds) and City MPG is characterized as a moderately strong negative linear association.
Correlation Principles and Interpretations
- Mathematical Definition and Properties:
- Correlation measures the strength and direction of the linear association between two quantitative variables.
- It is bounded strictly within the closed interval from to :
- Notation Conventions:
- Sample correlation is denoted by the lowercase Latin letter .
- Population correlation is denoted by the Greek letter (pronounced "rho"), written as a rounded symbol distinct from the serifed Latin letter .

Interpreting Correlation Coefficients:
- Positive Linear Associations ():
- Weak to None: (diffuse cloud with very faint upward tilt).
- Moderate: (discernible upward diagonal drift with noticeable scatter).
- Strong: (points tightly confined along an upward linear path).
- Perfect: (every single point falls exactly on a straight line with positive slope).
- Negative Linear Associations ():
- Weak to None: (broad dispersion with slight downward slope).
- Moderate: (clear downward alignment with moderate scatter).
- Strong: (points tightly clustered along a downward linear trajectory).
- Perfect: (every single point falls exactly on a straight line with negative slope).
Nonlinear Trends and Limitations of Correlation:
- When examining the relationship between Driving Speed () and Fuel Efficiency ():
- Speed is an effective predictor of fuel efficiency because efficiency increases from up to approximately , and then systematically drops as speed increases to .
- The linear correlation coefficient for this inverted U-shaped pattern is near zero ().
- Linear correlation does not accurately describe this relationship. A correlation near zero can easily be misinterpreted as a lack of association, when in reality there is a very strong nonlinear association.
Mathematical Formula for Correlation
- Algebraic Formulation:
- The sample correlation coefficient is defined as the average product of standardized scores (-scores) for and :
- This computation is never performed by hand in standard practice; it is generated via statistical software.

- Geometric Decomposition by Quadrants:
- The Cartesian plane is partitioned into four quadrants centered at the point of the sample means: .
- The term represents standardized horizontal deviation ("run").
- The term represents standardized vertical deviation ("rise").
- Quadrant Contribution to the Total Sum:
- Upper-Right Quadrant (, ): Both terms are positive; , producing a positive contribution to .
- Lower-Left Quadrant (, ): Both terms are negative; , producing a positive contribution to .
- Upper-Left Quadrant (, ): One negative and one positive term; , producing a negative contribution to .
- Lower-Right Quadrant (, ): One positive and one negative term; , producing a negative contribution to .
Classification of Statistical Display Types
- Variable Combinations and Matching Visualizations:
- One Categorical Variable:
- Practical Example: Diamond Clarity (Section 2.1).
- Appropriate Graphic: Bar chart.
- One Quantitative Variable:
- Practical Example: Lake Travis Water Levels (Section 2.2).
- Appropriate Graphics: Histogram, Dotplot.
- Two Categorical Variables:
- Practical Example: Titanic Passenger Class and Survival (Section 2.1).
- Appropriate Graphic: Segmented bar chart.
- One Quantitative Variable and One Categorical Variable (Group Comparisons):
- Practical Example: Acceleration Time compared across EV Classes (Hybrid, PHEV, BEV).
- Appropriate Graphic: Side-by-side boxplots.
- Two Quantitative Variables ( Ordered Pairs):
- Practical Example: Vehicle Weight and City MPG.
- Appropriate Graphic: Scatterplot.
StatKey Analysis: Scatterplots, Outliers, and Group Comparisons
Two Quantitative Variables Procedure (Cereal Dataset):
- Navigation: Under
Descriptive Statistics and Graphs, selectTwo Quantitative Variables, and upload the datasetCereal. - Variable Assignment: Designate
Protein(grams) as the explanatory variable () andFiber(grams) as the response variable (). - Initial Association: The overall relationship exhibits a moderate positive linear association with a baseline correlation coefficient of:
- Navigation: Under
Identification and Impact of Outliers:
- High-Fiber Outlier:
- Values: of protein and of fiber.
- Relative Behavior: Contains substantially much higher fiber content than all other cereals with comparable protein levels.
- Brand Identity: Crunchy Bran.
- Low-Fiber Outlier:
- Values: of protein and of fiber.
- Relative Behavior: Contains unusually low fiber content despite having the highest protein content in the dataset.
- Brand Identity: Special K.
- Effect of Removing Outliers:
- Using
Edit Datato delete both Crunchy Bran and Special K dramatically alters the linear correlation coefficient, increasing it to: - Outliers can substantially attenuate (depress) the correlation coefficient; removing them reveals a far stronger underlying linear relationship.
One Quantitative and One Categorical Variable Procedure:
- Research Goal: Investigate cereal sugar content by company to determine whether particular manufacturers systematically add more sugar to their cereals.
- Navigation: Return to the StatKey main menu and select
One Quantitative and One Categorical VariableunderDescriptive Statistics. - Column Configuration: Use
Change Columnsto specifySugaras the quantitative response variable andCompanyas the categorical grouping variable in that order. - Evaluation of Association:
- There is no association between sugar content and cereal company.
- Explanation: The distributions of sugar content across the three manufacturing groups appear fairly similar, with extensive overlap in their comparative boxplots and dotplots.