Exponential Modelling and Curve Fitting

Preview:

DESCRIPTION

Exponential Modelling and Curve Fitting. Mathematical Curves. Sometime it is useful to take data from a real life situation and plot the points on a graph. We then can find a mathematical equation for the curve formed by the points. - PowerPoint PPT Presentation

Citation preview

Exponential Modelling and Curve Fitting

Mathematical CurvesSometime it is useful to take

data from a real life situation and plot the points on a graph.

We then can find a mathematical equation for the curve formed by the points.

The most usual curves that real life situations can be modelled by are:

Linear

Exponential

Power Functions

y

x

2

2

4

4

6

6

8

8

10

10

– 2

– 2

– 4

– 4

– 6

– 6

– 8

– 8

– 10

– 10

2

2

4

4

6

6

8

8

10

10

– 2

– 2

– 4

– 4

– 6

– 6

– 8

– 8

– 10

– 10

y

x

2

2

4

4

6

6

8

8

10

10

– 2

– 2

– 4

– 4

– 6

– 6

– 8

– 8

– 10

– 10

2

2

4

4

6

6

8

8

10

10

– 2

– 2

– 4

– 4

– 6

– 6

– 8

– 8

– 10

– 10

y

x

1

1

2

2

3

3

4

4

5

5

– 1

– 1

– 2

– 2

– 3

– 3

– 4

– 4

– 5

– 5

1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

8

9

9

10

10

– 1

– 1

y mx c

x kxy Ar or y Ae

ky Ax

2 4 – 2

y

x

2

2

4

4

6

6

8

8

10

10

2

2

4

4

– 2

– 2

Revision on linear graph and log

y mx c

Gradient Y-intercept

lnA·B=lnA+lnBlnA·ekx =lnA+lnekx elny =y lnex=x

lnekx =kx

Exponential Graphs

The exponential model applies in these situations

• Investment• Economic Growth or Decline• Population Growth or Decline• Radio Active Decay• Cooling• etc

Exponential Graphs have an x in the power

ExampleIt is known that the data form an exponential graphFind out the equation forthe model

So we use the model

y= Aekx

x y

0 0.5

1 2.24

2 10.04

3 45.00

4 201.71

5 904.02

1 2 3 4 5 10 20 30 40 50

y

x

1

1

2

2

3

3

4

4

5

5

10

10

20

20

30

30

40

40

50

50

Now let’s look at the log version

x y lny

0 0.5 -0.693

1 2.24 0.81

2 10.04 2.31

3 45.00 3.81

4 201.71 5.31

5 904.02 6.81

1 2 3 4 5 6 7 8 9 10 – 1 – 2

y

x

1

1

2

2

3

3

4

4

5

5

1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

8

9

9

10

10

– 1

– 1

– 2

– 2

We have now converted the exponential relationship to a linear one

ln y

x

How do we know if we are dealing with an Exponential

Function?

• If we have a situation where the graph of lny vs x is a straight line we know we are dealing with an exponential function

Exponential modelling

The linear lny and x graph is in the form of

kxy Ae

kxy Ae

ln lny A kx elny= ekx+lnA

y=ekxelnA

y=ekxA

Practical Applications

Time

(weeks)

No of fruit flies

ln (No of flies)

0 50 3.91

2 80 4.38

4 140 4.94

6 230 5.44

8 360 5.89

10 600 6.40

12 1000 6.91

Population of fruit flies

What’s the weekly increase

Rate?

No of Flies Vs Time in weeks

0

200

400

600

800

1000

1200

0 2 4 6 8 10 12 14

Weeks

No

of

Flie

s

No of Flies Expon. (No of Flies)

We can see this is an

exponential graph

Ln( No of Flies) Vs Time in Weeks

0.00

1.00

2.00

3.00

4.00

5.00

6.00

7.00

8.00

0 2 4 6 8 10 12 14

Weeks

LN

(N

o o

f fl

ies)

Ln(No of Flies) Linear (Ln(No of Flies))

This is the log version of the

graph

Time

(weeks)

No of fruit flies

ln (No of flies)

0 50 3.91

2 80 4.38

4 140 4.94

