# 2.4: Find y given x and the Equation of a Line

- Page ID
- 19633

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

Learning Outcomes

- Find the value of y given x and the equation of a line.
- Use a line to make predictions.

A line can be thought of as a function, which means that if a value of \(x\) is given, the equation of the line produces exactly one value of \(y\); This is particularly useful in regression analysis where the line is used to make a prediction of one variable given the value of the other variable.

Example \(\PageIndex{1}\)

Consider the line with equation:

\[y=3x-4\nonumber \]

Find the value of \(y\) when \(x\) is 5.

**Solution**

Just replace the variable \(x\) with the number 5 in the equation and perform the arithmetic:

\[y\:=\:3\left(5\right)-4=15-4\:=11\nonumber \]

Example \(\PageIndex{2}\)

A survey was done to look at the relationship between a woman's height, \(x\) and the woman's weight, \(y\). The equation of the regression line was found to be:

\[y=-220+5.5x\nonumber \]

Use this equation to estimate the weight in pounds of a woman who is 5' 2" (62 inches) tall.

**Solution**

Just replace the variable \(x\) with the number 62 in the equation and perform the arithmetic:

\[y\:=\:-220+5.5\left(62\right)\nonumber \]

We can put this into a calculator or computer to get:

\[y\:=\:121\nonumber \]

Therefore, our best prediction for the weight of a woman who is 5' 2'' tall is that she is 121 lbs.

Exercise

A biologist has collected data on the girth (how far around) of pine trees and the pine tree's height. She found the equation of the regression line to be:

\[y=1.3+2.7x\nonumber \]

Where the girth, \(x\), is measured in inches and the height, \(y\), is measured in feet. Use the regression line to predict the height of a tree with girth 28 inches.