I'm drawing a blank on this.
I have two data sets:
d1 = [(x1,y1), (x2,y2)...]
d2 = [(x1,y1), (x2,y2)...]
I would like to get some type of statistical value, maybe something like an r-value, that tells me how well d2 fits to d1.
I'm drawing a blank on this.
I have two data sets:
d1 = [(x1,y1), (x2,y2)...]
d2 = [(x1,y1), (x2,y2)...]
I would like to get some type of statistical value, maybe something like an r-value, that tells me how well d2 fits to d1.
Copyright © 2021 Jogjafile Inc.
It dependents on what are those two vectors. you may want to be more specific.
If they are something like X-Y coordinates in Cartesian system, distance correlation is probably the most appropriate (http://en.wikipedia.org/wiki/Distance_correlation#Alternative_formulation:_Brownian_covariance).
If the
xvalues are the same andd1has the expectedyunder eachxvalues based on a certain model (i.e. a linear model) andd2has the observedyvalues, then Pearson's r may be a good choosescipy.stats.pearsonr(http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient).If both
d1andd2are relative frequency data (observedycount of events of valuex), then some type of goodness of fit test may be the right direction to go.scipy.stats.chisquare,scipy.stats.chi2_contingency,scipy.stats.ks_2samp, to name a few.