Class 11
This presentation is the property of its rightful owner.
Sponsored Links
1 / 17

Class 11 PowerPoint PPT Presentation


  • 70 Views
  • Uploaded on
  • Presentation posted in: General

Class 11. Chi-Squared Test of Independence. EMBS Section 11.3. Chi-squared GOF test. One row (column) of Observed Counts One row (column) of Expected Counts determined based on H0 All categories are equally likely (Roulette Wheel, Soccer birth months)

Download Presentation

Class 11

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Class 11

Class 11

Chi-Squared Test of Independence

EMBS Section 11.3


Chi squared gof test

Chi-squared GOF test

  • One row (column) of Observed Counts

  • One row (column) of Expected Counts determined based on H0

    • All categories are equally likely (Roulette Wheel, Soccer birth months)

    • Categories have specified p’s (M&M colors)

    • #girls in 4 is binomial(n=4,p=.5) (Denmark Fams)

    • Expected Bin counts from NORMAL distribution (Lorex)

  • Calculated chi-squared, dof, chidist, pvalue, reject or not.


Supermarket survey

Supermarket Survey

  • A random sample of 160 employees of a national Supermarket chain were asked about a proposed wage freeze.

  • There were two categorical variables in the resulting 160-element data set.

    • JOB (Stacker, Sales, Admin)

    • RESPONSE (favorable, unfavorable, no comment)


The data set

The data set


To examine the relationship between 2 categorical variables start with a contingency table

To examine the relationship between 2 categorical variables, start with a contingency table

Response

Are RESPONSE and JOB independent?

Job


H0 response and job are independent

H0: Response and Job are independent

Response

What are the expected counts given H0?

Job


H0 response and job are independent1

H0: Response and Job are independent

Response

What are the expected counts given H0?

Job

(11.9)


Calculate the expected counts under h0

Calculate the Expected Counts under H0.

Response

Expected Counts if independent.

Job


We know what to do now with our table of observed and expected counts

We know what to do now with our table of Observed and Expected Counts…

The calculated chi-squared statistic

The sum of the distances.


Calculate the table of distances

Calculate the table of distances..

Response

Job


Get the p value

Get the p-value

Dof

=(#rows-1)(#cols-1)

=2*2

=4

Response

P-value

=Chidist(37.44,4)

=1.46E-07

Job


Chitest will do the last two steps

=CHITEST will do the last two steps

  • =CHITEST(range containing the Os,

    range containing the Es)

  • Calculates the chisquared, compares it to the chidistusing the appropriate dof, and reports the p-value.

  • =CHITEST(for our data) = 1.46E-07

  • So…..You just have to calculate the Es.

CHITEST will also work for the GOF test!!


Excel demo if time

Excel Demo if time…


Statistically significant

Statistically Significant?

May 13, 1999

Web posted at: 11:38 a.m. EDT (1538 GMT)

(CNN) -- Young children who sleep with a light on may have a substantially higher risk of developing nearsightedness as they get older, says a new study in the journal Nature.

The collaborative study of 479 children by researchers at the University of

Pennsylvania Medical Center and The Children's Hospital of Philadelphia found 55 percent (of the 100) children who slept with a room light on before age 2 had myopia, or nearsightedness, between ages 2 and 16.

Of the (112) children who slept with a night-light before age 2, 34 percent were myopic, while just 10 percent of children who slept in darkness were nearsighted.


1 create the contingency table of observed counts

1. Create the Contingency Table of Observed Counts

Earlier we would have asked P(Light│Myopic)

=55/120

Now we want to test

H0: Sleep Conditions and Subsequent Eyesight are independent

Statistically

Significant

=chidist(84.21,2) = 5.19E-19

H0: P(M) is equal for all three sleeping conditions.


Suppose we flip the contingency table

Suppose we Flip the contingency table?

Calculated chi-squared = 84.21

Calculated chi-squared =

P-value = 5.19E-19

P-value =


Assignment 12

Assignment 12

  • Use the class data to test the independence of ATHLETE and HS STAT.

  • Use the Denmark Family data to test independence of “Gender Mix of first 3” and “Have 4?”


  • Login