The Physics
Hypertextbook
Opus in profectus

Curve Fitting

search icon

Discussion

introduction

I stole this from the "Triple A-S" (the American Association for the Advancement of Science). They know how to do it right so why change it.

Because of its abstractness, mathematics is universal in a sense that other fields of human thought are not. It finds useful applications in business, industry, music, historical scholarship, politics, sports, medicine, agriculture, engineering, and the social and natural sciences. The relationship between mathematics and the other fields of basic and applied science is especially strong.

I see eleven different fields mentioned in this single sentence. I only deal with one of them on a daily basis, but I agree that all of them are beholden to math. If you make decisions about what you'll devote your life to (or at least what you'll study professionally) based on some notion of "importance" then abandon everything other than mathematics. It's one of the oldest branches of human knowledge. The only one that's older is agriculture … um … yeah … and then there are tools and fire and … well, language is pretty important and math is right up there. Yeah math!

What does this mean for you right now?

The usual way it works. The assumption is that there is some mathematical relationship between the quantities being graphed. The data aspires toward this mathematical ideal, but because of the limitations of human beings and their instruments it only approximates it. The data points of a graph form a cloud around the curve of a function. If only we had better "vision". If only our devices were better at recording the actual values. If only we really knew what the essence of nature was so that we could assign these devices to their intended task. Then. Then we would see that every data point fell precisely on a perfect analytical curve. Ah, what a beautiful world that would be. Unfortunately, real data never looks exactly like the ideal curves of mathematics.

horizontal axis (x) vertical axis (y)
independent variable dependent variable
explanatory variable response variable
α
infinity proportional to Greek "alpha"

Also.

In search of relationships.

Your friend the proportionality symbol.

independent

Graph of an independent relationship

Take a look at the curve to the right. No matter what value the x variable takes on the curve, the y variable stays the same. This is a classic example of a relationship called independence. Two quantities are independent if one has no effect on the other. The curve is a horizontal, straight line represented by the general form equation…

y = k

where k is a constant.

A suitable conclusion statement from such a relationship would be that…

For example…

Independent relationships can be both boring and profound. Boring when we realize there's no link between the two quantities. Profound when we realize we've identified a fundamental principle or underlying concept of great significance. The independence of the speed of light and the speed of a reference frame is one of these statements. The speed of light is a fundamental constant — one of three or four in physics.

direct

Graph of a direct relationship

Now take a look at this curve. As the x variable increases, the y variable increases too. But there are a lot of curves that do this. What makes this one unique? What distinguishes it from all the other curves that increase (as the mathematicians say) monotonically? The key is in the shape — a straight, non-horizontal line that runs through the origin. With this particular shape, something special happens.

Pick a point on the line and note its coordinates. Double the value of the x variable and see how the y variable responds. The new value of y should also have doubled. Try it again. Only this time, cut the x variable in half. The y variable should have responded in the same manner; that is, it too should be cut in half. Whatever x does, y does the same. This illustrates the simplest, nontrivial form of proportionality — direct proportionality. Two quantities are directly proportional if their ratio is a constant.

y  = k
x

Rearranging this definition gives us the general form equation…

y = kx

where k is the constant of proportionality, which everyone should recognize as the the slope of a straight line in the xy plane.

A suitable conclusion statement from such a relationship would be that…

For example

Warning! Don't think that directly proportional means "when one increases, the other increases" or "when one decreases, the other decreases". It's a more specific kind of relationship than that. Here's a contrary example. A worker who puts in 60 hours on the job works 1.5 times as much as one who puts in 40 hours.

60 hr  = 1.5
40 hr

But workers working more that 40 hours a week in the US are supposed to be paid at an overtime rate, which is typically one and a half times their regular wage. Thus the 60 hour-a-week worker earns 1.75 times as much as the 40 hour-a-week worker.

1 × 40 regular hours + 1.5 × 20 overtime hours)  = 1.75
1 × 40 regular hours

Since the changes are not the same…

1.75 ≠ 1.5

the wages earned in this example are not directly proportional to the hours worked. A direct relationship is much more special than the general statement, "when one increases, the other increases". It's more like, "when one changes by a certain ratio, the other changes by the same ratio".

inverse

Graph of an inverse curve

Moving on. Take a look at this curve. This shape is called a rectangular hyperbola — a hyperbola since it has asymptotes (lines that the curve approaches, but never crosses) and rectangular since the asymptotes are the x and y axes (which are at right angles to one another).

Some say that this curve shows the opposite behavior of the previous one; that is, as the x variable increases, the y variable decreases and as the x variable decreases, the y variable increases. But like the previous curve there's a more specific kind of change that takes place. Check it out for yourself. Pick a convenient point on the curve. Note the coordinate values at this point. Now double the x coordinate and see what happens to the y coordinate. It's cut in half. Now try the reverse. Pick a point on the curve and cut its x coordinate in half. The y coordinate is now double its original value. Triple x and you get one-third of y. Reduce x to one-fourth and watch y increase by four. However you change one of the variables the other changes by the inverse amount. This illustrates another simple kind of proportionality — inverse proportionality. Two quantities are said to be inversely proportional if their product is a constant.

xy = k

