|
DataMuseum.dkPresents historical artifacts from the history of: RegneCentralen GIER Computer |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RegneCentralen GIER Computer Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 3120 (0xc30) Description: Bits:30000671 Select(11) KS test (Lilliefors) 3 udg Types: 8-hole paper tape Notes: Gier Text
algol<begin _____integer n,i,j,k;real m,s,p,r,t,D; _______ ____procedure parameter(n,X,MEAN,STDEVIATION); _________value n; _____integer n;real array X;real MEAN,STDEVIATION; _______ ____ _____ ____begin _____integer i;real sum,squaresum; _______ ____sum:=0;squaresum:=0;for i:=1 step 1 until n do ___ ____ _____ __begin _____sum:=sum+X[i];squaresum:=squaresum+X[i]∧2; |end; ___MEAN:=sum/n;STDEVIATION:=sqrt((squaresum-sum∧2/n)/(n-1)); |end procedure parameter; ___procedure distrbfunc1(m,s,x,PROBABILITY); _________value m,s,x; _____real m,s,x,PROBABILITY; ____begin _____real A; ____real procedure psi(y); ____ _________value y;real y; _____ ____begin _____real a;a:=1/sqrt(2); ____psi:=1-1/(1+0.07052308⨯a⨯y+0.04228201⨯(a⨯y)∧2+0.00927053⨯(a⨯y)∧3 | |+0.00015201⨯(a⨯y)∧4+0.00027657⨯(a⨯y)∧5+0.00004306⨯(a⨯y)∧6)∧16; | | | |end real procedure psi; ___A:=(x-m)/s;if A<0 then PROBABILITY:=0.5-0.5⨯psi(-A) else __ ____ ____PROBABILITY:=0.5+0.5⨯psi(A);end procedure distrbfunc1; ___select(11);writecr; k:=0;nextdatagroup: for n:=read integer while n|0 do ___ _____ = __begin _____real array X[1:n];k:=k+1;p:=0;m:=0;s:=0;D:=0;t:=0; ____ _____writetext(|< sample number:|);write(|ddd|,k);writecr; < > < >writetext(|< N =|);write(|ddd|,n);writecr; < > < >for i:=1 step 1 until n do ___ ____ _____ __begin _____X[i]:=read real;if X[i]=0 then __ ____begin _____writetext(|< too few elements in the datagroup.|); < >writecr;writecr;writecr;go to nextdatagroup; __ __end; ___end; ___i:=0;for r:=read real while r|0 do ___ _____ = __i:=i+1;if i|0 then __ = ____begin _____write(|ddd|,i); < >writetext(|< elements too many in the datagroup.|); < >writecr;writecr;writecr;go to nextdatagroup; __ __end; ___for i:=n-1 step -1 until 1 do ___ ____ _____ __for j:=1 step 1 until i do ___ ____ _____ __if X[j]>X[j+1] then __ ____begin _____r:=X[j];X[j]:=X[j+1];X[j+1]:=r;end;comment the elements of X have been ordered; ___ _______parameter(n,X,m,s);distrbfunc1(m,s,X[1],p); D:=p;i:=0; alfa: i:=i+1;if i+1<n∧X[i]=X[i+1] then go to alfa; __ ____ __ __if i+1=n∧X[i]=X[i+1] then go to beta; __ ____ __ __j:=p;distrbfunc1(m,s,X[i+1],p);if abs(p-i/n)_abs(j-i/n) then __ > ____t:=abs(p-i/n) else t:=abs(j-i/n); ____if D<t then D:=t; __ ____if i+1<n then go to alfa; __ ____ __ __beta: if D<abs(p-1) then D:=abs(p-1); __ ____writetext(|< observed value of DN:|); < >write(|ddd.dddd|,D);writecr; < >writetext(|< level of significance:|);writecr; < >writetext(|< mean value:|); < >write(|ddd.ddddd|,m);writecr; < >writetext(|< standard deviation:|); < >write(|ddd.ddddd|,s);writecr;writecr;writecr; < >end ___end;t< ___