6 230 5.44

8 360 5.89

10 600 6.40

12 1000 6.91

Y intercept is 3.91

Gradient

1

1

y ym

x x

6.91 3.91

12 03

120.25

ln 0.25 3.91y x 0.25 3.91xy e 0.25 3.91.xy e e

0.25 49.9xy e 0.2550 xy e

ln y mx c

y=50×1.284x

y=50×(1+0.284)x

The rate is 28.4%

Using the calculator to find the equation

In Stats mode EXE

Enter data EXE after

each. F1 Grph

F6 Set

Graph type scatter

X List =List 1

Y List= List 2

Exit

F6 to scroll over

F2 Exp

50

0.25

as before

a

b

0.2550 xy e

X 1 2 3

Y 300 150 75

The data can be modelled by exponential equations

•Plot the raw data

•What is the exponential equation?

Power FunctionPower Function

Power Curve ModellingSometimes we have a power function rather than an exponential function.

Eg

ny ax

x y

1 3

2 4.24

3 5.20

4 6

5 6.71

1 2 3 4 5 1 2 3 4 5 6 7 8

y

x

1

1

2

2

3

3

4

4

5

5

1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

8

0.53y x

Using the calculator to find power functions

In Stats mode EXE

Enter data F1 Grph

F6

F6 Set

Set as before

F6

F3 Pwr

0.5

3

0.5

3

a

b

y x

Power Curve Modelling

In this case if we plot lnx vs lny we will get a straight line

Eg

lnx x y lny

0 1 3 1.10

0.693 2 4.24 0.693

1.10 3 5.20 1.44

1.39 4 6 1.79

1.61 5 6.71 1.9

1.79 6 7.35 1.99

X Vs Lny

0.00

0.50

1.00

1.50

2.00

2.50

0 1 2 3 4 5 6 7 8

x values

ln y

val

ues

Not a linear relationship

Lnx vs Lny

0.00

0.50

1.00

1.50

2.00

2.50

0.00 0.50 1.00 1.50 2.00 2.50

Lnx

Ln

y

This relationship is now a linear

one

How to we know if we are dealing with an Power

Function?• If we have a situation where the graph of

lny vs lnx is a straight line we know we are dealing with an power function

ny ax

Tabulate Values

Plot the data with the independent variable on the x axis and the dependant on the y axis

If the data does not indicate a linear relation, decide whether it is

a. An exponential function

b. A power function

For an exponential function graph x against ln(y)

For a power function graph ln(x) against ln(y)

Draw the line of best fit

Mathematical Modelling

Sometimes either a power function or an exponential function appear to fit. We can use log graphs to choose between them but we need to plot the graph first

20.03#1

In October 1987 there was a major price crash in the NZ sharemarket

This table shows the average weekly share price of Ariadne shares over

a 5 week period following the crash.

EgEx

Week(x) 1 2 3 4 5Price(y) cents

120 44.1 16.2 6.0 2.2

) Draw a graph of lny against x

) Draw a graph of lny against lnx

a

b

Graphed Data

Price vs weeks

0

20

40

60

80

100

120

140

0 1 2 3 4 5 6

weeks

Pri

ce

(c

en

ts)

Price vs weeks

y = 325.6e-0.9993x

0

20

40

60

80

100

120

140

0 1 2 3 4 5 6

weeks

Pri

ce

(c

en

ts)

Exponential trend line

Good fit

Spread sheet will give us the equation

r=?

Price vs weeks

y = 164.86x-2.4201

0

20

40

60

80

100

120

140

160

180

0 1 2 3 4 5 6

weeks

Pri

ce

(c

en

ts)

Power trend line

Not so good

Spread sheet will give us the equation

r=?

lny vs x

0

1

2

3

4

5

6

0 1 2 3 4 5 6

weeks

ln s

ha

re p

ric

eWeek(x) 1 2 3 4 5Price(y) cents 120 44.1 16.2 6.0 2.2

) Draw a graph of lny against xa

2

ln 0.9993 5.7857

1

y x

R

=- +

=

Week(x) 1 2 3 4 5Price(y) cents 120 44.1 16.2 6.0 2.2

lny vs lnx

