02Jmodelling

toc = **Modelling and Regression** =

Types of Graphs
We have studied these six types of graphs (among others). For the purposes of this topic we will assume there is no sideways translation.



Regression
Often we obtain a set of data and wish to produce the equation of a line that fits that data. This process is called ** Regression **. You may know it as “**line of best fit**.”

The first step is to decide which type of curve you will try to fit to the available data.


 * Look for: **
 * Linear Data (Linear)
 * Is there cyclic behaviour (repeated curving up then down)? (Trigonometric)
 * Are there signs of a turning point? (Quadratic)
 * Are there signs of a point of inflection (change from concave to convex)? (Cubic)
 * Is the graph increasing but with steadily decreasing gradient? (Square root, Cube root)
 * Does the graph appear to increase but approach an asymptote? (Exponential)
 * Is the graph increasing and with steadily increasing gradient? (Quadratic, Cubic, Exponential)
 * Does the graph appear to decrease to an asymptote? (Exponential, Hyperbola, Truncus)
 * Does the graph appear to have a vertical asymptote? (Hyperbola, Truncus)


 * Note: ** Often there will be several possible curves that could fit the available data. If the question the question/situation does not specify the curve to be used then trial and error must be used to find the curve that gives the best fit (measured by the r 2 value).

Example (by hand)

The data in the following table fits one of these rules. Find the equation which best models this data.



First sketch the data points and observe!!



The points appear to fit the pattern of the square root graph. We conclude our data will probably fit a curve with the equation: math y=a \sqrt{x}+b \qquad \text{where a and b are unknown constants} \qquad. math Based on this observation, rework the table to include a line for sqrt(x)



Now sketch the points (X, y) --- if they produce a straight line (or a strongly correlated linear regression line) then the correct rule has been chosen.



Draw in the line y = aX + b to get a linear model for the data. Use this to get values for a and b. These constants are then the same for the original equation.



Using the points (0, 0) and (2, 5) gives us a gradient of 2.5 and a y-intercept of 0 so the equation of the straight line is: math . \qquad y=2.5X \qquad. math

The equation of a regression line fitting our original data can then be found by: math \text{replacing } X \text{ with } \sqrt{x} \qquad. math

Hence our line of best fit for this data is given by math . \qquad y=2.5 \sqrt{x} \qquad. math

Plot this equation over the orginal points to check how closely the curve “fits.”

Modelling and Regression on the Classpad
Go to top of page flat

.