# Averaging data then fitting vs fitting then averaging in non-linear regression?

I have a very similar problem like in this question. The difference is that I am dealing with non-linear regression. Moreover, the answer to that question suggests that there should be no difference between fitting to averaged data vs averaging the values from independent fits - in my case I get different results for the same data, so the answer is not valid in my case.

Suppose I have to obtain a single parameter from experimental data using non-linear regression analysis. I have performed multiple repetitions of the experiment, so I have multiple values for each data point. I have two possibilities to obtain the desired parameter:

1. Perform the fitting for each data set, then average the obtained parameter
2. Average the data, then perform a single fitting

Each approach gives me a different value of the parameter. Clearly, one number must be closer to the true value of the parameter. Which one is valid? Intuitively, when I perform each measurement on separate occasions/days, the first approach seems more reasonable, because the data are independent. However, if I collect the data in a single experiment so the data may be at least partially dependent, the second approach appears more valid. Is there a mathematical argument on which approach is correct?

EDIT: I have a feeling that it doesn't matter what sort of curve I am fitting to, the answer should be correct in general. Anyway, my function is:$$A=A_0-A_0\ \frac{C}{C+k}$$ where $C$ is the independent variable, $A_0$ is fixed and $k$ is the fitted parameter. I am using a global fitting with Levenberg–Marquardt method for several datasets (each datased have a different $A_0$ value). Both $C$ and $A_0$ can have errors. The number of points in each dataset is usually $5$. The number of datasets is $5$ to $10$.

• You should give us more details of your experiments(s). What is the nature of the experiment (what did you do?, in language of the application). Can there be differences between the experimental materials, explaining some differences between the results? ... ... – kjetil b halvorsen Sep 9 '16 at 11:02
• This blog post is very relevant: andrewgelman.com/2005/03/07/the_secret_weap – kjetil b halvorsen Sep 9 '16 at 11:07