NIPRL Chapter 10. Discrete Data Analysis 10.1 Inferences on a Population Proportion 10.2 Comparing Two Population Proportions 10.3 Goodness of Fit Tests for One-Way Contingency Tables 10.4 Testing for Independence in Two-Way Contingency Tables 10.5 Supplementary Problems
NIPRL Inferences on a Population Proportion Population Proportion p with characteristic Random sample of size n With characteristic Without characteristic Cell probability p Cell frequency x Cell probability 1-p Cell frequency n-x
NIPRL Confidence Intervals for Population Proportions
NIPRL Confidence Intervals for Population Proportions Example 55 : Building Tile Cracks Random sample n = 1250 of tiles in a certain group of downtown building for cracking. x = 98 are found to be cracked.
NIPRL Confidence Intervals for Population Proportions
NIPRL Hypothesis Tests on a Population Proportion
NIPRL Hypothesis Tests on a Population Proportion
NIPRL Hypothesis Tests on a Population Proportion
NIPRL Hypothesis Tests on a Population Proportion Example 55 : Building Tile Cracks 10% or more of the building tiles are cracked ? z =
NIPRL Sample Size Calculations
NIPRL Sample Size Calculations Example 59 : Political Polling To determine the proportion p of people who agree with the statement The city mayor is doing a good job. within 3% accuracy. (-3% ~ +3%), how many people do they need to poll?
NIPRL Sample Size Calculations Example 55 : Building Tile Cracks
NIPRL Comparing Two Population Proportions
NIPRL Confidence Intervals for the Difference Between Two Population Proportions
NIPRL Confidence Intervals for the Difference Between Two Population Proportions Example 55 : Building Tile Cracks Building A : 406 cracked tiles out of n = Building B : 83 cracked tiles out of m = 2000.
NIPRL Hypothesis Tests on the Difference Between Two Population Proportions
NIPRL Hypothesis Tests on the Difference Between Two Population Proportions Example 59 : Political Polling Population age age >= 40 AB The city mayor is doing a good job. Random sample n=952 Random sample m=1043 Agree : x = 627 Disagree : n-x = 325 Agree : y = 421 Disagree : m-y = 622
NIPRL 18 Summary problems (1) Why do we assume large sample sizes for statistical inferences concerning proportions? So that the Normal approximation is a reasonable approach. (2) Can you find an exact size test concerning proportions? No, in general.
NIPRL Goodness of Fit Tests for One-Way Contingency Tables One-Way Classifications
NIPRL One-Way Classifications Example 1 : Machine Breakdowns n = 46 machine breakdowns. x 1 = 9 : electrical problems x 2 = 24 : mechanical problems x 3 = 13 : operator misuse It is suggested that the probabilities of these three kinds are p* 1 = 0.2, p* 2 = 0.5, p* 3 = 0.3.
NIPRL One-Way Classifications
NIPRL One-Way Classifications Example 1 : Machine Breakdowns H 0 : p 1 = 0.2, p 2 = 0.5, p 3 = 0.3 ElectricalMechanical Operator misuse Observed cell freq. x 1 = 9x 2 = 24x 3 = 13n = 46 Expected cell freq. e 1 = 46*0.2 = 9.2 e 2 = 46*0.5 =23.0 e 3 = 46*0.3 =13.8 n = 46
NIPRL One-Way Classifications
NIPRL Testing Distributional Assumptions Example 3 : Software Errors For some of expected values are smaller than 5, it is appropriate to group the cells. Test if the data are from a Poisson distribution with mean=3.
NIPRL Testing Distributional Assumptions
NIPRL Testing for Independence in Two-Way Contingency Tables Two-Way Classifications Level 1Level 2Level jLevel c Level 1x 11 x 12 x 1c x1.x1. Level 2x 21 x 22 x 2c x2.x2. Level ix ij xi.xi. Level rx r1 x r2 x rc xr.xr. x. 1 x. 2 x. j x. c n = x.. A two-way (r x c) contingency table. Second Categorization First Categorization Row marginal frequencies Column marginal frequencies
NIPRL Two-Way Classifications Example 55 : Building Tile Cracks Notice that the column marginal frequencies are fixed. ( x. 1 = 6000, x. 2 = 2000) Location Tile Condition Building ABuilding B Undamagedx 11 = 5594x 12 = 1917x 1. = 7511 Crackedx 21 = 406x 22 = 83x 2. = 489 x. 1 = 6000x. 2 = 2000n = x.. = 8000
NIPRL Testing for Independence
NIPRL Testing for Independence Example 55 : Building Tile Cracks Building ABuilding B Undamaged x 11 = 5594 e 11 = x 12 = 1917 e 12 = x 1. = 7511 Cracked x 21 = 406 e 21 = x 22 = 83 e 22 = x 2. = 489 x. 1 = 6000x. 2 = 2000n = x.. = 8000
NIPRL Testing for Independence
NIPRL 31 Summary problems 1.Construct a goodness-of-fit test for testing a distributional assumption of a normal distribution by applying the one-way classification method. 2.