2
$\begingroup$

Data in the image below shows a variable DME reacting to the increase in acid concentration. It looks like it has a very fast increase from when the concentration is raised from 0 to 0.5 and then a rapid diminishing return.

enter image description here

I thought that a base 10 log function would be a good approximation for this based on the figure below (I admit, the pH scale was an inspiration even though the fact it is base 10 is not relevant here as far as I can tell).

enter image description here

This and other bases for log did not yield good fits. Any ideas about a good functional form to use?

$\endgroup$
  • $\begingroup$ Could you explain how you were fitting these functions and in what sense the results were not "good"? $\endgroup$ – whuber Jun 16 '19 at 13:45
  • $\begingroup$ I wanted to keep it as simple as possible. So I tried to linearize it by taking 10^y-variable and then running a simple linear regression. The results were not very good because the first observations at the 0 concentration still stand out like outliers (robust regression methods kick them right out). But those results at 0-concentration are part of a real, non-linear process $\endgroup$ – Deathkill14 Jun 16 '19 at 18:01
  • $\begingroup$ Linearizing by transforming $y$ can be a good idea, but not here, because the error terms look about the same size no matter what $x$ might be; transforming $y$ will ruin this desirable property. Consider instead transforming $x.$ When you do, you will be confronted with the heart of the problem: what to do when $x=0.$ Perhaps an understanding of this process (whatever it might be) will suggest an appropriate procedure. $\endgroup$ – whuber Jun 16 '19 at 20:21
  • $\begingroup$ Could you please say more about the experimental conditions? There presumably is some acid concentration even at your value of "0" unless you are working in an aprotic solvent. So what you are plotting on the x-axis is presumably the added amount of acid. Any buffers in your solution will affect how the pH/hydrogen-ion activity (presumably the predictor variable of fundamental interest) will change as different amounts of acid are added. $\endgroup$ – EdM Jun 16 '19 at 20:53
  • $\begingroup$ Thanks @whuber. Well, in the end, I found a pretty good fit with a sigmoid curve. That's pretty similar to what james philips did below. So I think that's kind of a good approach here. I'll try to get some prediction intervals for this now. $\endgroup$ – Deathkill14 Jun 17 '19 at 19:35
1
$\begingroup$

I extracted the data from your scatterplot and an equation search turned up a standard Power equation with offset as a good candidate, "AcidConc = a * pow(DME, b) + Offset" with parameters a = 1.3097975059317559E+01, b = 5.6301545542873851E-02, and Offset = 7.3917630382840713E+01 giving R-squared = 0.824 and RMSE = 2.196 with no logs needed. plot

$\endgroup$
  • 1
    $\begingroup$ Cool answer. I ended up with a sigmoid as a fit, so looks pretty much the same as this one. I like that you got a different form. i used one like a/(1 + exp(-b * (x-c))). But maybe yours will be more useful. $\endgroup$ – Deathkill14 Jun 17 '19 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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