DEV Community

Cover image for "Day 41 of My Learning Journey: Setting Sail into Data Excellence! Today's Focus: Mathematics for Data Analysis (Stats Day -20)
Nitin-bhatt46
Nitin-bhatt46

Posted on

1

"Day 41 of My Learning Journey: Setting Sail into Data Excellence! Today's Focus: Mathematics for Data Analysis (Stats Day -20)

STATISTICS FOR DATA ANALYTICS - 19

CHI SQUARE TEST

A Chi-Square test is a statistical test used to determine if there is a statistically significant difference between expected frequencies and observed frequencies in one or more categories.

Purpose of this test is to determine if a difference between observed data and expected data is due to chance, or if it is due to actual relationship between the variables.

Type of Chi-Square test

Independence test
Goodness of fit.

Chi-Square test
This is used to determine if there is a significant relationship between two categorical variables from a single population.

Independence test

They need to estimate whether two random variables are independent.

Goodness of fit.

THIS TEST IS USED TO DETERMINE WHETHER A VARIABLE IS LIKELY TO COME FROM A SPECIFIED DISTRIBUTION OR NOT.

It is often used to evaluate whether sample data is representative of the full population.

They need to estimate how closely an observed matches and expected distribution. This is referred to as a “ goddess-of-fit” test.

THE CHI SQUARE TEST FOR GOODNESS OF FIT TEST CLAIMS ABOUT POPULATION PROPORTIONS { CATEGORICAL VARIABLES }

IT IS A NON PARAMETRIC TEST THAT IS PERFORMED ON CATEGORICAL [ ORDINAL, NOMINAL ] DATA.

Theory data ( theory categorical distribution ).

Sample data. ( observed categorical distribution ).

With these two data we use Goodness of fit.

How do we use data ?

Step 1 ➖

Taking
Expected data.
Observed data.

Sum of ( excepted data ) must be equal to observed data.

Step 2 ➖

We get chi square test value and p value.
We have to find a critical point by entering a significant value.

Step 3 ➖

Checking

Chi square test value < critical value — reject the null hypothesis.

Chi square test value > critical value — Fail to reject the null hypothesis.

Goodness of fit test :-
In a student class of 100 students, 30 are right handed. Does this class fit the theory that 12% of people are right handed?

It also uses a degree of freedom.

Feel free to share this post to enhance awareness and understanding of these fundamental concepts in statistical analysis!

🙏 Thank you all for your time and support! 🙏
Don't forget to catch me daily at 6:30 Pm (Monday to Friday)for the latest updates on my programming journey! Let's continue to learn, grow, and inspire together! 💻✨

API Trace View

How I Cut 22.3 Seconds Off an API Call with Sentry

Struggling with slow API calls? Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay