Comprehensive Study Guide: Bivariate Linear Regression and the General Linear Model
Fundamentals of Linear Equations and Bivariate Data
Bivariate Data Definition and Purpose:
Bivariate data consists of pairs of numeric values measured for two variables that are suspected or known to share an underlying relationship.
The primary analytical objective is to determine whether changes in one variable correspond systematically to changes in the other.
Bivariate data forms the foundation for simple linear regression analysis, which models the relationship between exactly one independent variable () and one dependent variable ().
The Mathematical Structure of Linear Equations:
The mathematical representation of a linear equation involving two variables is:
The variable represents the independent variable (also designated the explanatory or predictor variable).
The variable represents the dependent variable (also designated the response or outcome variable).
The parameter represents the slope of the line, which dictates the steepness and direction of the linear relationship.
The parameter represents the -intercept, which specifies the value of where the line intersects the vertical -axis (the value of when ).
Any non-vertical straight line in the Cartesian coordinate plane can be described by this equation.
Examples of Linear Equations:

Detailed Parameter Interpretations in Applied Settings:
Hang-Gliding Class Cost Model (Emma’s Extreme Sports):
The company compensates hang-gliding instructors a baseline fee of per class, alongside a per-student fee of .
The independent variable is the number of students in a class.
The dependent variable is the total cost Emma pays to an instructor.
The resulting linear equation is:
The -intercept is , which is the minimum compensation paid for conducting a class with zero students.
The slope is , which represents the additional compensation incurred for each additional student enrolled.
Tutoring Income Model (Svetlana):
For each tutoring session, Svetlana charges a one-time fixed fee of plus an hourly rate of .
The linear relationship is expressed as:
The independent variable is the duration of the tutoring session measured in hours.
The dependent variable is the total amount of money earned per session in dollars.
The -intercept is , representing the mandatory base fee assessed regardless of tutoring duration.
The slope is , indicating that Svetlana's earnings increase by for every additional hour spent tutoring.
Appliance Repair Fee Model (Ethan):
Ethan repairs household appliances such as dishwashers and refrigerators, assessing a fixed charge of per home visit plus an hourly labor rate of .
The linear relationship is defined by:
The independent variable represents the total hours of labor performed during the visit.
The dependent variable represents Ethan's total earnings per visit in dollars.
The -intercept is , representing the base fee for showing up to a visit prior to performing any labor.
The slope is , indicating that the total bill increases by for each additional hour of repair work.
Scatter Plots and Exploratory Data Analysis
Definition and Utility of Scatter Plots:
A scatter plot provides the most common, intuitive visual method to explore and assess bivariate data.
Constructing a scatter plot involves identifying the independent variable () along the horizontal axis, the dependent variable () along the vertical axis, and plotting each paired observation as an individual point.
Assessing Direction and Strength:
Direction:
A positive relationship occurs when high values of the independent variable coincide with high values of the dependent variable, or when low values coincide with low values.
A negative relationship occurs when high values of one variable systematically coincide with low values of the other variable.
Strength:
The strength of an observed association is evaluated by how tightly clustered the data points are around a straight line or another functional curve.
Tightly clustered points indicate a strong relationship; widely dispersed points indicate a weak relationship.
Empirical Case Study: Child Age and Vocabulary Size:
An educational researcher measured the vocabulary size of young children across various ages to evaluate whether developmental age predicts word count.
The independent variable is child's age () in years; the dependent variable is vocabulary size () measured in number of words:
Age :
Age :
Age :
Age :
Plotting these coordinates produces an upward-sloping trajectory, demonstrating a strong positive association between age and vocabulary acquisition.
Empirical Case Study: Athletic Practice and Game Performance:
A high school basketball player, Amelia, logged weekly practice time to evaluate whether targeted training improves scoring performance in games.
The independent variable represents the weekly hours practicing jump shots; the dependent variable represents total points scored in a game:
:
:
:
:
:
:
The data demonstrates a clear, positive linear trajectory, indicating that scoring increases consistently as practice hours increase.
The Least-Squares Regression Model and Line of Best Fit
The Principle of Least Squares:
Real-world empirical data points rarely fall perfectly along a straight line.
The line of best fit (also known as the least-squares regression line) is defined as the unique straight line that minimizes the sum of the squared vertical distances between each observed data point and the line.
The algebraic equation for the fitted regression line is:
The symbol ("y-hat") denotes the predicted value of the outcome variable for a specified input value of .
Errors and Residuals:
For any observed data point , the discrepancy between the observed value and the predicted value is called the residual or error (denoted ):
A positive residual indicates that the actual observed value lies above the regression line.
A negative residual indicates that the actual observed value lies below the regression line.
The vertical distance between the observed point and the line is given by .

