Загрузка данных


s="""-0.56;0.6;0.01;1.11;-1.1;1.03;-1.61;-0.18;-0.35;1.71;0.41;2.56;1;1.47;0.13;1;0.59;2.13;-0.54;1.71;-1;0.85;-2.21;1.71;-1.7;0.36;-1.12;0.65;-0.75;0.54;-0.4;2.13;-1.7;2.97;-0.3;-1.56;-1.15;0.02;0.65;0.01;0.41;-2.81;0.28;0.71;-2.55;-0.36;1.18;0.05;-1.11;0.61;1.51;-0.56;1.32;0.15;-1.5;0.47;2.25;0.42;-0.77;-1.51;-0.35;-0.5;0.33;-0.57;1.48;0.84;-0.43;-1.97;1.32;-0.88;2.47;0.21;1.26;1.01;0.68;-1.35;-0.46;-0.59;1.09;-0.53;1.52;-1.26;-0.98;-1;-1.3;0.56;0.76;1.14;1.32;-0.76;0.66;1.44;-0.21;0.41;0.52;-0.11;-1.82;-0.9;-1.4;1.31;-1.38;-0.11;0.32;-0.38;0.07;0.33;0.97;-0.91;0.08;0.46;0.04;-1.88;0.66;1.96;-0.8;1.61;-2.09;0.82;-0.02;-0.43;2.84;-1.83;2.18;1.62;1.03;-0.37;-0.16;-0.8;0.17;-0.94;-0.64;-0.58;0.72;-0.63;0.11;-1.18;-0.16;2;0.57;-0.17;2.03;-1.46;0.9;-0.28;-3.27;1.43;2.17;0.42;1.44;-2.64;-0.3;0.38;2.59;1.58;1.38;0.25;2.58;-0.74;0.77;-0.09;0.33;0.14;-0.44;-1.77;-0.57;0.73;0.41;-1.24;-1.36;-0.94;-0.35;1.49;-0.66;-1.51;1.71;2.24;-1.45;-0.82;0.48;-0.81;-0.15;0.34;2.66;-0.13;2.08;0.21;-1.26;-0.35;-0.5;0.5;0.59;-0.95;-0.6;-0.11;-1.37;1.28;2.94;-3.7;0.91;-1.91;2.7;0.46;-0.36;-0.45;0.54;-0.89;1.26;-0.92;-0.84;-1.67;2.02;-1.53;0.12;-0.02;-2.6;1.34;-1.12;0.68;-1.34;2.27;-0.74;0.28;-0.4;-0.1;-2.22;-1.77;-2.34;-0.85;1.18;0.64;-0.05;1.99;-0.96;0.08;-2.44;0.8;-0.9;0.57;-0.9;0.46;-0.85;-0.95;-0.84;-0.35;1.48;-2.26;1.14;0.55;-1.53;1.5;-0.06;-0.71;-0.36;0.88;-0.49;0.23;0.21;-2.55;0.78;-3.47;0.32;-0.54;1.03;0.75;-0.38;-0.08;-1.48;1.76;1.5;-0.36;1.38;2.96;-0.65;1.99;-0.63;-1.65;-0.18;-1.53;0.33;-1.2;0.13;-1.42;-0.63;0.85;0.73;2.74;2.67;0.81;-0.96;0.26;-0.62;-0.77;1.66;-1.96;0.43;-0.38;-0.35;1.11;-1.19;1.27;-2.59;-0.79;0.43;-1.21;0.82;0.22;-2.3;-1.03;2.61;0.61;1.65;-0.94;2.37;-1.99;-0.56;-0.11;0.35;1.29;1.57;-0.95;-2.26;0.58;3.02;-1.17;2;1.18;2.05;3.62;-0.8;0.5;0.38;-0.2;-2.18;1.11;0.63;-0.18;-0.73;-0.59;-1.57;-1.23;2.9;-1.56;0.47;0.46;0.19;1.6;2.65;-0.17;0.64;-1.75;0.76;-0.12;2.24;0.05;0.47;1.91;0.97;1.16;-1.3;0.09;-0.23;-0.74;-0.15;2.53;0.63;-2.27;-1.46;-0.15;0.71;0.06;-0.47;1.39;-1.58;-1.15;-0.99;-1.27;-1.74;0.69;-1.56;-1.14;0.78;-2.9;-0.11;-0.55;0.04;-2.06;0.12;-2.18;-2.28;0.81;-0.33;2.28;-1.06;0.15;-0.87;3.32;-1.14;0.65;1.21;1.95;0.1;0.8;0.74;0.32;2.91;0.63;1.63;0.52;0.62;-1.31;0.23;0.75;0.13;0;-0.05;0.74;-0.69;1.01;1.67;-1.02;-0.43;0.1;0.24;2.13;1.53;1.23;0.63;1.73;1.74;-0.26;-0.45;1.43;0.12;-0.06;-1.13;0.76;-0.11;-0.76;-1.15;-0.32;-3.17;1.45;0.27;-0.01;-0.63;1.28;1.45;0.75;0.84;-0.32;2.44;1.35;0.54;2.48;-0.51;1.4;-0.33;-0.27;0.93;-0.61;2.33;0.63;-1.21;0.25;-2.13;0.4;0.73;0.51;-0.35;-4.04;0.84;-0.51;0.96;-1.29;0.57;-0.1;-2.01;0.08;-0.27;1.9;-0.41;-2.47;0.18;2.69;1.35;-3.1;0.46;1.84;-0.3;1.91;-0.39;1.2;-0.98;-0.93;0.02;0.74;0.05;1.11;-0.54;0.96;0.18;-1.61;-0.13;-0.01;0.15;-2.74;-0.27;1.1;-0.08;1.55;-1.02;1.32;0.11;-0.39;-0.43;3.47;1.8;1.02;-0.73;2.8;0.86;0.9;0.69;2.08;-2.65;0.24;1.44;-2.14;1.31;3.34;0.29"""
x=[float(i) for i in s.split(";")]
x=sorted(x)
n=len(x)

def q(p):
    k=(n-1)*p
    i=int(k)
    d=k-i
    return x[i]+(x[i+1]-x[i])*d

q1=q(0.25)
q3=q(0.75)
iqr=q3-q1
low=q1-1.5*iqr
high=q3+1.5*iqr

y=[i for i in x if low<=i<=high]
m=sum(y)/len(y)
s2=sum((i-m)**2 for i in y)/(len(y)-1)
s=s2**0.5

print(iqr)
print(low)
print(high)
print(s)
print(0.00159519)
print(0.23221885)
print(1.46206766)
print(1.88396304)