Slope
Slope is the rate at which one quantity changes with respect to another, represented for a straight line by the ratio of vertical change to horizontal change.
Grokking Machine Learning
The rate at which a line's vertical coordinate changes relative to its horizontal coordinate, also called rise divided by run.
- How it is used
- Uses slope as a feature weight that determines how a linear regression prediction changes when the feature increases by one unit.
- How deep it goes
- Works from rise over run through line rotation and repeated regression updates; notes that vertical lines have undefined slope.
- Examples
- Uses price per room, a line with slope 0.5, and an area-only housing-price model.
- What you can do after
- Apply it via Turi Create by fitting an area-only housing model and interpreting its coefficient as a slope.
Statistics Every Programmer Needs
A slope is a regression coefficient representing the change in a dependent variable for a one-unit change in a predictor.
- How it is used
- Quantifies predictor-response relationships and supplies the coefficient used to calculate regression predictions.
- How deep it goes
- Derives the coefficient from centered sums and evaluates it with predictions, residual variation, R-squared, and significance.
- Examples
- Uses marathon Stage 1 and Stage 2 split times, centered-sum tables, fitted values, and Matplotlib regression plots.
- What you can do after
- Apply it via linear regression to interpret relationships and calculate predictions from a fitted equation.
Grokking Machine Learning, Second Edition
The slope of a line is the constant ratio of its vertical change to its horizontal change, indicating the line's steepness and direction.
- How it is used
- Explains line steepness, direction, and feature effects while building linear regression models for prediction.
- How deep it goes
- Defines rise over run, interprets signs, shows line rotations, and applies slope to prediction and simple fitting adjustments.
- Examples
- Uses line diagrams, housing prices, four-room prediction, point-by-point line adjustments, and two-line sentiment classification.
- What you can do after
- Apply slope to interpret line equations, estimate feature effects, predict housing prices, and adjust or evaluate linear classifiers.
Read how Grokking Machine Learning, Second Edition explains slope →
Grokking Bayes
A slope determines the change in a linear function's value per unit change in its input.
- How it is used
- Models target change from predictors, updates that relationship with data, and represents systematic change in time series.
- How deep it goes
- Defines slope, explains squared-error fitting and posterior uncertainty, and extends it to evolving state-space models.
- Examples
- Uses house prices versus area, prior-posterior plots near slope 200, and yearly CO₂ concentration changes.
- What you can do after
- Evaluate/understand linear relationships, quantify predictive change, and interpret uncertainty about slope values.
Geometry for Programmers
A slope is a numerical measure of a line's change in vertical coordinate relative to its change in horizontal coordinate.
- How it is used
- Uses vertical change relative to horizontal change to analyze function growth and constrain tangent directions in polynomial curves.
- How deep it goes
- Develops slope from interval averages to tangent-line derivatives and linear coefficient constraints, while deferring full infinitesimal analysis and limits.
- Examples
- Uses right-triangle geometry, shrinking intervals, quadratic constraints, and cubic curves with prescribed tangent angles.
- What you can do after
- Apply slope through derivatives to formulate tangent constraints and solve polynomial systems for smooth curve pieces.
Math for Web Design
Rate of change is the amount by which one variable changes relative to a change in another variable.
- How it is used
- Models changing size, position, speed, and progress in responsive layouts, scrolling interfaces, and animations.
- How deep it goes
- Explains slope through linear equations, worked responsive-width calculations, CSS functions, and animation timing, without deriving Bézier mathematics.
- Examples
- Uses scroll progress, responsive container widths, JavaScript position, and Bézier animation speed as concrete examples.
- What you can do after
- Apply slope to build fluid CSS dimensions, calculate JavaScript progress or motion, and tune animation timing.
Grokking Statistics
A slope is a regression coefficient describing the change in the predicted response for a one-unit change in an input variable.
- How it is used
- Uses slope to turn a linear relationship into predictions and plain-English change estimates.
- How deep it goes
- Defines and interprets slope through fitted lines, then extends it to multiple regression and beta notation.
- Examples
- Uses temperature, sports-drink sales, scatterplots, and house-size variables to illustrate slope.
- What you can do after
- Apply it via SciPy's linregress and interpret the resulting coefficient for a real input change.
Also covered in
- Elliptic Curve Cryptography for Developers
- Machine Learning Algorithms in Depth
- Architecture Modernization: Socio-technical alignment of software, strategy, and structure
- Grokking Simplicity
- Digital Twins in Action
What to know first
- linear regressionLinear regression is a statistical method that models a numeric response as a linear function of one or more predictor variables with fitted parameters.
- correlationCorrelation is a statistical association describing how variables vary together in direction or degree, without by itself establishing causation.
- inputAn input is information, a value, or an action supplied to a system, program, or computation for processing or to influence its behavior.
- independent variableAn independent variable is an input or explanatory variable used to model, explain, or predict variation in an outcome, without necessarily causing it.
Related concepts
- derivativemeasured by · A derivative is a mathematical quantity that measures the instantaneous rate of change of a function with respect to an input variable.
- betaequivalent to · Beta is a measure of an asset’s sensitivity to movements in the overall market, conventionally assigning the market portfolio a value of one.
- elliptic curve point additionused by · Elliptic-curve point addition combines two curve points according to the curve's group law to produce another curve point.
- line equationpart of · A line equation is an equation linear in its variables that represents a straight line in two dimensions or a linear relationship in higher dimensions.
- normal distributionused by · A normal distribution is a continuous probability distribution with a symmetric, bell-shaped density determined by its mean and variance.
Questions about slope
What is slope?
Slope is the rate at which one quantity changes with respect to another, represented for a straight line by the ratio of vertical change to horizontal change.
Which Manning books explain slope?
Grokking Machine Learning, Statistics Every Programmer Needs, Grokking Machine Learning, Second Edition, Grokking Bayes, Geometry for Programmers, Math for Web Design and Grokking Statistics.
What should I know before learning slope?
Manning books that teach slope usually introduce linear regression, correlation, input and independent variable first.
What is slope part of?
Slope is part of line equation. A line equation is an equation linear in its variables that represents a straight line in two dimensions or a linear relationship in higher dimensions.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.






