Chi-Square Test

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 36

THE CHI- SQUARE

STATISTICS TEST
Objectives
At the end of this presentation, everyone will have
the understanding about:
What is a Chi-square test?
What is the formula for the Chi- square test?
What are the different kinds of Chi- square tests?

When do we use the Chi- square test?

What are the advantages and disadvantages of the Chi- square


test?
WHAT IS A CHI-SQUARE TEST?
A Chi-square statistic test is a test that measures
how a model compares to actual observed data.
The data used in calculating a chi-square
statistic must be:
*random
*raw
*mutually exclusive
*drawn from independent variables
*drawn from a large enough sample
WHAT IS THE FORMULA FOR THE
CHI-SQUARE TEST?

where:
x² = Chi- square
c = degrees of freedom
O =observed value(s)
E = expected value(s)
WHAT ARE THE KINDS OF CHI- SQUARE
STATISTIC TESTS?

• The goodness of fit test


• The test of independence
• The test for homogeneity
THE GOODNESS
OF FIT TEST
• is used to test if sample data fits a distribution from a
certain population. It tells you if your sample data
represents the data you would expect to find in the
actual population.
• is used to fit one categorical variable to a distribution.
THE TEST OF
INDEPENDENCE
• is used to determine if there is a significant
relationship between two nominal
(categorical) variables or whether two
factors are independent or not.
THE TEST OF HOMOGENEITY
• it compares the proportions of responses from
two or more populations with regards to a
dichotomous variable or variable with more than
two outcome categories.
WHEN DO WE USE THE CHI-
SQUARE TEST?
A Chi- square test is used to compare
observed results with expected results. The
purpose of this test is to determine if a
difference between observed data and
expected data is due to chance, or due to a
relationship between the variables you are
studying.
WHAT ARE THE ADVANTAGES OF
THE CHI-SQUARE TEST?
The advantages of the Chi-square test includes:

• its robustness with respect to distribution of data


• its ease of computation
• the detailed information that can be derived from the test
• its use in studies for which parametric assumptions
cannot be met
• its flexibility in handling data from both two group and
multiple group studies
LIMITATIONS OF THE CHI-SQUARE TEST
Chi-square like any analysis has its limitations. One of the
limitations is that all participants measured must be
independent, meaning that an individual cannot fit in more than
one category. If a participant can fit into two categories a chi-
square analysis is not appropriate.
LET'S
TRY IT!
SAMPLE PROBLEM: The
Goodness Of Fit Test
A school principal would like to know which days of the week
students are more likely to be absent. The principal expects that
students will be absent equally during the 5- day school week. She
selects a random sample of 100 teachers asking them which day of
the week they had the highest number of student absences. (See
table.) Based on these results, do the days for the highest number of
absences occur with equal frequencies?
STEP 1: Determine the null hypothesis and the
alternative hypothesis.

Ho = There is an equal frequency on the days with the


highest number of absences

H1= There is unequal frequencies on the days with the


highest number of absences
STEP 2: Determine the degrees of freedom.

To calculate degrees of freedom, subtract the


number of relations from the number of
observations. For determining the degrees of
freedom for a sample mean or average, you need
to subtract 1 from the number of observations.
(From the given problem we have 5 minus 1 which gives
us degrees of freedom of 4.)
STEP 3: Determine the critical value using the
Chi-square distribution table.
STEP 4: Calculate for the Chi-square using the formula.

where:
x² = Chi- square
c = degrees of freedom
O =observed value(s)
E = expected value(s)
The chi- square formula gave us 6.3 as the answer.
Let us compare it then with the critical value which is
9.49. Since 6.3 is less than the critical value, we can
then say that the null hypothesis is not rejected. The
data shows that the highest number of absences
occur with equal frequencies.
SAMPLE PROBLEM: The Test of
Independence
The test of independence is a statistical
hypothesis used to determine whether two
categorical or nominal values are likely to be
related or not. You can use the test when you
have counts of values for two categorical
variables.
The table below shows the average number of hours students spend
studying for classes each day in a highschool. Is the average number of hours
dependent on the type of student? Use a 5% significance level.
Ho - The average number of hours
is independent of the type of student.

H1 - The average number of hours is dependent on


the type of student.
Calculate the degree of freedom.

df = (r-1) (c-1)
= (2-1) (3-1)
=(1) (2)
df= 2
Find the critical value using the chi square distribution
table.
Get the expected values using this formula:
Get the calculated chi square values.
OBSERVED RESULTS EXPECTED RESULTS
STUDENT 0-2 HRS 2-4 HRS 4-6 HRS TOTAL STUDENT 0-2 HRS 2-4 HRS 4-6 HRS TOTAL
Freshman 76 143 91 310 Freshman 110 124 76 310
Seniors 147 109 64 320 Seniors 113 128 79 320
TOTAL 223 252 155 630 TOTAL 223 252 155 630
Comparing our calculated chi square value to the critival
value we see that our chi square result is greater than the
critical value.

This means that the data falls under the rejection


region which rejects the null hypothesis.

The data suggests that we have a strong evidence that the


average number of hours is dependent on the type of
student studying.
TEST FOR HOMOGENEITY
The chi-square test of homogeneity tests to see
whether different columns (or rows) of data
in a table come from the same population or
not (i.e., whether the differences are consistent
with being explained by sampling error alone).
LINKS AND ONLINE SOURCES:

https://passel2.unl.edu/view/lesson/9beaa382bf7e/14

https://stattrek.com/chi-square-test/goodness-of-fit

https://www.youtube.com/watch?v=ervg_MRzzu4

https://www.youtube.com/watch?v=HKDqlYSLt68&t=16s

https://www.youtube.com/watch?v=y5nxiL6civU&t=357s
Thank
You!!!

You might also like