As given in this question, the convolution of a uniform and Gaussian distribution gives
(∗)p(t)=1(b−a)√2πσ2∫b+μa+μexp{−(τ−t)22σ2}dτ
which gives (I believe)
(∗∗)p(t)=12(b−a)(erf(b+μ−tσ√2)−erf(a+μ−tσ√2))
For simplicity's sake, let's set μ=0. I'm interested in integrating (hopefully indefinite, but possibly definite) the product of two of these distributions, with different initial uniforms given by {a,b} and {c,d}, and different noise levels, given by σ1 and σ2, over the same domain, D. So
(∗∗∗)∫t∈D14(b−a)(d−c)(erf(b−tσ1√2)−erf(a−tσ1√2))(erf(d−tσ2√2)−erf(c−tσ2√2))dt
is this solvable when D=R, or is there even an exact antiderivative.
It's a little tricky since when multiplying it out and breaking it into parts, each one of the parts is a product of error functions and not integrable.
P.S. The motivation for this is a notion of a "soft overlap" between intervals/products of intervals. To see this, if the normalization of the uniform is taken away so that the uniform PDF becomes the indicator function of an interval, then this exact integral when evaluated with σ1=σ2=0 so that the Gaussian becomes a Dirac delta, should give the area of the overlap of the two intervals.
P.P.S. If this interval is indeed intractable, are their other noise models / CDFs besides Gaussian for which a similar integral can be evaluated?
EDIT: Possible Solution:
I have also put up a possible solution up as an answer and will select it unless someone points out an error.
Answer
I think this is a possible solution.
For the case where we want to integrate over all of R (and probably for other cases, but this is simplest), it looks like we can solve the integral by going back to the initial representation of the convolution of a uniform and a Gaussian, taking the product there, and exchanging orders of integration.
That is, solve
1(b−a)(d−c)2πσ1σ2∫dc∫ba∫∞−∞exp{−(τ−t)22σ21}exp{−(ρ−t)22σ22}dtdτdρ
The innermost integral is just a cross-correlation (or convolution with one of the means negated) of two Gaussians, with solution
12πσ1σ2∫∞−∞exp{−(τ−t)22σ21}exp{−(ρ−t)22σ22}dt=1√2π(σ21+σ22)exp(−(τ−ρ)22(σ21+σ22))
So now we should be able to integrate this Gaussian function twice to get the desired quantity. The antiderivative of erf is zerf(z)+exp(−z2)/√π+C, which will be needed on the final integration.
However, this looks like a pain, but Mathematica gives the solution to
∫ba∫dcexp(−(τ−ρ)22(σ21+σ22))dρdτ
as
√π2√σ21+σ22(√2π√σ21+σ22(e−(b−c)22(σ21+σ22)−e−(a−c)22(σ21+σ22))+√2π√σ21+σ22(e−(a−d)22(σ21+σ22)−e−(b−d)22(σ21+σ22))+(a−c)erf(c−a√2√σ21+σ22)+(d−a)erf(d−a√2√σ21+σ22)−(b−c)erf(c−b√2√σ21+σ22)+(b−d)erf(d−b√2√σ21+σ22))
so I believe the final answer should be:
12(b−a)(d−c)(√2π√σ21+σ22(e−(b−c)22(σ21+σ22)−e−(a−c)22(σ21+σ22))+√2π√σ21+σ22(e−(a−d)22(σ21+σ22)−e−(b−d)22(σ21+σ22))+(a−c)erf(c−a√2√σ21+σ22)+(d−a)erf(d−a√2√σ21+σ22)−(b−c)erf(c−b√2√σ21+σ22)+(b−d)erf(d−b√2√σ21+σ22))
No comments:
Post a Comment