0

1

2

3

4

5

6

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8

lnx

lny

) Draw a graph of lny against lnxb

2

ln 2.4201ln 5.1051

0.9475

y x

R

=- +

=

In the exam you are required to test both y=axn and y=aekx as models for your data.

You need to record your working and the evidence you used in helping you to decide which model is most

appropriate for your data. Then find the model that best fits your original data.

Week(x) 1 2 3 4 5Price(y) cents

120 44.1 16.2 6.0 2.2

The data is for the average weeklyShare price of Air New Zealand shares over a 5 week period.

1) You need to plot the raw data

a) correct x and y scale

b) correct label for x and y

c) correct title

d) correct unit

Week(x) 1 2 3 4 5

Price(y) cents 120 44.1 16.2 6.0 2.2

Price vs weeks

y = 325.6e-0.9993x

0

20

40

60

80

100

120

140

0 1 2 3 4 5 6

weeks

Pri

ce

(c

en

ts)

Exponential trend line

Good fit

Price vs weeks

y = 164.86x-2.4201

0

20

40

60

80

100

120

140

160

180

0 1 2 3 4 5 6

weeks

Pri

ce

(c

en

ts)

Power trend line

Not so good

2) Test for the model Using graphics calculator:Exponential: A= 325.6 k=-0.9993 r2 =Power: a=164.86 n= -2.4201 r2= • The exponential model has the higher r2 value • and the two graphs of the given equation shows the

exponential to more closely follow the gathered data.

The best fit equation is y=325.6e-0.9993x

You are also required to make predictions for x and y.

You need to choose an x-value for which you don’t have raw data and use your model to predict the corresponding y-value.

You also need to choose a y-value for which you don’t have raw data and use your model to predict the corresponding x-value.

Week(x) 1 2 3 4 5Price(y) cents 120 44.1 16.2 6.0 2.2•y=325.6e-0.9993x

When x=2.5 y=325.6×e(-0.9993×2.5) =26.774

When y=10 go to equation Solver 10=325.6×e(-0.9993x)Press exe twice to get the answer!! x=3.5

•y=164.86x2.4201

When x=6 y=164.86×6 -2.4201=2.15

When y=10 go to equation Solver 10=164.86x -2.4201 Press exe twice to get the answer!! x=3.18

Analysing data

• Checking your model is appropriate by selecting either an x-value and calculate its y-value or a y-value and calculating its x-value.

Week(x) 1 2 3 4 5

Price(y) cents 120 44.1 16.2 6.0 2.2

Check closeness of fit by •using x=4 y=325.6×e(-0.9993×4) =5.98This value is only very slightly lower than the observed value of 6.0.

•Using x=1 y=325.6×e(-0.9993×1) =119.8 This value is also only very slightly lower than the observed value of 120.

•The model y=325.6e-0.9993x

Gives similar results to the observed values.

1. Graph your raw data

2. Test both y=axn and y=aekx as models for your data.(Record working and evidence)

Decide which model is the best fit.

3. Make predictions: a. Choose an x-value for which you do not have raw data

and use your model to predict the corresponding y-value. b. Choose a y-value for which you do not have raw data

and use your model to predict the corresponding x-value.

blocks 1 2 3 4 5 6 7 8 9 10 11 12

Distance 30.7 47.5 67.5 92.1 121.1 149 164.6 186.6 205.1 227.9 243.1 265.5

1. Graph your raw data

2. Test both y=axn and y=aekx as models for your data.(Record working and evidence)

Decide which model is the best fit.

3. Make predictions: a. Choose an x-value for which you do not have raw data

and use your model to predict the corresponding y-value. b. Choose a y-value for which you do not have raw data

and use your model to predict the corresponding x-value.

Excellence Questionsfor model y=27.4x0.912

1) Checking that your model is appropriate by selecting either an x-value and calculating its y-value and calculating its x-value

Answer:

When use 5 blocks, x=5,

y=27.450.912 = 118.7cm

This is slightly lower than the observed value of 121.1cm.

2) Explain how well your model fits the raw data, referring to at least 2 pieces of specific evidence from your graphs, or your calculations.

