I have two datasets:
dataset1 = {{3514147200, 5.83}, {3514233600, 7.48}, {3514320000, 7.86}, {3514406400, 6.74}}
dataset2 = {{2407708800, 131.3}, {2407795200, 131.7}, {2407881600, 130.9}, {2407968000, 131}}
By down sampling to get the datasets to be the same "length", I know that there is a correlation of approximately 0.95 between the two datasets.
I have created a very large polynomial from dataset2
to approximate dataset1
.
polynomial[x_] := -1.19937*10^11 - 16.2653 x - 9.10704*10^-10 x^2 + 4.74474*10^-19 x^3 + ...
When polynomial
and dataset1
are plotted together, I can see that the polynomial is close to the data. I am looking for a way to measure the "distance" between the dataset and the polynomial. I tried using KolmogorovSmirnovTest
but it wasn't much help, any ideas about how to do this?
Interpolation
) andNIntegrate
the square of their difference. $\endgroup$Fit
andNonlinearModelFit
? $\endgroup$