Interactive Graph:
Intercept and Slope

By Elena Llaudet, co-author of Data Analysis for Social Science (DSS)

We can define a line as Y = α + βX, where:

  • α (alpha) is the intercept: the value of Y when X=0, which determines the vertical location of the line.
  • β (beta) is the slope: rise over run (the change in Y divided by the change in X between two points on the line), which determines the steepness of the line. Interpretation: change in Y associated with a one-unit increase in X.

Let's see how changing these parameters affects the line:

STEP 1: The graph below shows a line with an intercept of 1 and a slope of 2, so the line is: Y = 1 + 2X (as shown in the title).
  • To verify the intercept, find 0 on the x-axis, move up to the line, and find the Y-value that corresponds to that point on the line. The point is (0,1), confirming the intercept is 1. (Check the first box to show in the graph the point at X=0 as an orange circle.) Note: The intercept is not always where the line crosses the visible y-axis, since that axis might not be drawn exactly at X=0.
  • To verify the slope, choose two points on the line, and calculate rise over run. For example, we can use the intercept and the point at X=2, which is (2,5). (Check the second box to show in the graph this point as an orange triangle.) Using (0,1) and (2,5):
    • rise = ΔY = Yfinal - Yinitial = 5-1 = 4
    • run = ΔX = Xfinal - Xinitial = 2-0 = 2
    • slope = rise/run = 4/2 = 2
    Interpretation: every one-unit increase in X is associated with an increase in Y of 2 units.
STEP 2: Move the intercept slider to see how it shifts the line vertically without changing its steepness. For example, changing from 1 to -1 moves both points down by 2 units, but the slope stays the same because neither rise nor run have changed.
STEP 3: Now, keep the intercept at -1 and move the slope slider to see how it changes the line's steepness without affecting the intercept.
  • Decreasing the slope from 2 to 1 makes the line less steep, but keeps it moving upwards (from left to right). The X=0 point stays at (0,-1), but the X=2 point moves to (2,1): rise = 1-(-1) = 2, run = 2-0 = 2, so slope = 2/2 = 1. Interpretation: every one-unit increase in X is associated with an increase in Y of 1 unit.
  • A negative slope reverses the direction of the line: it will go from moving upwards to downwards (from left to right). With slope = -2, the X=0 point stays at (0,-1), but the X=2 point drops to (2,-5): rise = -5-(-1) = -4, run = 2-0 = 2, slope = -4/2 = -2. Interpretation: every one-unit increase in X is associated with a decrease in Y of 2 units.
  • Setting the slope to 0 creates a horizontal line. The X=0 point stays at (0,-1), and the X=2 point moves to (2,-1): rise = -1-(-1) = 0, run = 2-0 = 2, so slope = 0/2 = 0. Interpretation: changes in X are not associated with any change in Y.

Move this slider to see how the intercept changes the line's vertical position.

1

Move this slider to see how the slope changes the line's steepness.

2
Y = 1 + 2X
Y

Notes: In this graph, each point consists of two coordinates in the two-dimensional space. The first coordinate indicates the position of the point on the x-axis, and the second indicates the position of the point on the y-axis. For example, the point (0,1) aligns with 0 on the x-axis and 1 on the y-axis.