Sum of Squared Errors (SSE):
The total squared error for a sample size of observations is quantified by the Sum of Squared Errors (SSE):
The least-squares mathematical procedure calculates values for intercept and slope that directly minimize .
An intrinsic mathematical property of the least-squares regression line is that it always passes through the point of means, .
Case Study: College Statistics Exam Performance:
A random sample of statistics students yielded bivariate data tracking scores on the third examination (, scored out of ) against performance on the final examination (, scored out of ).
The calculated least-squares regression line is:
Slope Interpretation:
The slope is .
This indicates that for each additional point a student earns on the third exam, their final exam score is predicted to increase by , on average.
Intercept Interpretation:
The mathematical -intercept is .
This reflects the theoretical predicted final exam score for a hypothetical student scoring on the third exam.
In practice, negative test scores are impossible, illustrating that mathematical intercepts often have no realistic physical meaning when extrapolated beyond the range of observable data.

Residual Diagnostics and Residual Plots:
A residual plot graphs the independent variable along the horizontal axis and the calculated residuals () along the vertical axis.
Residual plots serve as a diagnostic check to determine whether a linear model is appropriate for the data.
An ideal residual plot displays a random, evenly spaced cloud of points centered around the horizontal zero line (), with no evident curvature or systematic trend.
If residuals exhibit curvature, a non-linear model is required.
If residuals display a fan or cone shape (heteroscedasticity), the magnitude of prediction error depends directly on the value of the predictor variable, violating core regression assumptions.


Correlation and the Coefficient of Determination
The Linear Correlation Coefficient ():
The sample correlation coefficient, , provides a numerical metric quantifying the strength and direction of the linear relationship between variables and .
The value of is strictly bounded such that:
Directional Classifications:
A positive correlation () indicates that higher values of correspond to higher values of .
A negative correlation () indicates that higher values of correspond to lower values of .
A value of indicates no linear correlation between the variables.
Caveats and Non-Linearity:
A correlation coefficient near zero does not necessarily imply the absence of any relationship; it only implies the absence of a linear relationship.
Data displaying strong curvilinear or horizontal patterns can produce an value of , making scatter plot inspection necessary.

The Coefficient of Determination ():
Squaring the correlation coefficient yields the coefficient of determination, denoted .
The coefficient of determination is typically expressed as a percentage rather than a decimal fraction.
Substantive Interpretation:
represents the percentage of total variation in the dependent variable that can be explained by variation in the independent variable using the least-squares regression line.
The complement, , represents the percentage of variation in that remains unexplained by the regression model (residual error variation).
Application to the Statistics Exam Case Study:
The calculated sample correlation coefficient between third exam scores and final exam scores is:
The resulting coefficient of determination is:
Expressed as a percentage, approximately of the total variation in final exam scores can be explained by variation in third exam scores using the fitted regression line.
The remaining () of total variation is unexplained by the model and stems from other factors or random variation.
Statistical Inference for Linear Regression: Hypothesis Testing
Inference About the Population Correlation ():
The sample correlation coefficient, , is a point estimate derived from sample data to infer the unknown population correlation coefficient, denoted by the Greek letter rho ().
Because sample estimates vary due to random sampling fluctuation, a formal hypothesis test must be conducted to establish whether an observed linear relationship is statistically significant or whether it could have arisen purely by chance from a population where .
Reliability is heavily contingent on the sample size (); smaller samples require higher observed values of to establish statistical significance.
Hypothesis Formulation:
Null Hypothesis ():
Meaning: The population correlation coefficient is not significantly different from zero. There is no significant linear relationship between and in the population.
Alternative Hypothesis ():
Meaning: The population correlation coefficient is significantly different from zero. There is a significant linear relationship between and in the population.
Decision Methodologies and Interpretative Standards:
Testing is conducted using a significance level typically established at .
Two interchangeable, mathematically equivalent procedures are employed to draw conclusions:
Method 1 (p-value): Compute the test statistic p-value. If , reject . If , fail to reject .
Method 2 (Critical Value Table): Compare the computed correlation coefficient against the critical value for a given sample size . If , reject .
Conclusion Phrasing:
When is rejected: "There is sufficient evidence to conclude that there is a significant linear relationship between and because the correlation coefficient is significantly different from zero."
When failing to reject : "There is insufficient evidence to conclude that there is a significant linear relationship between and because the correlation coefficient is not significantly different from zero."
Standard calculator or software routines, such as
LinRegTTest, are utilized to calculate the test statistic and p-value.
Bivariate Data Set: Birth Year and Life Expectancy:
Data assessing birth year () and projected life expectancy in years () provides a baseline for hypothesis testing via
LinRegTTest:Year :
Year :
Year :
Year :
Year :
Year :
Year :
Year :
Year :
Underlying Assumptions of Regression Inference:
Valid hypothesis testing requires adherence to five statistical assumptions:
Linearity: The underlying population relationship between the two variables is linear.
Normality: For any specified value of , the corresponding population of -values is normally distributed about the regression line.
Homoscedasticity (Equal Variance): The standard deviation of the population -values about the regression line is constant for every value of .
Independence: The residual errors are mutually independent, exhibiting no autocorrelation or systematic sequencing patterns.
Random Sampling: The observed sample data originates from a well-designed random sample or randomized experiment.

