November 17, 2024, 11:30:48 PM
Forum Rules: Read This Before Posting


Topic: Best way to determine global maximum of graph?  (Read 3404 times)

0 Members and 1 Guest are viewing this topic.

Offline Fzang

  • Regular Member
  • ***
  • Posts: 91
  • Mole Snacks: +3/-1
Best way to determine global maximum of graph?
« on: May 28, 2011, 12:03:13 PM »
I have some graphs, with lots and lots of data points, and I need to determine the maximum of the graph.

Here is the same graph twice. Trendline on one is 6th order polynomial and "moving average" on the other.




Now, which of these methods would be best to determine the maximum? The teacher has given us the graphs with the moving average, and told us to draw two lines, and decide maximum that way, but is that really the best? It's hard to see, but on all the graphs I have there is a slight difference between using moving average and polynomial.

I am calculating the melting point of some DNA, which is about 60 degree C. The polynomial method is pretty much always 1 degree higher.

What would be best?

Offline enahs

  • 16-92-15-68 32-7-53-92-16
  • Retired Staff
  • Sr. Member
  • *
  • Posts: 2179
  • Mole Snacks: +206/-44
  • Gender: Male
Re: Best way to determine global maximum of graph?
« Reply #1 on: May 28, 2011, 04:03:16 PM »
Hard to tell because their is no axis, etc, but this data might be ok for a derivative plot.
It will be crappy looking derivative plot, but it might work.
Just google derivative plot.


Offline Fzang

  • Regular Member
  • ***
  • Posts: 91
  • Mole Snacks: +3/-1
Re: Best way to determine global maximum of graph?
« Reply #2 on: May 28, 2011, 04:42:15 PM »
This is the derivative plot  ;)

The x-axis contains temperatures 40-70 C, anything below 40 has been cut off. The graph contains almost 200 data points. But as you can see from the graph, these data vary a lot, so you have to find an "average trend" which forms a parabole with a maximum.

So, back to my question, and probably also in general since this won't be the last time I'm using a graph, when would you pick moving average over an oh so pretty 6th order polynomial?

Offline enahs

  • 16-92-15-68 32-7-53-92-16
  • Retired Staff
  • Sr. Member
  • *
  • Posts: 2179
  • Mole Snacks: +206/-44
  • Gender: Male
Re: Best way to determine global maximum of graph?
« Reply #3 on: May 28, 2011, 06:24:51 PM »
If that is the derivative plot, then could you post what the non derivative data looks like, might be better ways of checking it then.


The problem with the polynomial is, yes it looks ok there,  but you said you want a more general way. Well, the next data might only need a 3rd order polynomial, or might need a 8th order, etc.

Offline Fzang

  • Regular Member
  • ***
  • Posts: 91
  • Mole Snacks: +3/-1
Re: Best way to determine global maximum of graph?
« Reply #4 on: May 28, 2011, 06:52:22 PM »


Here is absorbance as function of temperature. You have to look closely to notice the deviations.

The derivative graph is then dA/dT on y, and T on x.

Offline enahs

  • 16-92-15-68 32-7-53-92-16
  • Retired Staff
  • Sr. Member
  • *
  • Posts: 2179
  • Mole Snacks: +206/-44
  • Gender: Male
Re: Best way to determine global maximum of graph?
« Reply #5 on: May 29, 2011, 12:02:24 AM »
Hmm, looks pretty decent actually.

Maybe do the 2nd derivative and see how that looks? It will be where it crosses 0 then (and hopefully you will have one obvious one).

Offline Borek

  • Mr. pH
  • Administrator
  • Deity Member
  • *
  • Posts: 27847
  • Mole Snacks: +1812/-412
  • Gender: Male
  • I am known to be occasionally wrong.
    • Chembuddy
Re: Best way to determine global maximum of graph?
« Reply #6 on: May 29, 2011, 04:46:17 AM »
I have a feeling derivatives amplify experimental errors to the point they are useless. My approach would be to fit the original data to (some) polynomial and use this curve for further calculations. But that's just intuition, I don't have anything (in terms of published papers/books) to backup the idea.

Fzang, what accuracy do you need? What is accuracy of your data? You wrote that depending on the approach final results differ "slightly" - perhaps the difference is small enough that it is not worth additional effort?
ChemBuddy chemical calculators - stoichiometry, pH, concentration, buffer preparation, titrations.info

Sponsored Links