As seen in the picture below, if I press the "Process" button, it will display the standard deviation results of the data.

How do I write the code?
Thanks before.

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
NarayanPosted Aug 16, 2011, 11:08 PM
public double CalCulateStdDev(List
{
if (lst == null || lst.Count == 0)
throw new ArgumentException("Collection does not have anything to calculate");
double d = 0;
double average = lst.Average();
d = Math.Sqrt(lst.Select(a => Math.Pow(a - average, 2)).Sum() / lst.Count);
return d;
}