Assume there are two 1D Numpy array samples with the same length, X1 and X2. After converting each of the two samples separately into accumulative density distribution, how to calculate the largest distance between the two cumulative sample distributions? After the code below, what should I do?
import numpy as np
def function(X1, X2):
x1 = np.sort(X1)
y1 = np.arange(1, len(x1)+1) / float(len(x1))
x2 = np.sort(X2)
y2 = np.arange(1, len(x2)+1) / float(len(x2))