Docsity

χ2 Test for Independence: Testing the Assumption of Independence between Two Variables - P, Study notes of Statistics

Toggle sidebar
bg1
1
χ2Test for Independence
One specific application of the
χ2goodness-of-fit test
involves testing the
assumption that two events
are independent of each other
(that is, to determine if two
particular variables have no
affect on each other).
Independent Events
Two events E and F are
independent if …
P(E given F) = P(E)
The χ2goodness-of-fit test
uses these probabilities to
test for independence.
χ2Test for Independence
H0: The “variables” in question
are independent.
(Good-Fit)
H1: The “variables” in question
are not independent.
(Bad-Fit)
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download χ2 Test for Independence: Testing the Assumption of Independence between Two Variables - P and more Study notes Statistics in PDF only on Docsity!

χ^2 Test for Independence

One specific application of the χ^2 goodness-of-fit test involves testing the assumption that two events are independent of each other (that is, to determine if two particular variables have no affect on each other).

Independent Events

Two events E and F are independent if …

P(E given F) = P(E)

The χ^2 goodness-of-fit test uses these probabilities to test for independence.

χ^2 Test for Independence

H 0 : The “variables” in question are independent. (Good-Fit)

H 1 : The “variables” in question are not independent. (Bad-Fit)

χ^2 Test for Independence

Test Statistic Formula :

where O (^) ij are the observed values, Eij are the expected values, r is the number of categories for the first variable, and c is the number of categories for the second variable.

2 2 1 1

r c ( i j i j )

i j (^) i j

O E

= = E

Let α = “level of significance”

χ^2 Test for Independence

Expected Values

The TI-83plus calculator calculates these values for us.

E ij ni pj

column total

row total

grand total

χ^2 Test for Independence

On the TI-83plus calculator, enter the observed values into matrix [A] by pressing

2 nd^ [MATRX] EDIT [ENTER]

1,1 1,2 1, 2,1 2,2 2,

,1 ,2 ,

[ ] c c

r r r c

MATRIX A r c O O O O O O

O O O

× ⎡ ⎤ ⎢ ⎥ ⎢⎢ ⎥⎥ ⎢ ⎥ ⎣ ⎦

" "

# %

"

A recent CBS News poll asked a random sample of 1007 Americans how they identified themselves politically and whether they thought the effects of global warming have already begun to happen.

Is an American's response to this question independent of their political identification?

Example

Solution

H 0 : An American’s response to this question is independent of their political identification.

H 1 : An American’s response to this question is not independent of their political identification.

Let α = 0.

Solution

Since p-value ≈ 0.000 ≤ 0.05 = α, we reject H 0.

Answer

No.

An American’s response to this question is not independent of their political identification.

Comments

That is, how an American responded to this question depended on their political identification. We observed fewer republicans than was expected that thought the effects of global warming have begun. We observed more democrats than was expected that thought the effects of global warming have begun.

Example

The following table displays the results of a study where a random sample of 480 people were classified by gender and the type of vehicle they drive.

Does it appear that a person’s gender is independent of the type of vehicle they drive?

Question

Does the type of degree earned in the United States last year appear to be independent of the gender of the degree recipient?

A χ^2 test should be used to test for independence.

Sample Data

The table given below displays the counts (in thousands) of college degrees earned in the United States last year, classified by the type of degree and by the gender of the degree recipient

Solution

H 0 : The type of degree earned in the United States last year is independent of the gender of the degree recipient.

H 1 : The type of degree earned in the United States last year is not independent of the gender of the degree recipient.

Solution

Let α = 0.

Since p-value ≈ 0.134 > 0.05 = α, we fail to reject H 0.

Answer

Yes.

The type of degree earned in the United States last year does appear to be independent of the gender of the degree recipient.

Question

Based on our student survey data, can one conclude that a student’s rating of their math ability is made independent of their gender?

Answer

Yes.

Based on our sample, one could conclude that a student’s rating of their math ability is made independent of their gender.

Comment

It appears that the manner in which a student rates their math ability does not depend on their gender.

That is, the distribution of math ability ratings were similar for males and females.