0

what is the formula to obtain the standard deviation ?

Hello,

 

I'm trying to find the standard deviation of a serie but don't know the formula. Some help ?

thank you 

2 replies

null
    • Sean
    • 4 yrs ago
    • Reported - view

    There's more than one way to do it. The first example uses the select command to access the records...

     

    let setCnt := cnt(select YourTable);
    let mean := sum((select YourTable).YourField) / setCnt;
    let variance := sum((select YourTable).pow(YourField - Mean, 2)) / setCnt;
    sqrt(variance)

     

    This next example copies the numbers to an array...

     

    let mySet := (select YourTable).YourField;
    let setCnt := cnt(mySet);
    let mean := sum(mySet) / setCnt;
    let variance := sum(for i in range(0, setCnt) do
    pow(item(mySet, i) - mean, 2)
    end) / setCnt;
    sqrt(variance)

     

    There is also an example in the Webinar EN 2020 team with the database name 089_Statistics. These links might be helpful...

     

    https://www.mathsisfun.com/data/standard-deviation-formulas.html

    https://ninox.com/en/manual/calculations/reference-of-functions-and-language

    • barpatrice
    • 4 yrs ago
    • Reported - view

    hello. Thank you very much for the answer. Have a nice day !