AP Statistics Unit 2: Exploring Two-Variable Data Notes

Introduction to Exploring Two-Variable Data

  • General Concept: This unit focuses on taking a single set of data and collecting two variables from every individual in that set to analyze the relationship or association between them.
  • Examples of Two-Variable Data Collections:     * Measuring the length and weight of a single sample of frogs.     * Examining a sample of hospital patients focusing on their age and the duration of their hospital stay.     * Tracking a sample of children to record their age alongside their television watching habits.
  • Analytical Divisions: The unit is split into two primary sections:     1. Analyzing the relationship between two categorical variables.     2. Analyzing the relationship between two quantitative variables.
  • Analytical Methods: For both sections, researchers utilize graphs and sample statistics to determine if patterns are random or indicative of a significant relationship.

Analyzing Two Categorical Variables

  • Organization Tool: The most effective way to organize categorical data is through a two-way table.
  • Example Study: A sample of students was asked two questions:     1. What is your mode of transportation to school (Bus, Walk, Self-Drive, or Parent-Drive)?     2. Were you tardy at least once in the last week (Yes/No)?

Types of Sample Statistics for Categorical Variables

  • Marginal Relative Frequencies:     * Definition: These are proportions calculated using the row or column totals found in the margins of the table, divided by the grand total.     * Examples: The proportion of all students who were tardy; the proportion of all students who rode the bus.
  • Joint Relative Frequencies:     * Definition: The proportion involving a specific combination of one category from each variable (the intersection of a row and a column).     * Keyword: Typically associated with the word "and."     * Example: The proportion of students who were tardy and rode the bus.
  • Conditional Relative Frequencies:     * Definition: The proportion of individuals in a specific category given that they belong to a certain sub-category of the other variable.     * Mechanism: The denominator is limited to the sub-total of the condition provided.     * Example 1: "Given a student is tardy, what proportion ride the bus?" (Denominator = Total Tardy Students).     * Example 2: "Given they walk to school, what proportion are tardy?" (Denominator = Total Walking Students).
  • Importance of Proportions: Relative frequencies (percentages/proportions) are used instead of raw counts because sample sizes across categories are often unequal, making counts misleading for comparison.

Visualizing Associations in Categorical Data

  • Segmented Bar Graphs: These are used to display conditional relative frequencies.     * Each bar represents a condition (e.g., a mode of transportation).     * The bar is segmented to show the proportions of the other variable (e.g., Tardy vs. Not Tardy) within that condition.
  • Association vs. Independence:     * Association: Exists when the variables are not independent; knowing the value of one variable changes the probability/proportion of the other.     * Independence: Exists when one variable has no impact on the other; knowing the mode of transport does not change the likelihood of being tardy.

Determining Association: Numerical Comparison

  • Case 1: No Association (Independence):     * Marginal Probability: 34.6%34.6\% of all students were tardy.     * Conditionals:         * Bus: 34%34\%         * Parent: 34%34\%         * Drive Self: 31/90≈34%31/90 \approx 34\%         * Walk: 35.3%35.3\%     * Conclusion: Since the conditional probabilities are approximately equal to the marginal probability, there is no association. Arrival mode does not influence tardiness.
  • Case 2: Clear Association:     * Marginal Probability: 65/188≈34%65/188 \approx 34\%     * Conditionals:         * Bus: 4/35≈11%4/35 \approx 11\%         * Parent Drive: 5/29≈17%5/29 \approx 17\%         * Drive Self: 48/90≈53%48/90 \approx 53\%         * Walk: 8/34≈24%8/34 \approx 24\%     * Conclusion: Because the conditions change the probability (e.g., driving oneself significantly increases tardiness risk), a clear association exists.

Analyzing Two Quantitative Variables

  • Primary Tool: The Scatter Plot is used to represent the relationship between two measurable, numerical variables.
  • Requirements: Both variables must be quantitative.
  • Axis Definitions:     * X-axis: Explanatory Variable (used to predict or explain the response).     * Y-axis: Response Variable (the outcome being measured).

Describing a Scatter Plot (Direction, Form, Strength, Features)

  1. Direction:     * Positive: As the explanatory variable increases, the response variable increases.     * Negative: As the explanatory variable increases, the response variable decreases.
  2. Form:     * The general shape of the data points. Common forms include linear, logarithmic, exponential, or parabolic (curved).
  3. Strength:     * How closely the points adhere to the form. Described as strong, moderate, or weak.
  4. Unusual Features:     * Includes outliers, clusters, or significant gaps in data.
  5. Context: Always use the specific variables and units (e.g., "As house size in square feet increases, there is a tendency for price in thousands of dollars to increase").

