# [SciPy-User] technical question: normed exponential fit for data?

Warren Weckesser warren.weckesser@enthought....
Thu Mar 24 16:17:00 CDT 2011

```Hi Daniel,

On Thu, Mar 24, 2011 at 3:14 PM, Daniel Mader <

> Hi David,
>
> no, x is °C, but I use to specify temperature differences in K sind I
> find °C only useful as an absolute value.
>

I don't understand that statement.

>
> Maybe you are right about the intercept, but you need to keep in mind
> that this is a complicated chemical assay. I wouldn't make any
> assumption for temperatures lower than 15°C and higner than 35°C. In
> my experiment, temperatures are typically between 20 and 25°C...
>
> Judging from the data, I would say that an exponential behavior is
> justified, i.e. the light emission increases with some percent per
> delta T. To my understanding, that is the exact description for an
> exponential curve, or am I mistaken?
>
>
If the photon yield is known to be correlated with the reaction rate, then
an exponential behavior is plausible: see the Arrhenius equation (
http://en.wikipedia.org/wiki/Arrhenius_equation).  However, you must use
Kelvin for that equation.

However, the exponential fit that you show in your plots is highly
questionable.  Notice that in both the #0 and #1 plots, the residuals show
the same non-random pattern--on the left, the data points are all below the
fitted curve, and on the right that are all (as far as I can tell) above the
curve.  This suggest a bad model.  Linear seems much more effective for the
fairly limited range of temperatures that you are using.

Warren

> Thanks in advance, I really enjoy the discussion here,
> Daniel
>
> > A really silly question - you are using temperature values in Kelvin
> (rather
> > than centigrade) aren't you? The chemical/physical assumption is probably
> that
> > rates are an exponential function of the temperature in Kelvin, not in C.
> Your
> > high concentration curve is looking awfully like it's heading for an
> intercept
> > at 0C.
> >
> > cheers,
> > David
> >
> > ----- Original Message ----
> > From: Robert Kern <robert.kern@gmail.com>
> > To: SciPy Users List <scipy-user@scipy.org>
> > Sent: Fri, 25 March, 2011 5:09:33 AM
> > Subject: Re: [SciPy-User] technical question: normed exponential fit for
> data?
> >
> > On Thu, Mar 24, 2011 at 10:33, Daniel Mader
> >> Hi,
> >>
> >> this is not a software question or scipy problem but rather I have no
> >> clue how to tackle this on a mathematical level.
> >>
> >> I'd like to create a unique fit function for data. Attached is a file
> >> which holds three measurements for three different known
> >> concentrations, i.e. my "calibration" measurement at low, medium and
> >> high concentration.
> >>
> >> Apparently, the temperature behavior of the chemical reaction is
> >> exponential, i.e. the photon yield increases with about 10%/K for the
> >> examined range for a given concentration.
> >
> > Hmm. I certainly wouldn't have come to that conclusion looking at the
> > data. At least for #0 (high concentration?), the linear fit is
> > substantially better.
> >
> >> Now comes the tricky part: I'd like to use this knowledge for a
> >> temperature compensation because I only need to determine the
> >> concentration. The temperature of the reaction is measured
> >> simultaneously but might vary in the range of +-3K. In terms of assay
> >> performance, that makes a huge difference due to the 10%/K so that I'd
> >> need to compensate for it.
> >>
> >> How can I use my calibration measurement to find a function which I
> >> could use to compensate for varying temperatures?
> >
> > Can you do more calibrations with different concentrations? For any
> > given temperature, you essentially only have three data points with
> > which to determine the relationship between concentration and photon
> > count. That's pretty difficult without any theory to help you fill in
> > the gaps.
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20110324/8762fce0/attachment.html
```