Linear Function Models
Linear models from real-world scenarios
The first step in building a linear model is figuring out which variable depends on which. The dependent variable (y) is the output that changes in response to something else. The independent variable (x) is the input you can control or that drives the change. For example, if you're looking at how hours worked affects total pay, hours worked is and total pay is .
Once you've identified your variables, pull out two key pieces from the scenario:
- Slope (): the rate of change, or how much changes for each one-unit increase in . Think "miles per hour" or "dollars per item."
- y-intercept (): the starting value of when . This could be a base cost, an initial distance, or any value that exists before the independent variable kicks in.
Then plug both into the slope-intercept form:
For example, if a delivery service charges a $25 base fee plus $0.50 per mile, the model is , where is miles driven and is total cost.

Data analysis for linear functions
When you're given a data set instead of a word problem, you need to build the model from the numbers. Here's the process:
-
Identify your variables. Decide which is independent () and which is dependent (). Time, quantity, or anything you'd naturally put "per" after usually goes on the x-axis.
-
Plot the data. Create a scatter plot with on the horizontal axis and on the vertical axis. This lets you see the overall pattern and spot any outliers.
-
Check for linearity. If the points roughly follow a straight line, a linear model is appropriate. If they curve, you're looking at something non-linear (exponential, quadratic, etc.).
-
Calculate the slope. Pick two points from the data, preferably ones that are far apart to reduce error. Use the slope formula:
For instance, using the points and : .
-
Find the y-intercept. If the line crosses the y-axis in your plot, you can read directly. Otherwise, substitute your slope and one known point into and solve for . Using the point with : , so .
-
Write the model. Combine your slope and y-intercept: , or simply .

Interpretation of linear model features
A model is only useful if you can explain what it means in context. Each part of tells you something specific.
Slope interpretation
- The slope describes the rate of change: how much increases (or decreases) for every one-unit increase in .
- A positive slope means increases as increases. A negative slope means decreases as increases.
- Always attach units. Saying "the slope is 2" is incomplete. Saying "the slope is 2 miles per hour" tells you something real.
y-intercept interpretation
- The y-intercept is the value of when . In context, it's the starting point before the independent variable has any effect.
- Example: In , the y-intercept of 25 means the base cost is $25 before any miles are driven.
- Watch out: sometimes doesn't make sense in the real scenario (like "zero years of age" for adult salary data). In those cases, the y-intercept is mathematically necessary for the equation but may not have a meaningful real-world interpretation.
x-intercept interpretation
- The x-intercept is where . Find it by setting and solving for .
- For : , so . Whether that value makes sense depends on context. A negative number of hours or items, for instance, has no real-world meaning.
Predictions and limitations
- Interpolation means predicting for an -value within the range of your data. These predictions tend to be reliable.
- Extrapolation means predicting beyond your data range. These predictions are riskier because you're assuming the linear trend continues, and it may not.
Analyzing relationships and model fit
Building a model is one thing; knowing whether it's any good is another.
Correlation measures the strength and direction of a linear relationship between two variables.
- Strong positive correlation: as increases, consistently increases.
- Strong negative correlation: as increases, consistently decreases.
- Weak correlation: no clear pattern between and , meaning a linear model probably isn't the right fit.
Correlation does not imply causation. Two variables can move together without one causing the other. Ice cream sales and drowning rates both rise in summer, but ice cream doesn't cause drowning. A hidden variable (hot weather) drives both.
Residuals are the differences between the actual -values in your data and the -values your model predicts. If your model predicts but the actual value is , the residual is .
- Small residuals scattered randomly above and below zero suggest a good fit.
- Large residuals or a clear pattern in the residuals (like a curve) suggest the linear model isn't capturing the real relationship well.