2

Please forgive the vagueness of my question, it has been a while since I have done this sort of math and I'm simply looking for the correct type of wording to further research this problem.

Given that I have a data set that produces a scatter plot in bell-shaped curve similar to this image:

My goal is to create a curve that fits this scatter plot as shown above, and then calculate the maximum value at the peak of the curve. For example, what is the expected value on the x-axis that is most likely to correlate with the highest value on the y-axis. I'm assuming that this will also provide some degree of statistical significance and also require a software such as R.

It has been a decade since I have done this type of math and the vocabulary I need to look this up and refresh myself on these concepts is escaping me.

Any insight would be appreciated.

311411
  • 3,537
  • 9
  • 19
  • 36
NickC
  • 121

2 Answers2

2

Assume that the data $(y_n,x_n)_{n \in \{0,1,2...,N-1\}}$ has been generated by $$y_n=a+b\exp\{-c(x_n-d)^2\}+e_n$$ where $a,b,c$ are parameters to be estimated and $e_n$ are IID errors with mean zero. We must find $\hat{\theta}:=[\hat{a},\hat{b},\hat{c},\hat{d}]$ as the optimal solution to the minimization problem $$\min_{a,b,c,d \in \Theta}\sum_{n=0}^{N-1}(y_n-(a+b\exp\{-c(x_n-d)^2\}))^2$$ This can be done numerically. Once you have $\hat{\theta}$ you want to find its maximum. We compute $$\frac{d}{dx}(\hat{a}+\hat{b}\exp\{-\hat{c}(x-\hat{d})^2\})=-2\hat{b}\hat{c}(x-\hat{d})\exp\{-\hat{c}(x-\hat{d})^2\}=0$$ which is true for $x^*=\hat{d}$. So the maximum at $x^*$ is $\hat{a}+\hat{b}$.

Snoop
  • 15,214
2

The function to be fitted to the data might be chosen on Gaussian kind : $$y(x)=a+b\:e^{-p(x-c)^2}$$ The criteria of fitting isn't specified in the wording of the question. Possible criteria of fitting : LMSE or LMAE or LMRE or etc.? For each different criteria the result will be slightly different.

The usual softwares for non-linear regression are convenient. They proceed with iterative numerical calculus starting from "guessed" initial values of the parameters $a,b,c,p$.

Another approach :

The principle of a non-standard method which is not iterative and doesn't requires guessed initial values is explained in https://fr.scribd.com/doc/14674814/Regressions-et-equations-integrales

enter image description here

Since the data isn't provided on numerical form in the question, a rough data was loaded thanks to scanning the graph joint to the question. Of course the accuracy in scanning such a small graph is not good. Certainly this induces somme additional deviations in the result below.

enter image description here

NOTE : If a particular criteria of fitting was specified, the above non-iterative method would be not sufficient. A non-linear regression with the specified criteria of fitting implemented into it would be required. Intead of "guessed" initial values one could use the values of the parameters found above.

JJacquelin
  • 66,221
  • 3
  • 37
  • 87