0
$\begingroup$

I have a data set which I obtained from experiment e.g.

$$\begin{array}{c|c|c} \text{x} & \text{y} \\ \hline \\1 & 1.01 \\2 & 3.99 \\3 & 8.86 \\4 & 16.02 \end{array}$$

etc. I would like to statistically test if this experimental data fits with a theoretical function including random fluctuation

e.g. $y=2^x$

How would I go about doing this?

$\endgroup$
4
  • $\begingroup$ I think $y=2^x$ might be a better model? $\endgroup$
    – copper.hat
    Commented Jan 29, 2013 at 21:29
  • $\begingroup$ @copper.hat: no not really; see $x=3$. $\endgroup$
    – Ron Gordon
    Commented Jan 29, 2013 at 21:34
  • $\begingroup$ @rlgordonma: You are right... $\endgroup$
    – copper.hat
    Commented Jan 29, 2013 at 22:14
  • $\begingroup$ $y=x^2$ is a far better fit $\endgroup$ Commented Jan 29, 2013 at 22:53

2 Answers 2

0
$\begingroup$

If you can assess your experimental errors and model them as a normal distribution with standard deviation $\sigma$ (a dangerous assumption), you can use the chi-squared test. For each data point $(x_i,y_i)$ you calculate the $y_{mi}$ the model predicts. Then sum up $\frac {(y_i-y_{mi})^2}{\sigma^2}$. You expect it to be about the number of data points less the number of parameters in your fit.

Comparing your data to fits $x^2$ and $2^x$ gives

$$\begin{array}{c|c|c} \text{x} & \text{y} & \text {2^x} & \text {2^x error}&\text {x^2}&\text {x^2 error}\\ \hline \\1 & 1.01 &2 &0.99 & 1 & 0.01 \\2 & 3.99 &4 & -0.01 & 4 & -0.01 \\3 & 8.86 &8 & -0.86 & 9 & 0.14 \\4 & 16.02 &16 & 0.02 & 16 & 0.02 \end{array}$$

If we think our experimental error is $\pm 0.1$, the $\chi^2$ of $x^2$ is $\frac {0.01^2+(-0.01)^2+0.14^2+0.02^2}{0.1^2}=\frac {0.0202}{0.01}=2.02$

$\endgroup$
0
$\begingroup$

You can compute the mean squared error: $$ \sqrt{\frac{\sum_{k=1}^n (y_k - 2^x_k)^2}{n}} $$ this gives a measure of the distance of the points from the curve $y=x^{2}$

$\endgroup$
3
  • $\begingroup$ But how would you use the mean squared error to show that the data fits with a 5% significance or something like that? $\endgroup$
    – joshlk
    Commented Jan 29, 2013 at 21:47
  • $\begingroup$ You cannot, if you don't fix which is the expected variance of your variable. $\endgroup$ Commented Jan 29, 2013 at 21:52
  • $\begingroup$ Do you mean I need to specify if my error is Gaussian or not? $\endgroup$
    – joshlk
    Commented Jan 29, 2013 at 21:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .