Lec 23chi Square

You might also like

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

1

Lahore Garrison University


STAT 107 Statistical Inference
Topic# Test of Association

Lecture# 27
2
Preamble

Forecasting
3
Learning Outcomes

Student will able to learn about:


 Chi Square test its assumptions and interpretation
4

 Definition: The Chi-Square Distribution, denoted as χ2 is related to the standard normal


distribution such as, if the independent normal variable, let’s say Z assumes the standard
normal distribution, then the square of this normal variable Z2 has the chi-square
distribution with ‘K’ degrees of freedom. Here, K is the sum of the independent squared
normal variables
5
The Chi Square Test

 N approaches to infinity discrete multinomial distribution may be transformed and approach to chi-square distribution
 It has only one parameter =d.f
6
Properties

1) The chi-square distribution is a continuous probability distribution with the values ranging from 0 to ∞ (infinity)
in the positive direction. The χ2 can never assume negative values.

2) The shape of the chi-square distribution depends on the number of degrees of freedom ‘ν’.
When ‘ν’ is small, the shape of the curve tends to be skewed to the right,
and as the ‘ν’ gets larger, the shape becomes more symmetrical
and can be approximated by the normal distribution.

3)The mean of the chi-square distribution is equal to the degrees of freedom,


 i.e. E(χ2) = ‘ν’. While the variance is twice the degrees of freedom, Viz. n(χ2) = 2ν.
7
Properties of the Chi-Square Test

The Chi-Square is a continuous distribution ranging from zero to plus infinity

2) The mean of Chi- Square distribution is equal to number of degree of freedom


and its variance is equal to twice the number of d.f

3) The chi square tends to normal distribution as number of degree of freedom


approach infinity
8
Application of chi-square test
10
Defination

 a statistic that is a sum of terms each of which is a quotient obtained by dividing the
square of the difference between the observed and theoretical values of a quantity by the
theoretical value
11

 the test of independence,


which asks a question of relationship, such as, "Is there a relationship between gender and
SAT scores?"; and the goodness-of-fit test, which asks something like "If a coin is tossed 100
times, will it come up heads 50 times and tails 50 times?

Contingency table is multi dimension table


Chi square test is non parametric test
12
Discus the association between two criteria of
classification

Categories Maths(B1) Chemistry(B2) Physics(B3) Total


Music (A1) 24 83 17 124
Craftwork (A2) 11 62 28 101
Reading (A3) 32 121 34 187
Drama (A4) 10 26 44 80
Total 77 292 123 492
13
Two-Way ( Question)

Observed Democrat Republican Row Totals


Male 20 30 50
Female 30 20 50
Column Totals 50 50 100

Each value in the expected values table is calculated by multiplying the row total
(50) X the column total (50) and dividing by the grand total (100) for each cells
location.
14
Two-Way ( Sol.)

Expected Democrat Republican


Male 25 25
Female 25 25

Calculating the Chi-square statistic:


= ((20-25)^2/25) + ((30-25)^2/25) + ((30-25)^2/25) + ((20-25)^2/25), or (25/25) + (25/25) +
(25/25) + (25/25)
= 1 + 1 + 1 + 1 or 4. 
Calculating Expected Frequencies

fe = (column marginal)(row marginal)


N
To obtain the expected frequencies for any cell in any cross-tabulation in which the two variables are
assumed independent, multiply the row and column totals for that cell and divide the product by the total
number of cases in the table.
 The test statistic that summarizes the differences between the observed (fo) and the expected (fe)
frequencies in a bivariate table.
16
Practice Question

A manger wants to see if geographical region is associated with ownership of a Macintosh computer.
The manager surveys 100 people and the data breaks down as follows

Mac No Mac Row total


North East 12 14 26
South West 21 18 39
Mid West 17 18 35
Column Total 50 50 100
17

Q &A

Lahore Garrison University


18
References

 Probability and Statistics for Engineers and Scientists by Ronald E. Walpole,


Raymond H. Myers, Sharon L. Myers and Keying E. Ye, Pearson; 9th Edition
(January 6, 2011). ISBN-10: 0321629116 2
 Walpole, P.E., Myers R.H., Myers S.L. (1998), “Probability and Statistics for
Engineers and Scientists”, 7th Ed. Prentice Hall.

Lahore Garrison University

You might also like