Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
public static double StandardDeviation(List<double> num)
{
double SumOfSqrs = 0;
double avg = num.Average();
for (int i = 0; i < num.Count; i++)
{
SumOfSqrs += Math.Pow(((double)num[i] - avg), 2);
}
double n = (double)num.Count;
if (n == 1)
{
return Math.Sqrt(SumOfSqrs);
}
else
{
return Math.Sqrt(SumOfSqrs / (n - 1));
}
}
If you are experiencing a similar issue, please ask a related question
Title | # Comments | Views | Activity |
---|---|---|---|
Wav problem | 4 | 25 | |
PrintingFoundIt(Almost!(Da |
1 | 26 | |
Please explain the parts of these 2 LINQ expressions | 3 | 29 | |
C# LINQ ForEach() question | 6 | 25 |
Join the community of 500,000 technology professionals and ask your questions.