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

CHI-SQUARE TEST OF INDEPENDENCE

chi-square (x²) test of independence is a type of Pearson’s chi-square test.


Pearson’s chi-square tests are nonparametric tests for categorical variables.
is used to determine if there is a significant relationship between two nominal
(categorical) variables. the frequency of each category for one nominal variable is
compared across the categories of the second nominal variable. the data can be
displayed in a contingency table where each row represents a category for one
variable and each column represents a category for the other variable.
CHI-SQUARE TEST OF INDEPENDENCE HYPOTHESES

The chi-square test of independence is an inferential statistical test, meaning that it


allows you to draw conclusions about a population based on a sample

• Null hypothesis (H0): Variable 1 and variable 2 are not related in the
population; The proportions of variable 1 are the same for different values of
variable 2.
• Alternative hypothesis (Ha): Variable 1 and variable 2 are related in the
population; The proportions of variable 1 are not the same for different values of
variable 2.
HOW TO CALCULATE THE TEST
STATISTIC (FORMULA)

Pearson’s chi-square (x²) is the test statistic for the chi-square test of independence:

Where
• Χ2 is the chi-square test statistic
• Σ is the summation operator (it means “take the sum of”)
• O is the observed frequency
• E is the expected frequency
STEPS TO PERFORM THE
CHI-SQUARE TEST OF INDEPENDENCE

1. Calculate the expected frequencies/values


2. Calculate chi-square (x²)
3. Find the critical chi-square value (or) get the corresponding p-value
4. Compare the chi-square value to the critical value (or) compare the p-value to
the level of significance (α)
5. Decide whether to reject the null hypothesis
CALCULATE THE EXPECTED
FREQUENCIES/VALUES

Use the contingency table to calculate the expected frequencies following the
formula:

Expected Value =

Row total

Grand total
Column total
CALCULATE CHI-SQUARE
F I N D TH E C R I TI C A L C H I - SQ U A R E VA LU E
(OR)
G E T TH E C O R R ES PO N D I N G P - VA LU E

You can find the critical value in a chi-square critical value table or using statistical
software. You need to know two numbers to find the critical value:

• The degrees of freedom (df):


= (number of variable 1 groups − 1) * (number of variable 2 groups − 1).

where variable 1 = number of columns


variable 2 = number of rows
1 2 3

1
2

• Significance level (α): By convention, the significance level is usually .05.


C O M PA R E T H E C H I - S Q U A R E VA L U E T O T H E C R I T I C A L VA L U E
(OR)
C O M PA R E T H E P - VA L U E T O T H E L E V E L O F S I G N I F I C A N C E ( Α )

• If the x² value is greater than the critical value, then the difference between
the observed and expected distributions is statistically significant (p < α).
o The data allows you to reject the null hypothesis that the variables are unrelated
and provides support for the alternative hypothesis that the variables are related.

• If the x² value is less than the critical value, then the difference between the
observed and expected distributions is not statistically significant (p > α).
o The data doesn’t allow you to reject the null hypothesis that the variables are
unrelated and doesn’t provide support for the alternative hypothesis that the
variables are related.
EXAMPLE
Expected Value =

26.13 64 21.87
22.86 56 19.13

JOGGER
Expected Value (34) = (112*49)/210
Expected Value (57) = (112*120)/210
Expected Value (41) = (112*41)/210

NON-JOGGER
Expected Value (34) = (98*15)/210
Expected Value (57) = (98*63)/210
Expected Value (41) = (98*20)/210

Step 1: Calculate the expected frequencies/values


Step 2: Calculate chi-square
Step 2: Calculate chi-square
x² = 6.79
df = (no. of columns -1) (no. of rows-1)
= (3-1)(2-1)
=2

Step 3: Find the critical chi-square value (or) get the corresponding p-value
x² = 6.79
df = (no. of columns -1) (no. of rows-1)
= (3-1)(2-1)
=2

Critical value is 5.991 and P-value is 0.033541


Step 3: Find the critical chi-square value (or) get the corresponding p-value
x² = 6.79 vs Critical value is 5.991

level of significance (α) = 0.5 vs P-value is 0.033541

Step 4: Compare the chi-square value to the critical value (or) compare the p-value to the level of significance (α)
x² = 6.79 vs Critical value is 5.991

level of significance (α) = 0.5 vs P-value is 0.033541

Th e Χ 2 v al ue is g r e at e r t h a n t h e c r it i ca l v al ue , a nd t he p - v a lu e < 0 .0 5 ,
r e jec t s t he nu ll h yp o t h es is ( H 0 ) . Th e r ef or e , t h e r e i s a s ig n if ic a n t
r e lat io ns hi p be t w e e n Jo g gin g an d B lo od p r e ss u r e.

Step 5: Decide whether to reject the null hypothesis


THANK YOU!!!

You might also like