Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm designing a web service that finds the regression function of a pattern within an image.

I analyzed three images and found the following three regressions:

1) $f(x) = 74.7602 + 0.2005x - 0.00091891x^2$ (domain: 0 ≤ x ≤ 200)

2) $f(x) = 102.337 + 0.349x - 0.002x^2$ (domain: 0 ≤ x ≤ 200)

3) $f(x) = 103.417 + 0.074x + x^2$ (domain: -8 ≤ x ≤ 8)

When these functions are plotted on a graph, functions 1 and 2 are more similar in shape. Function 3 is very narrow and is concave up (whereas functions 1 and 2 are concave down). How can I compare these three functions and mathematically determine that the curves of functions 1 and 2 are more similar? I don't care where on the coordinate plane the curves are, I just want to know if the shape is the same.

I was thinking about the obvious: plugging in points and checking for similarity, however this will not work if the function has a different scale. Do you know how I should begin?

P.S. I'm currently taking precalculus, so if you could describe this on my level (if possible), it would be greatly appreciated!

share|cite|improve this question
Will all the functions you are going to compare be parabolas (of the form $a+bx+cx^2$)? The differences you describe are both due to the sign and value of the coefficient of $x^2$ in your functions. – Alfonso Fernandez Jan 10 '13 at 4:25
@AlfonsoFernandez Yes, they will all be parabolas. – Jack Humphries Jan 10 '13 at 4:27
@AlfonsoFernandez I understand how the coefficient of $x^2$ plays a role in the concave and width of the graph, but what does the coefficient of x do? – Jack Humphries Jan 10 '13 at 4:29
Every parabola can be rewritten in the form $a(x-b)^2 + c$. When in this form, $c$ controls the vertical elevation of the parabola, $b$ controls its horizontal position and $a$ is the $x^2$ coefficient as usual. So if you don't care about translations, you should get your parabolas to that form and compare $a$s. – Alfonso Fernandez Jan 10 '13 at 4:34

take the Cross-Correlation function:

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.