I didn't take statistics yet, but, anyway, how would you calculate the standard deviation of 10, 33, and 50 using C language?
This is a discussion on Anyone here good with math? within the C Programming forums, part of the General Programming Boards category; I didn't take statistics yet, but, anyway, how would you calculate the standard deviation of 10, 33, and 50 using ...
I didn't take statistics yet, but, anyway, how would you calculate the standard deviation of 10, 33, and 50 using C language?
all you have to do is use the same formula(s) as the math gives you. You probably don't need to do anything special. You should look in an encyclopedia, a library, or just on the internet for how to do a standard deviation. That isn't really a programming question anyway.
Im pretty sure I got the equation for S.D right. You may want to verify.Code:int scores[100],amount; //null terminated, max 99 scores long int total=0; double average,answer; long double numerator=0; //input //... //assuming scores[] is still null terminated for(amount=0;scores[amount];amount++) total+=str[amount]; //amount has number of scores average=total/amount; for(int i=0;scores[i];i++) numerator+=((scores[i]-average)*(scores[i]-average)); answer=sqrt(numerator/average);
I AM WINNER!!!1!111oneoneomne