Estimation, Prediction, and Outlier Analysis
Predictive Applications of the Regression Line:
A line of best fit may only be used for prediction if the correlation between variables has been demonstrated to be statistically significant.
Using the exam performance model (where ):
Predicting for a Third Exam Score of :
Predicting for a Third Exam Score of :
Predicting for a Third Exam Score of : (Note: Because the third exam is scored out of , an input of represents extrapolation far outside the domain of the data, producing an impossible final exam score exceeding the maximum possible .)
Identification and Treatment of Outliers:
Outliers are observed data points that deviate substantially from the general linear trend established by the remainder of the data set.
Outliers must be examined carefully before deciding whether to omit them or retain them:
Points originating from measurement errors, data corruption, or non-representative sampling should typically be excluded.
Points reflecting legitimate, extreme occurrences in the population provide critical insight into variability and should be retained.
Numerical and Visual Identification Criteria:
Standard Deviation of Residuals ():
The standard deviation of the residuals (also known as the standard error of the estimate) is calculated directly from the :
The denominator utilizes degrees of freedom because the simple linear regression model consumes two degrees of freedom estimating the intercept () and slope ().
The Two-Standard-Deviation Threshold Rule:
As an established operational rule of thumb, any observation whose vertical distance from the regression line exceeds two standard deviations of the residuals () is flagged as an outlier.
Visually, this corresponds to drawing boundary lines parallel to the regression line at distances of and ; any observation falling beyond these boundaries is identified as an outlier.

Influential Points and Regression Line Sensitivity:
Influential Points:
Influential points are observations situated far from the rest of the sample in the horizontal direction (-space).
Due to their leverage, influential points exert a disproportionate pull on the slope () of the fitted line.
Demonstration: Statistics Exam Outlier Removal:
In the exam data set (), an anomalous student scored on the third exam and on the final exam, falling above the upper boundary line.
With all data points included, the regression equation is:
When the outlier point is omitted, the recalculated regression line becomes:
Removing this single point alters the slope from to , illustrating the high sensitivity of least-squares estimators to anomalous observations.

