How to find out if two datasets are close to each other? I have the following three datasets.
data_a=[0.21,0.24,0.36,0.56,0.67,0.72,0.74,0.83,0.84,0.87,0.91,0.94,0.97]
data_b=[0.13,0.21,0.27,0.34,0.36,0.45,0.49,0.65,0.66,0.90]
data_c=[0.14,0.18,0.19,0.33,0.45,0.47,0.55,0.75,0.78,0.82]

data_a is real data and the other two are the simulated ones. Here I am trying to check which one (data_b or data_c) is closest or closely resembles to data_a.
Currently I am doing it visually and with ks_2samp test (python).
Visually
I graphed the cdf of real data vs cdf of simulated data and try to see visually that which one is the closest.

Above is the cdf of data_a vs cdf of data_b

Above is the cdf of data_a vs cdf of data_c
So by visually seeing it one might can say that data_c is more closer to data_a then data_b but it is still not accurate.
Kolmogorov-Smirnov (KS) Test
Second method is the KS-test where I tested data_a with data_b as well as data_a with data_c.
&gt;&gt;&gt; stats.ks_2samp(data_a,data_b)
Ks_2sampResult(statistic=0.5923076923076923, pvalue=0.02134674813035231)
&gt;&gt;&gt; stats.ks_2samp(data_a,data_c)
Ks_2sampResult(statistic=0.4692307692307692, pvalue=0.11575018162481227)

From above we can see that statistic is lower in when we tested data_a with data_c so data_c should be closer data_a than data_b. I didn't consider the pvalue as it would not be appropriate to think of it as a hypotheses test and use the p-value obtained because the test is designed with the null hypothesis predetermined.
So my question here is that if I am doing this correctly and also is there any other better way to do it? Thank You
You could take an Information Theory approach by finding the lowest Kullback–Leibler divergence between the distributions. There is a KL divergence option within SciPy's entropy function.

&gt;&gt;&gt; from scipy.stats import entropy

&gt;&gt;&gt; p = [0.21,0.24,0.36,0.56,0.67,0.72,0.74,0.83,0.84,0.87] # Data removed to make equal sizes: [0.91,0.94,0.97]
&gt;&gt;&gt; q_1 = [0.13,0.21,0.27,0.34,0.36,0.45,0.49,0.65,0.66,0.90]
&gt;&gt;&gt; print(entropy(p, q_1)) 
0.019822015024454846

&gt;&gt;&gt; q_2 =[0.14,0.18,0.19,0.33,0.45,0.47,0.55,0.75,0.78,0.82]
&gt;&gt;&gt; print(entropy(p, q_2))
0.01737229446663193


The second simulated distribution is closer than the first simulated distribution to the real distribution.

If you are interested in inference, you could run many simulations and compute p-values. That process is a variation of permutation testing.