Unit 2: Examining Relationships Study Guide
Examining Relationships in Statistics
Comparing Populations vs. Examining Relationships:
In statistics, researchers often wish to compare two or more different populations with respect to the same variable. Side-by-side boxplots are commonly used tools for making these comparisons between samples.
However, the focus often shifts to examining relationships between several variables for the same population.
When examining the relationship between two variables, two primary situations arise:
The researcher is simply interested in the nature of the relationship.
One of the variables is thought to explain or predict the other.
Explanatory and Response Variables
Definitions:
Response Variable: Denoted by , it is a variable that takes values representing the outcome of a study.
Explanatory Variable: Denoted by , it is a variable that helps explain the outcome of the study.
Example 1 (Caffeine and Sleep):
Study: Researchers interviewed 300 adults to see if caffeine in coffee helps keep people awake. They asked how many cups of coffee the adults drink on an average day and how many hours of sleep they get at night.
Response Variable (): Hours of sleep.
Explanatory Variable (): Number of cups of coffee per day.
Example 2 (English and Math Performance):
Study: A psychology professor located 450 students at a large university who took the same introductory English and Math courses. The professor compared their percentage grades at the end of the semester.
Relationship: In this case, there is no defined explanatory or response variable. The researcher is simply interested in the nature of the relationship (e.g., are people strictly left- or right-brained, or do they excel in both?).
Scatterplots
Utility: Scatterplots are the best way to display the relationship between two quantitative variables. They display values measured on the same individuals.
Plotting Rules:
Each individual’s data appears as a single point on the plot.
If an explanatory and response variable exist, the explanatory variable is plotted on the x-axis and the response variable on the y-axis.
If no such distinction exists, the choice of axes is arbitrary.
Example Case Study: Classes Missed vs. Exam Score:
Data ():
Student 1: 5 classes missed, 60 exam score.
Student 2: 2 classes missed, 95 exam score.
Student 3: 6 classes missed, 73 exam score.
Student 4: 10 classes missed, 56 exam score.
Student 5: 1 classes missed, 81 exam score.
Student 6: 8 classes missed, 45 exam score.
Student 7: 4 classes missed, 82 exam score.
Student 8: 2 classes missed, 78 exam score.
Examining Scatterplots: Four Key Characteristics
Direction:
Negative Association: An above-average value of one variable tends to be accompanied by a below-average value of the other (e.g., more classes missed leads to lower exam scores). The points slope downward from left to right.
Positive Association: The pattern of points slopes upward from left to right, meaning above-average values of one variable accompany above-average values of the other.
Form:
Refers to the general shape of the relationship.
Linear Relationship: When a straight line serves as a good approximation for the relationship.
Other Forms: Relationships can also be quadratic, logarithmic, or exponential.
Strength:
Determined by how closely the points lie to a simple form like a straight line.
If all points fall close to the line, the relationship is strong.
If points appear "randomly scattered" and fall far from the approximating line, the linear relationship is weak.
Outliers:
Observations can be outlying in the x-direction, the y-direction, or both.
A bivariate outlier occurs when an observation falls outside the general pattern of points, even if it is not an extreme value for either variable alone.
Assessing Strength with Correlation
Visual Limitations: Scatterplots can be misleading based on the scale used. The same data can appear stronger or weaker depending on the values used on the x- and y-axes.
Definition of Correlation Coefficient (): A numerical measure that describes the direction and strength of a linear relationship between two quantitative variables measured for individuals.
Formulas:
Standard formula:
Alternative notation:
Steps for Calculation:
Calculate the standard deviations and .
Calculate the deviations and for each observation.
Multiply corresponding deviations for and : .
Sum these products: .
Divide the result by .
Example Calculation Snippet (Classes Missed vs. Exam Score):
Sum of products
Result:
Properties of Correlation
Range: always falls between and , inclusive.
Direction Icons: Positive indicates positive association; negative indicates negative association.
Extreme Values: or occur only in perfect linear relationships where all points lie exactly on a line.
Units: Correlation has no units; it is a dimensionless number.
Roles of Variables: Correlation makes no distinction between explanatory () and response () variables; the result is the same regardless of which is which.
Scale Invariance: Changing the units of measurement (e.g., feet to meters) does not change the correlation.
Form Specificity: measures only the strength of linear relationships. It is useless for non-linear forms.
Sensitivity: Correlation is not robust; it is strongly affected by outliers.
Linear Regression
Definition: A regression line is a straight line describing how a response variable changes as an explanatory variable changes. It is used to predict values of for a given .
Model Equation:
: The predicted value of for a given .
: The slope of the line.
: The intercept of the line.
The Best Line: The "best" line is found using the least squares method.
Least Squares Regression Line (LSRL): The line that minimizes the sum of squared deviations in the vertical direction (residuals).
Formulas for Coefficients:
Slope:
Definition: The predicted increase in when increases by one unit.
Intercept:
Definition: The predicted value of when .
Coefficient of Determination ()
Definition: The value is the fraction (or percentage) of the variation in the values of that is accounted for by the least squares regression on .
Interpreting :
If or , then , meaning regression on accounts for 100% of the variation in .
If , then , meaning regression on tells us nothing about .
Calculating from : If software provides only , is the positive square root if there is a positive association, and the negative square root if there is a negative association.
Regression Example: Apartment Rent and Size
Data: Sample of 10 apartments measuring Size in square feet and Monthly Rent in dollars.
Data pairs (Size, Rent): (770, 1270), (650, 990), (925, 2230), (850, 1295), (575, 860), (860, 1925), (800, 1575), (1000, 1790), (730, 1580), (900, 1550).
Calculated Values:
Slope ():
Intercept ():
Equation:
Interpretations:
Slope: For every one square foot increase in size, the predicted monthly rent increases by .
Intercept: In this context, the intercept is statistically meaningless because an apartment cannot be 0 square feet, and rent cannot be negative.
Determination (): If , then . Thus, 64.5% of the variation in monthly rent is accounted for by the regression on size.
Prediction Example: For an 860 square foot apartment:
Residuals and Extrapolation
Residuals: The difference between an observed value of the response variable and the value predicted by the regression line.
Formula:
A positive residual indicates the observed point falls above the regression line.
A negative residual indicates the observed point falls below the regression line.
Example: For the 860 sq ft apartment (actual rent ), the residual is .
Extrapolation: The process of predicting a value of for a value of that is outside the range of the observed data.
Danger: We have no evidence that the linear relationship continues to hold outside the observed range (e.g., predicting rent for a 1250 sq ft apartment when data only goes up to 1000 sq ft).
Guideline: Extrapolation should be avoided whenever possible.
Outliers and Influential Observations
Types of Outliers:
Outlier in the Y-direction: Points far from the line vertically. Generally has little effect on the position of the regression line.
Bivariate Outlier: Points that fall outside the general pattern but are not extreme in or alone. Generally has little effect on the regression line.
Outlier in the X-direction: Points that are extreme horizontally. Often have a strong effect on the regression line.
Influential Observation: An observation is influential if removing it from the dataset would dramatically alter the position of the regression line and the value of . Outliers in the x-direction are frequently influential.
Example of Influence: If a 1500 sq ft apartment with rent were added to the dataset, the value of could drop significantly (e.g., from to ).
Association vs. Causation
The Golden Rule: Association does not imply causation.
Lurking Variables: A variable that helps explain the relationship between variables in a study, but which is not itself included in the study.
Apartment Example: The neighborhood (nicer parts of the city) could be a lurking variable explaining both larger sizes and higher rents.
Student Example: A student's effort is a lurking variable that explains both missing fewer classes and obtaining higher exam scores.
Drug Study Case:
A study finds a correlation of between the percentage of teenagers trying marijuana () and hard drugs () across American cities.
Lurking Variable: The availability of drugs in different cities. High availability increases the likelihood of trying both marijuana and hard drugs.
Establishing Causation: The best way to avoid lurking variables and establish causation is through an Experiment rather than an Observational Study.
In an experiment, explanatory variables are randomly assigned to units. Random assignment "diversifies away" the effects of lurking variables across the groups.
Categorical Variables in Scatterplots
Sometimes a scatterplot can display two or more distinct relationships within the same plot.
Example (Golfers): A plot of Average Driving Distance () vs. Average Score () might appear non-linear initially.
Sub-groups: When the data points are identified by a categorical variable (e.g., Male vs. Female golfers), the scatterplot may reveal two distinct linear relationships.
Analysis Recommendation: In such cases, a separate regression line should be fit to each distinct population to provide an accurate description of the relationship.