If X and Y are two independent random variables with probability density functions f and g, respectively, then the probability density of the difference Y − X is given by the cross-correlation . In contrast, the convolution f * g gives the probability density function of the sum X + Y.
what i would like to have is the probability density functions of abs(y-x) or (y-x)^2. Is that possible ?
I would like to do the same as below but using PDF instead of Histogram
for (bin b1 in Histogram1)
for (bin b2: Histogram2)
prob = b1.probability * b2.probability
distance += prob * abs(b1.value - b2.value)