1+ @testitem " mean(::ClosedWilliamsProduct, p::Logpdf{Normal}, q::ExponentialFamilyDistribution{NormalMeanVariance})" begin
2+ include (" ef_utils.jl" )
3+ rng = StableRNG (123 )
4+ for _ in 1 : 10
5+ μ1, σ1 = rand (rng)* 10 , rand (rng)* 5
6+ μ2, σ2 = rand (rng)* 10 , rand (rng)* 5
7+ ef = convert (ExponentialFamilyDistribution, Normal (μ1, σ1))
8+ central_limit_theorem_test (ClosedWilliamsProduct (), Logpdf (Normal (μ2, σ2)), ef, score)
9+ end
10+ end
11+
12+ @testitem " mean(::ClosedWilliamsProduct, p::Abs, q::ExponentialFamilyDistribution{NormalMeanVariance})" begin
13+ include (" ef_utils.jl" )
14+ rng = StableRNG (123 )
15+ for _ in 1 : 10
16+ μ1, σ1 = rand (rng)* 10 , rand (rng)* 5
17+ ef = convert (ExponentialFamilyDistribution, Normal (μ1, σ1))
18+ central_limit_theorem_test (ClosedWilliamsProduct (), Abs (), ef, score)
19+ end
20+ end
21+
22+ @testitem " mean(::ClosedWilliamsProduct, p::Logpdf{Laplace}, q::ExponentialFamilyDistribution{NormalMeanVariance})" begin
23+ include (" ef_utils.jl" )
24+ rng = StableRNG (123 )
25+ for _ in 1 : 10
26+ μ1, σ1 = rand (rng)* 10 , rand (rng)* 5
27+ loc, θ = rand (rng)* 10 , rand (rng)* 10
28+ ef = convert (ExponentialFamilyDistribution, Normal (μ1, σ1))
29+ central_limit_theorem_test (ClosedWilliamsProduct (), Logpdf (Laplace (loc, θ)), ef, score)
30+ end
31+ end
0 commit comments