【StdErrorArray2】
[code]inputs:IndepArray[XSize]( numericarray ),
DepArray[YSize]( numericarray ),
Size( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( 0 ),
var5( 0 ),
var6( 0 ),
var7( 0 ),
var8( 0 ) ;
StdErrorArray2 = 0 ;
if Size > 2 then
begin
var0 = AverageArray( IndepArray, Size ) ;
var1 = AverageArray( DepArray, Size ) ;
var4 = 0 ;
var5 = 0 ;
var6 = 0 ;
for var7 = 1 to Size
begin
var2 = IndepArray[var7] - var0 ;
var3 = DepArray[var7] - var1 ;
var4 = var4 + Square( var2 ) ;
var5 = var5 + Square( var3 ) ;
var6 = var6 + var2 * var3 ;
end ;
var8 = ( var5 - Square( var6 ) / var4 ) / ( Size - 2 ) ;
if var8 > 0 then
StdErrorArray2 = SquareRoot( var8 ) ;
end ;
[/code]
页:
[1]