Exponential Regression Find Fit

## Description

Here, we will create an exponential regression for the following data set and plot the regression with a scatter plot of the data.

(1)
\begin{align} \{ \ (0, 1.0647), \ (1, 1.2189), \ (2, 1.6752), \ (3, 3.3014), \ (4, 8.5549) \ \} \end{align}

Sage has no default model for find_fit(), so we must set one with other letters as constants, declaring them with var(). In order to perform an exponential regression, the model we pass to find_fit() is the standard exponential form, $ae^{bx} + c$. In Sage, we use exp(x) to represent $e^x$.

## Sage Cell

#### Code

var('a b')
dataset = [ (0, 1.0647), (1, 1.2189), (2, 1.6752), (3, 3.3014), (4, 8.5549) ]
model(x) = a*exp(b*x)
find_fit(dataset, model)

r(x) = 0.0641*exp(1.1921*x) + 0.9981
p1 = plot(r(x), -1, 5)
p2 = scatter_plot( dataset )
(p1 + p2).show()


none

## Tags

Primary Tags:

Secondary Tags:

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.

## Related Cells

Any related cells go here. Provide a link to the page containing the information about the cell.