ChiSquare Test Section 12 1 Categorical Variables n
Chi-Square Test Section 12. 1
Categorical Variables n Based on observations n Univariate – single categorical variable ¨ Example: n Sample 100 people & ask if they agree or disagree with a question. Bivariate – uses two categorical variables ¨ Example: Sample 100 people & ask if they are male/female and what political party they support.
One-Way Frequency Table - univariate Data Democrat Independent Republican Democrat Republican Independent Republican Vertical One. Way Table Horizontal One-Way Table Freq. Democrat Freq. 4 Republican Independen t 6 2 Democrat 4 Republican 6 Independent 2
Goodness of Fit Test Used to measure the extent to which the observed counts differ from the expected counts. n K = # categories of a catagorical variable n Df = k – 1 n Test Statistic: n
Assumptions n Observed Values are based on random Samples n Sample size is large – each cell count is at least 5.
Hypotheses n Ho: State each proportion’s hypothesized value. n HA: At least 1 of the proportions differ from the hypothesized value.
It uses the Chi-Square Chart Positively Skewed n Uses d. f. n On calculator! n
Is there a preference in type of car? P 1=proportion who prefer a SUV Freq. SUV Expected 27 Truck 25 Sedan 29 Sports 19 P 2=proportion who prefer a truck p 3=proportion who prefer a sedan P 4=proportion who prefer a sports car Assumptions: Random Samples & all cell counts are at least 5. Use a Chi-Square goodness of fit Test P-val = xcdf(2. 24, ∞, 3)=0. 52
A researcher believes that the number of homicides crimes in CA by season is uniformly distributed. To test this claim, you randomly select 1200 homicides from a recent year and record the season when each happened. Season Freq Spring 312 Summer 299 Fall 297 Winter 293
Results from a previous survey asking people who go to movies at least once a month are shown in the table below. To determine whether this distribution is still the same, you randomly select 1000 people who go to movies at least once a month and record the age of each. Are the distributions the same? Age Survey Freq 2 - 17 26. 70% 240 18 - 24 19. 80% 214 25 - 39 19. 70% 183 40 - 49 14% 156 50+ 19. 80% 207
Homework n Worksheet
- Slides: 11