Goodness of Fit - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Goodness of Fit

Description:

Thus far we have discussed proportions for situations where the ... H0: (NO) p1 = .40; p2 = .35; pOTHER = .25. HA: (YES) At least one pj its hypothesized value ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 17
Provided by: JohnLa
Category:
Tags: fit | goodness | pother

less

Transcript and Presenter's Notes

Title: Goodness of Fit


1
  • Goodness of Fit
  • Multinomials

2
Multinomial Proportions
  • Thus far we have discussed proportions for
    situations where the result for the qualitative
    variable could be only success or failure
  • Now we discuss the situation where there are
    multiple outcomes for the qualitative variable

3
EXAMPLE
  • Suppose the 1000 people had 5 choices
  • COLA OBSERVED
  • FREQUENCY
  • (1) Coke f1 410
  • (2) Pepsi f2 350
  • (3) RC f3 80
  • (4) Shasta f4 50
  • (5) Jolt f5 110

4
QUESTIONS
  • (1) Can we conclude that there are differences
    in cola preference?
  • (2) Last year 40 favored Coke, 35 Pepsi and
    25 all other brands. Can we conclude these
    preferences have changed?
  • (3) Give a 95 confidence interval for those who
    favor Coke.

5
(1) CAN IT BE CONCLUDED THAT THERE ARE
DIFFERENCES IN COLA PREFERENCES?
  • The answer is NO unless we can conclusively show
    otherwise.
  • H0 (NO) p1 p2 p3 p4 p5 .2
  • HA (YES) At least one pj ? .2
  • ? .05
  • THIS IS A ?2 (Chi-squared) TEST!

6
THE ?2 (Chi-squared) STATISTIC
  • The ?2 (Chi-squared) statistic is defined as the
    cumulative mean square differences between the
    observed values (fi) and the expected values if
    H0 were true (ei)

7
RULE OF 5
  • ?2 (Chi-squared) is actually only an approximate
    distribution for the test statistic
  • To be a valid approximation
  • ALL eis should be ? 5
  • If the rule of 5 is violated, combine some
    categories so that the condition is met

8
THE ?2 (Chi-squared) TEST
  • Reject H0 if ?2 gt ?2.05,DF
  • DF k-1, where k categories (5, here)
  • ?2.05,4 a critical value found in a ?2 table
  • ?2.05,4 9.48773
  • If H0 were true, p1 p2 p3 p4 p5 .2
  • We would expect to find e1 .2(1000) 200 and
  • e2 .2(1000) 200 e3 .2(1000) 200
  • e4 .2(1000) 200 e5 .2(1000) 200
  • ALL eis ARE ? 5

9
CALCULATION OF ?2THE MULTINOMIAL TABLE
  • Cola Observed Expected Difference Mean Sq. Dif.
  • i fi ei (fi - ei)
    (fi - ei)2/ei
  • 1 410 200 210 220.5
  • 2 350 200 150 112.5
  • 3 80 200 -120 72.0
  • 4 50 200 -150 112.5
  • 5 110 200 - 90 40.5
  • SUM 558.0 ?2

10
RESULTS
  • ?2 558.0 gt ?2.05,4 9.48773
  • There is strong evidence that differences exist
    in cola preferences

11
(2) CAN IT BE CONCLUDED COLA PREFERENCES HAVE
CHANGED SINCE LAST YEAR?
  • H0 (NO) p1 .40 p2 .35 pOTHER .25
  • HA (YES) At least one pj ? its hypothesized
    value
  • ? .05
  • There are now k 3 categories.
  • Reject H0 if ?2 gt ?2.05,2 5.99147

12
CALCULATION OF ?2
  • Cola Observed Expected Difference Mean Sq. Dif.
  • i fi ei (fi - ei)
    (fi - ei)2/ei
  • 1 410 400 10 .25
  • 2 350 350 0 0
  • Other 240 250 -10 .40
  • SUM .65 ?2
  • ?2 .65 lt 5.99147
  • Cannot conclude preferences have changed

All eis gt 5
13
(3) CONFIDENCE INTERVAL FOR PROPORTION WHO FAVOR
COKE
  • This is now binomial
  • Coke and everything else

14
Excel
  • The Excel function CHITEST returns the p-value
    for the hypothesis test.
  • Its form is
  • CHITEST (Range of observed values,Range of
    estimated values)

15
VERY LOW p-value
16
Review
  • Multinomial problems exist when there are more
    than two possible outcomes for a qualitative
    variable
  • Excel Approach -- compare observed values to
    expected values by using CHITEST to give the
    p-value
  • Hand approach -- Compare the ? 2 statistic to ? 2
    ? ,DF where DF categories - 1 k-1
  • The value of the ? 2 statistic is
Write a Comment
User Comments (0)
About PowerShow.com