In order to test such a vague hypothesis, you need to average out over all densities with finite variance, and all densities with infinite variance. This is likely to be impossible, you basically need to be more specific. One more specific version of this and have two hypothesis for a sample D≡Y1,Y2,…,YN:
- H0:Yi∼Normal(μ,σ)
- HA:Yi∼Cauchy(ν,τ)
One hypothesis has finite variance, one has infinite variance. Just calculate the odds:
P(H0|D,I)P(HA|D,I)=P(H0|I)P(HA|I)∫P(D,μ,σ|H0,I)dμdσ∫P(D,ν,τ|HA,I)dνdτ
Where P(H0|I)P(HA|I) is the prior odds (usually 1)
P(D,μ,σ|H0,I)=P(μ,σ|H0,I)P(D|μ,σ,H0,I)
And
P(D,ν,τ|HA,I)=P(ν,τ|HA,I)P(D|ν,τ,HA,I)
Now you normally wouldn't be able to use improper priors here, but because both densities are of the "location-scale" type, if you specify the standard non-informative prior with the same range L1<μ,τ<U1 and L2<σ,τ<U2, then we get for the numerator integral:
(2π)−N2(U1−L1)log(U2L2)∫U2L2σ−(N+1)∫U1L1exp⎛⎝⎜−N[s2−(Y¯¯¯¯−μ)2]2σ2⎞⎠⎟dμdσ
Where s2=N−1∑Ni=1(Yi−Y¯¯¯¯)2 and Y¯¯¯¯=N−1∑Ni=1Yi. And for the denominator integral:
π−N(U1−L1)log(U2L2)∫U2L2τ−(N+1)∫U1L1∏i=1N(1+[Yi−ντ]2)−1dνdτ
And now taking the ratio we find that the important parts of the normalising constants cancel and we get:
P(D|H0,I)P(D|HA,I)=(π2)N2∫U2L2σ−(N+1)∫U1L1exp(−N[s2−(Y¯¯¯¯−μ)2]2σ2)dμdσ∫U2L2τ−(N+1)∫U1L1∏Ni=1(1+[Yi−ντ]2)−1dνdτ
And all integrals are still proper in the limit so we can get:
P(D|H0,I)P(D|HA,I)=(2π)−N2∫∞0σ−(N+1)∫∞−∞exp(−N[s2−(Y¯¯¯¯−μ)2]2σ2)dμdσ∫∞0τ−(N+1)∫∞−∞∏Ni=1(1+[Yi−ντ]2)−1dνdτ
The denominator integral cannot be analytically computed, but the numerator can, and we get for the numerator:
∫∞0σ−(N+1)∫∞−∞exp⎛⎝⎜−N[s2−(Y¯¯¯¯−μ)2]2σ2⎞⎠⎟dμdσ=2Nπ−−−−√∫∞0σ−Nexp(−Ns22σ2)dσ
Now make change of variables λ=σ−2⟹dσ=−12λ−32dλ and you get a gamma integral:
−2Nπ−−−−√∫0∞λN−12−1exp(−λNs22)dλ=2Nπ−−−−√(2Ns2)N−12Γ(N−12)
And we get as a final analytic form for the odds for numerical work:
P(H0|D,I)P(HA|D,I)=P(H0|I)P(HA|I)×πN+12N−N2s−(N−1)Γ(N−12)∫∞0τ−(N+1)∫∞−∞∏Ni=1(1+[Yi−ντ]2)−1dνdτ
So this can be thought of as a specific test of finite versus infinite variance. We could also do a T distribution into this framework to get another test (test the hypothesis that the degrees of freedom is greater than 2).