I have a data set which I obtained from experiment. I which to compare this with expected values obtained from $y=2^x$. Could this be done with the Chi-squared distrobtion:
$$\begin{array}{c|c|c} \text{x} & \text{Obtained y} & \text{Expected y} & \text{Diffrence} & \text{Chi-Term} \\ \hline \\1 & 1.01 & 1 & 0.99 & 0.49005 \\2 & 3.99 & 4 & 0.01 & 0.000025 \\3 & 8.86 & 9 & -0.86 & 0.09245 \\4 & 16.02 & 16 & -0.02 & 0.000025 \end{array}$$
The Chi-squared value = 0.58255. There are 4 values and 1 varible so $df = 3$. The critical value for p=0.05 is 7.82 and therefore statistically the data fits the theotical funciton $y=2^x$ well.
Is this correct procedure? If not how would I do something similar?