Return gaussian distributed random number.
Source position: math.pp line 722
function RandG( |
mean: Float; |
stddev: Float |
):Float; |
randg returns a random number which - when produced in large quantities - has a Gaussian distribution with mean mean and standarddeviation stddev.
None.
|
Return mean value of array. |
|
|
Return standard deviation of data. |
|
|
Return mean and standard deviation of array. |
Program Example40; { Program to demonstrate the randg function. } Uses Math; Var I : Integer; ExArray : Array[1..10000] of Float; Mean,stddev : Float; begin Randomize; for I:=low(ExArray) to high(ExArray) do ExArray[i]:=Randg(1,0.2); MeanAndStdDev(ExArray,Mean,StdDev); Writeln('Mean : ',Mean:8:4); Writeln('StdDev : ',StdDev:8:4); end.