Write a linear function for the data in the table below.

\begin{tabular}{|c|c|c|c|c|}
\hline Time (hours) & 1 & 2 & 3 & 4 \\
\hline Cost (dollars) & 7 & 10 & 13 & 16 \\
\hline
\end{tabular}



Answer :

To find the linear function that fits the given data, we need to determine the equation of the line in the form:

[tex]\[ y = mx + b \][/tex]

where:
- [tex]\( y \)[/tex] is the cost in dollars,
- [tex]\( x \)[/tex] is the time in hours,
- [tex]\( m \)[/tex] is the slope of the line,
- [tex]\( b \)[/tex] is the y-intercept (the value of [tex]\( y \)[/tex] when [tex]\( x = 0 \)[/tex]).

Given the table:
[tex]\[ \begin{tabular}{|c|c|c|c|c|} \hline Time (hours) & 1 & 2 & 3 & 4 \\ \hline Cost (dollars) & 7 & 10 & 13 & 16 \\ \hline \end{tabular} \][/tex]

We identified that the slope ([tex]\( m \)[/tex]) and the y-intercept ([tex]\( b \)[/tex]) are:

[tex]\[ m = 3.0000000000000018 \][/tex]
[tex]\[ b = 3.999999999999994 \][/tex]

Therefore, the linear function that models the data is:

[tex]\[ y = 3.0000000000000018 \cdot x + 3.999999999999994 \][/tex]

For practical purposes, we can round these values to simplify the function (since they are very close to integers). The simplified linear function is:

[tex]\[ y = 3x + 4 \][/tex]

Thus, the linear function for the given data is:

[tex]\[ y = 3x + 4 \][/tex]