Empirical Case Study: Historical Per Capita Income (PCINC):
Longitudinal economic data measuring development via per capita income (PCINC) across decades from to :
Year :
Year :
Year :
Year :
Year :
Year :
Year :
Year :
Year :
Year :
These data points serve to fit a linear regression equation, test model significance using ANOVA and correlation inference, and detect potential economic outliers across the historical span.
The General Linear Model (GLM) Framework and ANOVA F-Testing
The Conceptual Foundation of the General Linear Model:
The General Linear Model (GLM) provides an overarching mathematical framework asserting that observable data can be portioned into two primary components:
The model component reflects systematic structure explained by known predictor variables.
The error component represents the residual deviation between reality and theoretical prediction, arising from unmodeled variables, measurement discrepancies, or random environmental noise.
Metaphorical Illustrations of Error Deviations:
Halloween Trick-or-Treaters:
A baseline of trick-or-treaters is expected, with an anticipated increase of trick-or-treaters per enrolled middle school student:
With local middle school enrollment at , the predicted turn-out is:
Actual Halloween turn-out totaled .
The resulting residual error is:
The error does not imply corrupted data; rather, it indicates model omission (e.g., unaccounted elementary school children) and random variation.
Gasoline Budgeting:
Budgeting for weekly fuel, but only needing , yields an error of , leaving surplus funds for visits to The Blend Den.
Domestic Interpersonal Dynamics:
The level of irritation displayed by a roommate regarding dishes left in the sink can be modeled as a function of the number of days they remain unwashed, modulated by daily mood fluctuations that register as error.
Regression Analysis within the GLM Framework:
Unlike statistical tests that use categorical predictor variables (such as independent two-sample t-tests), linear regression utilizes continuous input variables to model continuous output variables.
Trending YouTube Video Modeling:
Data collected from trending YouTube videos tracked total comments (, input) to predict total likes (, output).
The fitted model is:
The slope coefficient () indicates that every additional comment is associated with an average increase of approximately .
The intercept () predicts for a video with zero comments, a mathematical artifact reflecting base model elevation rather than typical real-world platform dynamics.
Partitioning the Sums of Squares:
The GLM framework decomposes total variation into explained and unexplained components:
Total Sum of Squares (SST):
Quantifies total dispersion of observed points around the sample mean ():
Dividing by sample size yields sample variance.
Regression Sum of Squares (SSR):
Quantifies variation explained by the regression line, measured as the squared distance between model predictions () and the null baseline mean ():
Error Sum of Squares (SSE):
Quantifies unexplained residual dispersion of data points around the regression line ():
The Partition Identity:
Degrees of Freedom and Information Weighting:
Degrees of freedom () quantify the independent pieces of information available to estimate parameters.
To prevent bias and weight variances appropriately (analogous to how an astrophysicist like Katie Mack possesses substantially more independent information about planets than a high school physics student), each Sum of Squares is divided by its respective degrees of freedom:
, because exactly one independent parameter (the slope coefficient ) is estimated.
, because two parameters ( and ) are estimated from the sample data. For , .
The ANOVA F-Test in Regression:
The F-statistic evaluates whether the regression model accounts for significantly more variation than would be expected under the null hypothesis of no relationship ():
For the YouTube trending video model:
Evaluating against the F-distribution yields a p-value of:
Because , the null hypothesis is rejected, confirming a statistically significant linear association between comments and likes.
Mathematical Equivalence of t-Test and F-Test:
Conducting a two-tailed t-test on the slope parameter () yields the identical p-value as the F-test for simple linear regression.
Squaring the computed t-statistic directly equals the computed F-statistic:
Practical Applications and Causality Caveats:
Regression models are used across fields, including modeling the relationship between cigarette tax increases and average consumption, or peak exercise heart rates and blood pressure levels.
Statistical regression alone establishes correlation and functional association, but cannot establish direct causal relationships.
Homework Help:
Here is a simpler, step-by-step way to look at correlation on a graph:
1. Look at the axes: The horizontal line across the bottom is and the vertical line going up is . Each dot represents a pair of values.
2. Check the overall shape: See if the dots generally follow a straight path. Correlation only measures straight-line patterns, so if the dots curve or form a bend, linear correlation will not describe it accurately. 3. Look at the direction: Read the graph from left to right. If the dots slant uphill, that is a positive correlation ( is positive), meaning as goes up, also goes up. If the dots slant downhill, that is a negative correlation ( is negative), meaning as goes up, goes down. If the dots are just a random round blob, there is zero correlation ().
4. Check the closeness (strength): See how tightly packed the dots are. If they cluster very tightly along an imaginary straight line, it is a strong correlation (closer to or ). If they are widely spread out and fuzzy, it is a weak correlation (closer to ).
5. Spot the odd dots out (outliers): Look for any single dot that sits far away from the rest of the group. These extreme points can pull the line toward them and distort the correlation.
6. Get the exact number: Looking at the graph gives you the general trend, but you use a calculator or computer tool to calculate the exact correlation number , which will always fall between and .

To find an estimate of a y value with a specific x value (y = money , x = year), find the difference of the starting year and the year you want to use, so 2017 - 1995 = 22
Plug the difference into the linear model and round as needed
To find the estimate of a x value for a specific y value, I just tested different numbers until I got it. So I started with 22, then went down until I found the Y value that was closest to the needed estimate.