Posts

Showing posts with the label Simulation And Modeling

C Program For Chi-Square Test | C Programming

Image
Chi-Square Test •         Formalizes this notion of distribution fit –        O i represents the number of observed data values in the i -th interval. –        p i is the probability of a data value falling in the i -th interval under the hypothesized distribution. –        So we would expect to observe E i = np i , if we have n observations So the chi-squared statistic is     •         So the hypotheses are –        H 0 : the random variable, X , conforms to the distributional assumption with parameters given by the parameter estimates. –        H 1 : the random variable does not conform. C Program For Chi-Square Test #include<stdio.h> int main() {      int n,i,e,calc=0,z=16.9;      printf("Total number : ");      scanf("%d",&n);      int arr[n],o[10]={0,0,0,0,0,0,0,0,0,0},oo[10],ooo[10];      printf("Enter %d number : ",n);      for(i=0;i<n;i++)      {          scanf("%d",&a