Top 10 Programming Language to learn in 2023

Are you a programming enthusiast looking to stay ahead of the curve in 2023? With the ever-evolving tech landscape, keeping up with the Best Programming Language to learn can be a daunting task. Fear not, as we have compiled a list of the top 10 Programming Languages that you should consider learning in 2023. Python: This versatile language continues to dominate in 2023, with its ease of use, readability, and a vast library of modules. JavaScript: As web development grows increasingly popular, JavaScript remains a crucial player, with its ability to create dynamic and interactive web pages. Java: This language has stood the test of time and remains a popular choice for enterprise software development. C++: A staple in the gaming and systems development industries, C++ offers exceptional performance and memory management. Swift: Apple's preferred language for iOS app development, Swift continues to grow in popularity with its simplicity and reliability. R: As data science and machin...

C Program For Chi-Square Test | C Programming


Chi-Square Test

        Formalizes this notion of distribution fit
       Oi represents the number of observed data values in the i-th interval.
       pi is the probability of a data value falling in the i-th interval under the hypothesized distribution.
       So we would expect to observe Ei = npi, if we have n observations

C Program For Chi-Square Test
C Program For Chi-Square Test

So the chi-squared statistic is

  
C Program For Chi-Square Test

        So the hypotheses are
       H0: the random variable, X, conforms to the distributional assumption with parameters given by the parameter estimates.
       H1: 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",&arr[i]);

    }

    for(i=0;i<n;i++)

    {

        if(arr[i]<10)

            o[0]++;

        else if(arr[i]<20 && arr[i]>=10)

            o[1]++;

        else if(arr[i]<30 && arr[i]>=20)

            o[2]++;

        else if(arr[i]<40 && arr[i]>=30)

            o[3]++;

        else if(arr[i]<50 && arr[i]>=40)

            o[4]++;

        else if(arr[i]<60 && arr[i]>=50)

            o[5]++;

        else if(arr[i]<70 && arr[i]>=60)

            o[6]++;

        else if(arr[i]<80 && arr[i]>=70)

            o[7]++;

        else if(arr[i]<90 && arr[i]>=80)

            o[8]++;

        else

            o[9]++;

    }

    e=n/10;

    for(i=0;i<10;i++)

    {

        oo[i]=(o[i]-e)*(o[i]-e);

        ooo[i]=oo[i]/e;

        calc=calc+ooo[i];

    }

    if(calc<=z)

    printf("Null hypo accepted. The value are uniformly distributed.");

    else

    printf("Alt hypo accepted. The value are not uniformly distributed.");

    return 0;

}


Comments

Popular posts from this blog

Eliminating Epsilon transition (ε-Transitions) | Conversion of Epsilon-NFA to DFA | Conversion of Epsilon-NFA to NFA | Theory Of Computation (TOC)

C program to Find Cartesian Product of Two Sets | C programming

Top 10 Programming Language to learn in 2023