How to Calculate Standard Deviation
How to Calculate Standard Deviation
First, view my test application here:
https://creator.zoho.com/niskypto/stdev
This calculates standard deviation in the same way Excel does. Specifically using n-1 degrees of freedom, which is preferred.
I also added a
95% CI check
for any value entered.
The function makes use of Creator's new aggregate record commands
float calcstdev()
{
n = DATA_ENTRY.count();
average = DATA_ENTRY.avg(Enter_a_Number);
residuals = (0.1 - 0.1);
for each x in DATA_ENTRY
{
residuals = ((x.Enter_a_Number - average).power(2) + residuals);
}
Stdev = (residuals / (n - 1)).sqrt().round(3);
return Stdev;
}
n = counts the number of entries
average is average
residuals starts off as zero, but has to be a decimal (long) data-type. Creator does not have a way to specify the necessary datatype without explicitly giving the variable a value. So that's why I had to use the 0.1 - 0.1 workaround.
Stdev is the standard deviation (or
σ
)
Hope you find this of value.
John M. Whitney