[Overview][Constants][Types][Classes][Procedures and functions] | Reference for unit 'math' (#rtl) |
Return total varians of values
Source position: line 0
function totalvariance( |
const data: array of Extended |
):float; |
const data: PExtended; |
const N: Integer |
):float; |
TotalVariance returns the total variance of the values in the data array. It returns zero if there is only one value.
The second form of the function accepts a pointer to an array of N values.
None.
|
Return variance of values |
|
|
Return standard deviation of data |
|
|
Return mean value of array |
Program Example49; { Program to demonstrate the TotalVariance function. } Uses math; Type TExArray = Array[1..100] of Float; Var I : Integer; ExArray : TExArray; TV : float; begin Randomize; for I:=1 to 100 do ExArray[i]:=(Random-Random)*100; TV:=TotalVariance(ExArray); Writeln('Total variance : ',TV:8:4); TV:=TotalVariance(@ExArray[1],100); Writeln('Total Variance (b) : ',TV:8:4); end.
No notes exist for this page yet.