0% found this document useful (0 votes)
9 views

Chi Square Test

chi square test ppt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Chi Square Test

chi square test ppt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

GROUP 3

CHI SQUARE
TEST
BALLENAS, ODANGO, PAGAL, GARCESA, VERGARA
CHI
CHI SQUARE
SQUARE
The chi-square test is a statistical
test used to determine if there is a
significant association between two
categorical variables. It is commonly
used to analyze the distribution of
categorical data and to test the
independence of two variables.
The Chi Square Test is used for testing the hypothesis and is not
useful for estimation.

In general, the test we use to measure the differences between


what is observed and what is expected according to an assumed
hypothesis is called the chi-square test.
FORMUL
A

X² = Chi Squared
Where: Oi = Observed Value
Ei = Expected Value
CHI-SQUARE P-
VALUES
Here P denotes the probability; hence for the calculation of p-values, the Chi-Square test
comes into the picture. The different p-values indicate different types of hypothesis
interpretations.

P< = 0.05 (Hypothesis interpretations are rejected)


P> = 0.05 (Hypothesis interpretations are accepted)

The concepts of probability and statistics are entangled with Chi-Square Test. Probability
is the possibility of an event or outcome of the sample. Probability can understandably
represent bulky or complicated data.
HOW TO PERFORM A
CHI-SQUARE TEST
These are the basic steps on whether you are performing a goodness of fit test or a test of
independence:

• Create a table of the observed and expected frequencies.


• Use the formula to calculate the chi-square value.
• Find the critical chi-square value using a chi-square value table or statistical software.
• Determine whether the chi-square value or the critical value is the larger of the two.
• Reject or accept the null hypothesis.
WHEN TO USE THE
CHI-SQUARE TEST
A chi-square test may be an appropriate option for your data if all of the following are true:

• You want to test a hypothesis about one or more categorical variables. If one or more of your
variables is quantitative, you should use a different statistical test. Alternatively, you could
convert the quantitative variable into a categorical variable by separating the observations
into intervals.
• The sample was randomly selected from the population.
• There are a minimum of five observations expected in each group or combination of groups.
TWO TYPES
OF CHI
SQUARE TEST
Chi-Square Goodness of Fit Test Chi-Square Test of Independence

Number of variables One Two

Decide if one variable is likely to come Decide if two variables might be


Purpose of test
from a given distribution or not related or not

Decide if movie goers' decision


Decide if bags of candy have the same
Example to buy snacks is related to the
number of pieces of each flavor or not
type of movie they plan to watch
Ho: proportion of flavors Ho: proportion of people who buy snacks is
Hypotheses in of candy are the same independent of the movie type
example Ha: proportions of Ha: proportion of people who buy snacks is different
flavors are not the same for different types of movies

Theoretical
distribution used in Chi-Square Chi-Square
test

Number of categories for first variable minus 1,


Number of categories
multiplied by number of categories for second variable
minus 1. In our example,
Degrees of freedom minus 1In our example, number of movie categories
number of flavors of
minus 1, multiplied by 1 (because snack purchase is a
candy minus 1.
Yes/No variable and 2-1 = 1)
CHI-SQUARE
CHI-SQUARETEST FOR
TEST
GOODNESS OF FIT
FOR GOODNESS
OF FIT
• compares the expected and
observed values to determine
• a statistical hypothesis test used
to determine whether a variable
how well an experimenter's is likely to come from a
predictions fit the data. specified distribution or not.
EXAMPLE: HYPOTHESES
FOR CHI-SQUARE
GOODNESS OF FIT TEST
EXPECTATION OF EQUAL PROPORTIONS
Null hypothesis (H0): The bird species visit the bird feeder in equal proportions.
Alternative hypothesis (HA): The bird species visit the bird feeder in different proportions.

EXPECTATION OF DIFFERENT PROPORTIONS


Null hypothesis (H0): The bird species visit the bird feeder in the same proportions as the average over
the past five years.
Alternative hypothesis (HA): The bird species visit the bird feeder in different proportions from the
average over the past five years.
CHI-SQUARE
CHI-SQUARETEST
TESTOF
INDEPENDENCE
OF
INDEPENDENCE
• used when you have two • is a derivable or inferential
categorical variables, and you want statistical test which examines
to determine whether they are whether the two sets of variables
independent of each other. are likely to be related with each
other or not.
EXAMPLE: CHI-
SQUARE TEST OF
INDEPENDENCE
Null hypothesis (H0): The proportion of people who are left-handed is the
same for Americans and Canadians.

Alternative hypothesis (HA): The proportion of people who are left-


handed differs between nationalities.
EXAMPL
Let's say you want to know if gender has anything to do with political party preference. You poll
E
440 voters in a simple random sample to find out which political party they prefer. The results of
the survey are shown in the table below:

STEP 1: DEFINE THE HYPOTHESIS


H0: There is no link between gender and political party preference.
H1: There is a link between gender and political party preference.
STEP 2: CALCULATE THE EXPECTED VALUES
Now you will calculate the expected frequency.

For example, the expected value for Male


Republicans is:

Similarly, you can calculate the expected value for each of the cell:
STEP 3: CALCULATE (O-E)2 / E FOR EACH CELL IN THE TABLE
Now you will calculate the (O - E)2 / E for each cell in the table.

Where:
O = Observed Value
E = Expected Value

Step 4: Calculate the Test Statistic X²


X² is the sum of all the values in the last table

X² = 0.743 + 2.05 + 2.33 + 3.33 + 0.384 + 1 = 9.837


Before you can conclude, you must first determine the critical statistic, which requires
determining our degrees of freedom. The degrees of freedom in this case are equal to the table's
number of columns minus one multiplied by the table's number of rows minus one, or (r-1) (c-
1). We have (3-1)(2-1) = 2.

Finally, you compare our obtained statistic to the critical statistic found in the chi-square table.
As you can see, for an alpha level of 0.05 and two degrees of freedom, the critical statistic is
5.991, which is less than our obtained statistic of 9.83. You can reject our null hypothesis
because the critical statistic is higher than your obtained statistic.

This means you have sufficient evidence to say that there is an association between gender and
political party preference.
WHEN TO USE A CHI-
SQUARE TEST
A chi-square test is used to help determine if observed results are in line with expected results and to
rule out that observations are due to chance.

A chi-square test is appropriate when the data being analyzed IS from a random sample and when the
variable in question is a categorical variable. A categorical variable is one that consists of selections
such as type of car, race, educational attainment, male or female, or how much somebody likes a
political candidate from very much to very little.

These types of data are often collected via survey responses or questionnaires. Therefore, chi-square
analysis is often most useful in analyzing this type of data.
LIMITATIONS OFOF
LIMITATIONS CHI-
SQUARE TEST
CHI-SQUARE TEST
There are two limitations to using the chi-square test that you should be aware of.

• The chi-square test, for starters, is extremely sensitive to sample size. Even insignificant
relationships can appear statistically significant when a large enough sample is used. Keep in
mind that "statistically significant" does not always imply "meaningful" when using the chi-
square test.
• Be mindful that the chi-square can only determine whether two variables are related. It does
not necessarily follow that one variable has a causal relationship with the other. It would
require a more detailed analysis to establish causality.
THANK YOU SO
MUCH FOR
WE HOPE YOU LEARNED SOMETHING FROM OUR PRESENTATION!

LISTENING

You might also like