The Correlation Coefficient (r)

  • Definition: A numerical value that quantifies the strength and direction of a linear relationship between two quantitative variables.
  • Rules for Correlation:     * Only applies to linear data (do not use if a curve is present).     * Variables must be quantitative (cannot be used for eye color, etc.).     * It has no units.
  • Scale of r:     * Range: [−1,1][ -1, 1 ].     * Values close to −1-1 or 11: Strong relationship.     * Value close to 00: Weak relationship.     * 11 or −1-1: Points form a perfect straight line.
  • Correlation vs. Causation: Even a very strong correlation (r≈1r \approx 1) does not imply that the explanatory variable causes the response variable to change.

Correlation Examples from Transcript

  • Weight vs. Daily Steps: r=0.062r = 0.062 (Positive, but extremely weak; essentially horizontal).
  • House Size vs. Price: High positive rr (Strong, dots clearly forming a line).
  • I.Q. vs. Frog Dissection Time: r=−0.621r = -0.621 (Moderate-strong negative relationship; smarter students tend to finish faster, but with significant scatter).
  • Tree Diameter vs. Tree Height: r=0.773r = 0.773 (Fairly strong positive relationship, despite some clustering).

Linear Regression Models

  • Purpose: To make predictions for the response variable (yy) based on the explanatory variable (xx).
  • Equation Structure: y^=a+bx\hat{y} = a + bx     * y^\hat{y}: Predicted response value (pronounced "y-hat").     * aa: Y-intercept.     * bb: Slope.     * xx: Explanatory variable.
  • Prediction Limits:     * Interpolation: Making predictions within the range of the observed xx data (reliable).     * Extrapolation: Making predictions outside the observed data range (unreliable and not recommended).
  • Mathematical Directionality: The equation is strictly for predicting yy from xx. You cannot plug in an actual yy value to solve for xx.

Residuals and the Least Squares Line

  • Definition of a Residual: The difference between the actual observed value and the predicted value.     * Formula: Residual=y−y^\text{Residual} = y - \hat{y}     * Memory Aid: "A" comes before "P" (Actual minus Predicted).
  • Properties:     * Vertical distance from a point to the line.     * Positive residual: Point is above the line.     * Negative residual: Point is below the line.     * The sum of all residuals in a dataset is always 00.
  • Least Squares Regression Line (LSRL): The specific line that minimizes the sum of the squared residuals: min⁡∑(y−y^)2\min \sum (y - \hat{y})^2.
  • Residual Plot: A scatter plot of residuals against the explanatory variable (xx).     * Good Fit: No discernible pattern (random scatter around the zero line). This indicates a linear model is appropriate.     * Poor Fit: A visible curve or pattern in the residual plot indicates the original data was not linear.

Regression Statistics and Interpretations

Formulating the Equation

  • Slope (b): b=r×sysxb = r \times \frac{s_y}{s_x}
  • Y-Intercept (a): a=yˉ−bxˉa = \bar{y} - b\bar{x}
  • Variables: sxs_x, sys_y (standard deviations of xx and yy); xˉ\bar{x}, yˉ\bar{y} (means of xx and yy).

Interpretation of Terms

  • Y-Intercept (aa): The predicted value of the response variable when the explanatory variable is zero. (Often lacks contextual meaning due to extrapolation).
  • Slope (bb): For every one-unit increase in the explanatory variable (xx), we predict the response variable (yy) to change by bb units.
  • Coefficient of Determination (r2r^2): The percentage of the variation in the response variable (yy) that is explained by the variation in the explanatory variable (xx) through the linear regression model.     * Example: r2=87%r^2 = 87\% means 87%87\% of the variation in house price is explained by house size.
  • Standard Deviation of the Residuals (ss): The typical distance that an actual observed value is from its predicted value.     * It measures the "average error" of the model's predictions.     * Context matters: Being off by 5 lb5\,lb is small for an elephant but large for a rabbit.

Computer Regression Output

  • In AP Statistics, calculations are often secondary to interpretation. Data is frequently provided in a table.
  • Key Columns:     * Coeff/Variable: Identifies the Constant (Intercept) and the Explanatory Variable (Slope).     * S: Standard deviation of residuals.     * R-Sq: Coefficient of determination (r2r^2).
  • Values to Ignore (until later units): SE (Standard Error), T-stat, and P-value.

Outliers and Influential Points

  • Outlier: A point that does not fit the overall trend.
  • Specific Types:     * Outlier in the Y-direction: Has a large residual. Typically weakens the correlation (rr).     * Outlier in the X-direction (High Leverage Point): Has a x-value far from the mean of the other x-values. These have the potential to significantly anchor/pull the line.     * Influential Point: A point that, if removed, substantially changes the model (slope, intercept, or correlation).
  • Patterns: An outlier in both xx and yy might fit the existing trend (e.g., a very large, expensive house). Adding such a point strengthens the correlation because it extends the linear pattern.
  • High Leverage Effects: High leverage points often have small residuals because the LSRL is "pulled" toward them to minimize the squared distance, but they significantly alter the slope.