/usr/share/openturns/validation/ValidHisto.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 | > restart:
> firstX:=-1.5;
> h:=[0.5,1.5,3.5,2.5];
> l:=[1.0,0.7,1.2,0.9];
> cl:=[seq(sum(l[i],i=1..j),j=1..4)];
> s:=[seq(h[i]*l[i],i=1..4)];
> surface:=sum(s[i],i=1..4);
> nh:=map(_x->_x/surface,h);
firstX := -1.5
h := [0.5, 1.5, 3.5, 2.5]
l := [1.0, 0.7, 1.2, 0.9]
cl := [1.0, 1.7, 2.9, 3.8]
s := [0.50, 1.05, 4.20, 2.25]
surface := 8.00
nh := [0.06250000000, 0.1875000000, 0.4375000000, 0.3125000000]
> nx:=[firstX,seq(cl[i]+firstX,i=1..4)];
> np:=[0,seq(sum(s[i],i=1..j)/surface,j=1..4)];
> nl:=[0,seq(cl[i],i=1..4)];
> mean:=sum(int(x*nh[i],x=firstX+nl[i]..firstX+nl[i+1]),i=1..4);
> var:=sum(int((x-mean)^2*nh[i],x=firstX+nl[i]..firstX+nl[i+1]),i=1..4);
nx := [-1.5, -0.5, 0.2, 1.4, 2.3]
np := [0, 0.06250000000, 0.1937500000, 0.7187500000, 1.000000000]
nl := [0, 1.0, 1.7, 2.9, 3.8]
mean := 0.8581250000
var := 0.7202048175
> q:=0.95;
> for i from 1 to 4 do
>
> Xq:=solve((xq-nx[i+1])/(q-np[i+1])=(nx[i]-nx[i+1])/(np[i]-np[i+1]),xq)
> ;
> if ((Xq>=nx[i]) and (Xq<nx[i+1])) then
> print(Xq);
> fi:
> od:
q := 0.95
2.140000000
>
>
|