Open timueh opened 5 years ago
Interesting: If I use ApproxFun.sample
in Julia, it works. So there is some bug in the Matlab implementation I suppose?
julia> using SpecialFunctions, ApproxFun
julia> α, β = 2., 2.
(2.0, 2.0)
julia> f = Fun(t->t^(α-1)*(1-t)^(β-1)/beta(α,β), 0..1)
Fun(Chebyshev(0..1),[0.75, 6.08434e-17, -0.75])
julia> s = ApproxFun.sample(f,10000);
julia> mean(s), var(s)
(0.4985766951022462, 0.050219874600315156)
Is there a standalone Julia implementation of your inverse CDF sampling that does not depend on types from ApproxFun
such as Fun
or Chebyshev
?
Is there a standalone Julia implementation
No. @ajt60gaibb will have to jump in here as I don't have a working version of Matlab.
Any idea @ajt60gaibb?
I'm sorry to bother you again, but is there any advice you can give @ajt60gaibb?
Thanks :)
Hey there,
I drew samples for the beta distribution and noticed that the variance is off. It seems to be a structural issue. Any ideas?
The analytical values for the mean and variance are
thanks!