Answer: • The observed value and theoretical values are

very close, therefore a power model seem to fit well.

• The line of best fit drawn on the calculator passes through almost every point, 8 out of the 12 observed points. It again shows the power model fits the experiment well.

• Plotted on the log-log paper, the line of best fit is straighter than the semi-log paper. Hence, the power model is a better model than exponential.

3) Explain the theory behind the model Power model plotted on the log-log paper was a straight line.

The equation can be derived from

ln lny A kx elny= elnA+kx

y=elnAekx

y=Aekx

Semi-log for exponential

lny=nlnx+lna lny=lnxn + lna lny=lnxn · a y= axn

Log-log for power

4) Identify limitations of experiment and state how you could improve it.

Limitation• The carpet was uneven which would affect the distance

the golf ball would roll, thus affecting the accuracy of the results.

• The bricks used to increase the height of the ramp may not have been equal height.

• The ball might have lost some momentum when it dropped from the ramp to the carpet.

• The higher the blocks are, the more block displacement there is each time the ball was rolled.

Improvement:• Get a ramp that’s got a ground-piece• Place the bricks against a wall to eliminate the

displacement.

ny axln ln ny axln ln ln ny a x ln ln lny a n x

The linear graph for lnx and lny is in the form of

Lnx vs Lny

0.00

0.50

1.00

1.50

2.00

2.50

0.00 0.50 1.00 1.50 2.00 2.50

Lnx

Ln

y

Power function

The linear lny and x graph is in the form of

kxy Ae

ln lny A kx elny= ekx+lnA

y=ekxelnA

y=ekxA

Ln( No of Flies) Vs Time in Weeks

0.00

1.00

2.00

3.00

4.00

5.00

6.00

7.00

8.00

0 2 4 6 8 10 12 14

Weeks

LN

(N

o o

f fl

ies)

Ln(No of Flies) Linear (Ln(No of Flies))

Exponential function

1) You need to plot the raw data

a) correct x and y scale

b) correct label for x and y

c) correct title

d) correct unit

2) Test both y=axn and y=aekx as models for your data.(Record working and evidence)

Decide which model is the best fit.Exponential: a= 49.8491 b=0.1397 r2 =0.9077Power: a=38.6093 b= 0.6987 r2= 0.9973• The power model has the higher r2 value • The power graph follows more closely to the gathered

data.

The best fit equation is y=38.6093e0.6987x

3. Make predictions: a. Choose an x-value for which you do not have raw data

and use your model to predict the corresponding y-value.

b. Choose a y-value for which you do not have raw data

and use your model to predict the corresponding x-value.

Excellence Questionsfor model y=27.4x0.912

1) Checking that your model is appropriate by selecting either an x-value and calculating its y-value and calculating its x-value

Answer:

When use 5 blocks, x=5,

y=27.450.912 = 118.7cm

This is slightly lower than the observed value of 121.1cm.

2) Explain how well your model fits the raw data, referring to at least 2 pieces of specific evidence from your graphs, or your calculations.

Answer: • The observed value and theoretical values are

very close, therefore a power model seem to fit well.

• The line of best fit drawn on the calculator passes through almost every point, 8 out of the 12 observed points. It again shows the power model fits the experiment well.

• Plotted on the log-log paper, the line of best fit is straighter than the semi-log paper. Hence, the power model is a better model than exponential.

3) Explain the theory behind the model Power model plotted on the log-log paper was a straight line.

The equation can be derived from

ln lny A kx elny= elnA+kx

y=elnAekx

y=Aekx

Semi-log for exponential

lny=nlnx+lna lny=lnxn + lna lny=lnxn · a y= axn

Log-log for power

4) Identify limitations of experiment and state how you could improve it.

Limitation• The carpet was uneven which would affect the distance

the golf ball would roll, thus affecting the accuracy of the results.

• The bricks used to increase the height of the ramp may not have been equal height.

• The ball might have lost some momentum when it dropped from the ramp to the carpet.

• The higher the blocks are, the more block displacement there is each time the ball was rolled.

Improvement:• Get a ramp that’s got a ground-piece• Place the bricks against a wall to eliminate the

displacement.

Recommended