/usr/share/openturns/validation/Variance.txt is in openturns-validation 1.5-7build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | > restart:
> assume(sigma>0):
> p:=1/(sigma*sqrt(2*Pi))*exp(-(x-mu)^2/(2*sigma^2));
> F:=int(p,x=-infinity..t);
2
1/2 (x - mu)
2 exp(- ---------)
2
2 sigma~
p := 1/2 ---------------------
1/2
sigma~ Pi
1/2
2 (t - mu)
F := 1/2 + 1/2 erf(-------------)
2 sigma~
> m:=int(x*p,x=-infinity..infinity);
> v:=int((x-m)^2*p,x=-infinity..infinity);
> -int(2*(w-m)*subs(t=w,F),w=-infinity..m)+int(2*(w-m)*subs(t=w,1-F),w=m
> ..infinity);
> int(3*w^2*subs(t=m-w,F)-3*w^2*subs(t=w+m,1-F),w=0..infinity);
> V:=2*Int(t*(1-subs(t=u+m,G(t))+subs(t=m-u,G(t))),t=0..infinity);
m := mu
2
v := sigma~
2
sigma~
0
infinity
/
|
V := 2 | t (1 - G(u + mu) + G(mu - u)) dt
|
/
0
> restart:
> with(student):
> assume(alpha>0):
> II:=changevar(t=-alpha*log((1-v)/2),Int(2*t*(1-F(t-mu)+F(mu-t)),t=0..i
> nfinity),v);
>
1
/
| 2
II := | - 2 alpha~ ln(1/2 - v/2) (-1
|
/
-1
+ F(-alpha~ ln(1/2 - v/2) - mu)
- F(mu + alpha~ ln(1/2 - v/2)))/(-1 + v) dv
> subs(phi(t)=2*t*(1-F(t-mu)+F(mu-t)),II);
1
/
| phi(-alpha~ ln(1/2 - v/2)) alpha~
| - --------------------------------- dv
| -1 + v
/
-1
> int(sin(x)^2,x=0..2*Pi);
Pi
> plot(Pi/2*cosh(t)/(cosh(Pi*sinh(t))^2),t=2..3);
>
|