Standard Deviation (SD) is a quantity expressing by how much the members of a group differ from the mean value for the group. Its formula is
#include <stdio.h>
#include <conio.h>
#include <stdlib.h> /*for DMA*/
#include <math.h>
void main()
{
int n,i;
float *x,sum=0,mean,add_deviation=0;
printf("Enter how many records are there?: ");
scanf("%d",&n);
x=(float*)calloc(n,sizeof(float));
if(x==NULL)
printf("Hey! Memory not allocated.");
printf("Enter data:\n");
for(i=0;i<n;i++)
{
scanf("%f",x+i);
sum+=*(x+i);
}
mean=sum/n;
printf("\nMean = %f\n",mean);
for(i=0;i<n;i++)
add_deviation+=(*(x+i)-mean)*(*(x+i)-mean);
printf("\nStandard Deviation (SD) = %f",sqrt(add_deviation/n));
add_deviation+=(*(x+i)-mean)*(*(x+i)-mean);
printf("\nStandard Deviation (SD) = %f",sqrt(add_deviation/n));
free(x);
getch();
}
OUTPUT:
This explanation is so clear and detailed — I really appreciate how you broke down the math behind the dart angle! It’s always great to see practical applications of formulas in real-world sewing. I’ve been exploring how similar logic applies in other areas, like finance, where I recently used a calculate HELOC interest-only payments to understand payment structures more clearly. It’s interesting how both sewing and numbers rely so much on precision and correct calculation. Thanks again for sharing such valuable insights!
ReplyDelete