Rearranging this definition gives us the general form equation…

y = k
x

where k is the constant of proportionality.

A suitable conclusion statement from such a relationship would be that…

For example…

square

Graph of a square curve

What do we have here? Why it's a parabola with its vertex at the origin. You get this kind of curve when one quantity is proportional to the square of the other. Since this parabola is symmetric about the y-axis that makes it a vertical parabola and we know that it's the horizontal variable that gets the square. Here's the general form equation for this kind of curve…

y = kx2

A suitable conclusion statement from such a relationship would be that…

For example…

square root

Graph of square root curve

Here's another parabola with its vertex at the origin, This one's tipped on its side and is symmetric about the x-axis. For a horizontal parabola like this one, it's the vertical variable that gets the square. The general form equation for this kind of curve is…

y = kx

A suitable conclusion statement from such a relationship would be that…

For example…

Something to remember — the square root is not an explicit function. It isn't single-valued. Every number has two square roots: one positive and one negative. Typical curve fitting software disregards the negative root, which is why I only drew half a parabola on the diagram above. Something else to remember — the domain of the square root is restricted to non-negative values. That's a fancy way of saying you can't find the square root of a negative number (not without expanding your concept of "number", that is).

power

So far we have five curves and five general form equations…

• independent  y = k
• direct  y = kx
• inverse  y = k/x
• square  y = kx2
• square root  y = kx

They have three common components…

x =  an independent variable (or explanatory variable)
y =  a dependent variable (or response variable)
k =  a constant of proportionality

and one component that varies…

n =  power of the independent variable

We could rewrite these general equations with two variables, a constant of proportionality and a power like this…

• independent  y = kx0
• direct  y = kx1
• inverse  y = kx−1
• square  y = kx2
• square root  y = kx½

We could even go so far as to write a general form equation for a whole family of equations…

y = kxn

Any two variables that are related to one another by an equation of this form are said to have a power relation between them.

Power relationships summarized
power general form description appearance
0 y = k independent horizontal, straight line
1 y = kx direct non-horizontal straight line through the origin
2 y = kx2 square vertical parabola with vertex at the origin
3 y = kx3 cube
−1 y = k/x inverse rectangular hyperbola
−2 y = k/x2 inverse square
−3 y = k/x3 inverse cube
½ y = kx square root horizontal parabola with vertex at the origin
y = kx cube root

linear

Graph of a linear relationship

Description: A combination of constant and direct. A fixed amount is added (or subtracted) at regular intervals.

General form.

y = ax + b

A suitable conclusion statement from such a relationship would be that…

Appearance: any straight line, regardless of slope or y-intercept

Example(s): utility bills (there's always a service charge)

quadratic

Graph of quadratic curve

Description: A combination of square, direct, and constant.

General Form

y = ax2 + bx + c

A suitable conclusion statement from such a relationship would be that…

Appearance: A vertical parabola when graphed. It's vertex can be anywhere. It could also be flipped upside down.

Example(s): distance during uniform acceleration

polynomial

Graph of a polynomial curve

Description: A combination of a constant, direct, square, cube, …. Keep going as far as you wish.

General form.

y = a + bx + cx2 + dx3 +…

A suitable conclusion statement from such a relationship would be that…

Appearance: any non-periodic function without asymptotes

Example(s): Polynomial functions can be used to approximate many continuous, single-valued curves

Polynomial relationships summarized
order general form name
0 y = a constant
1 y = a + bx linear
2 y = a + bx + cx2 quadratic
3 y = a + bx + cx2 + dx3 cubic
4 y = a + bx + cx2 + dx3 + ex4 quartic
5 y = a + bx + cx2 + dx3 + ex4 + fx5 quintic
n y = a0x0 + a1x1 + a2x2 a3x3 + … + anxn nth order poly­nomial

exponential growth

Graph of exponential growth

Description:

General form.

y = anbx

A suitable conclusion statement from such a relationship would be that…

The ratio of successive iterations is a constant. The quantity is multiplied by a fixed amount at regular intervals.

Appearance: asymptotic with negative x-axis, followed by runaway expansion

Example(s): unrestricted population growth, the magic of compound interest

exponential decay

Graph of exponential decay

Description:

General form.

y = anbx

A suitable conclusion statement from such a relationship would be that…

The ratio of successive iterations is a constant. The quantity is divided by a fixed amount at regular intervals.

Appearance: large initial value followed by abrupt collapse, approaches positive x-axis asymptotically

Example(s): radioactive decay, discharging a capacitor, de-energizing an inductor

exponential approach

Graph of exponential approach

Description:

General form.

y = a(1 − nbx) + c

A suitable conclusion statement from such a relationship would be that…

Appearance: asymptotically approaches a horizontal line

Example(s): charging a capacitor, energizing an inductor, teaching (half the students get it, then half of the remaining students get it, then half of the remaining students get it, and so on…)

periodic

Graph of a periodic curve

Description:

General form.

y = a sin(bx + c)

A suitable conclusion statement from such a relationship would be that…

Appearance: A sine curve is the prototypical example, not the only example. Any curve that repeats itself is periodic.

Example(s): Any daily (diurnal), monthly (lunar), yearly (annual, seasonal), or other periodic change.