270 likes | 368 Views
Always be mindful of the kindness and not the faults of others. Categorical Data. Sections 10.1 to 10.5 Estimation for proportions Tests for proportions Chi-square tests. Example.
E N D
Always be mindful of the kindness and not the faults of others.
Categorical Data Sections 10.1 to 10.5 Estimation for proportions Tests for proportions Chi-square tests
Example • Researchers in the development of new treatments for cancer patients often evaluate the effectiveness of new therapies by reporting the proportion of patients who survive for a specified period of time after completion of the treatment. A new treatment of 870 patients with lung cancer resulted in 330 survived at least 5 years.
Example • Estimate p, the proportion of all patients with lung cancer who would survive at least 5 years after being administered this treatment • How much would you estimate the proportion as?
Distribution of Sample Proportion • Y: the number of successes in the n trials (independent and identical trials) • What’s the distribution of Y? • Sample proportion,
Distribution of Sample Proportion • When np ≥ 5 andn(1-p) ≥ 5, thedistribution of Y can be approximated by a normal distribution. • (approximate) (1-a) Confidence Interval forp: • Optional: (exact) C.I. for p for small sample
Sample Size Where E is the largest tolerable error at (1-a)confidence level.
Test for a Large Sample • When np0≥ 5 andn(1-p0) ≥ 5, the test statistic is:
Inference about 2 Proportions Notation:
Estimation for p1-p2 • Point estimate:
Estimation for p1-p2 • (1-a) Confidence Interval for two large samples:
Example 10.6 • A company markets a new product in the Grand Rapids and Wichita. • In Grand Rapids, the company’s advertising is based entirely on TV commercials. • In Wichita, based on a balanced mix of TV, radio, newspaper, and magazine. • 2 months after the ad campaign begins, the company conducts surveys to determine consumer awareness of the product.
Example 10.6: Data Set Q: Calculate a 95% C.I. for the regional difference in the proportion of all consumers who are aware of the product.
Example 10.6 (conti.) • Conduct a test at a=0.05 to verify if there are >10% more Wichita consumers than Grand Rapids consumers aware of the product.
Test for p1-p2 (2 Large Samples) • When n1p1 ≥ 5 andn1(1-p1) ≥ 5; n2p2 ≥ 5 andn2(1-p2) ≥ 5, the test statistic of Ho: p1-p2=d is • Optional: Fisher Exact Test (p.511)
Minitab • Z test for one proportion: Stat >> Basic Statistics >>1 proportion • Z test for two proportions: Stat >> Basic Statistics >>2 proportion
Chi-Square Goodness of Fit Test • More than two possible outcomes per trial the multinomial experiment • The experiment consists of n identical trials. • Each trial results in one of k outcomes with probabilities p1, p2,...,pk. • Y=(Y1,…,Yk); Yi = the # of outcome i.
Chi-square Goodness of Fit Test Goal: We are interested in testing a hypothesized distribution of Y (i.e. a set of pi’s values). • Hypotheses: Ho: pi = pio for all i vs. Ha: Ho is false
Chi-square Goodness of Fit Test • Test Statistic: ni = the observed Yi Ei = the expected Yi = npio
Chi-square Goodness of Fit Test • Rejection Region: Reject Ho if where df=k-1. • Note: This test can be trusted only when 80% of more cells of the Ei’s are at least 5.
Minitab: Stat >> Tables >> Chi-Square Goodness-of-Fit Test(One Variable) Example 10.11
Contingency Table • 2 categorical variables: row and column indexed by i and j, respectively • If they are independent, then
Test for Independence of 2 Var’s • Hypotheses: Ho: the row and column variables are independent Ha: they are dependent • Test Statistic:
Test for Independence of 2 Var’s • Rejection Region: Reject Ho if where df=(r-1)(c-1). • Note: This test can be trusted only when 80% of more cells of the are at least 5.
Minitab: Stat >> Tables >> Chi-Square Test(Two-Way Table in Worksheet) Example 10.12 Chi-Square Test: C1, C2, C3, C4 Expected counts are printed below observed counts Chi-Square contributions are printed below expected counts C1 C2 C3 C4 Total 1 15 32 18 5 70 7.78 26.25 21.39 14.58 6.706 1.260 0.537 6.298 2 8 29 23 18 78 8.67 29.25 23.83 16.25 0.051 0.002 0.029 0.188 3 1 20 25 22 68 7.56 25.50 20.78 14.17 5.688 1.186 0.858 4.331 Total 24 81 66 45 216 Chi-Sq = 27.135, DF = 6, P-Value = 0.000