As I guess is standard in today's undergrad education, I've got to code a stats class with various statistical methods. I have them all under control except the one for standard deviation. We're supposed to use a specific formula, the one that take the square root of everything. I don't know how to put it in here like my teacher has it on her website, so hopefully this makes sense:
Sqrt [ (E (x - x) ^2) / n]
where E is the summation symbol, x is an array value, x is the mean and n is the number of values in the array.
I have tried to write this myself so don't think I'm wanting somebody out there to write the whole thing for me. I did however just get frustrated and deleted everything I had. So my code currently looks like this:
I have the mean method coded already, if that helps. I tried to bring it down and use it and it didn't work. Any help at all would be so appreciated!!
Sqrt [ (E (x - x) ^2) / n]
where E is the summation symbol, x is an array value, x is the mean and n is the number of values in the array.
I have tried to write this myself so don't think I'm wanting somebody out there to write the whole thing for me. I did however just get frustrated and deleted everything I had. So my code currently looks like this:
Code:
float StandardDeviation( int array[], int n) { }
Comment