Vous êtes sur la page 1sur 44

12--1

12

Chapter 12
Chi-Square and
Chi-
Analysis of Variance
(ANOVA)
| p 
  À
12--2
12
Outline

^ 12-1 Introduction
^ 12-2 Test for Goodness of Fit
^ 12-3 Tests Using Contingency
Tables
^ 12-4 Analysis of Variance (ANOVA)

| p 
  À
12--3
12
Objectives
^ Test a distribution for goodness of fit
using chi-square.
^ Test two variables for independence
using chi-square.
^ Test proportions for homogeneity using
chi-square.
^ Use ANOVA technique to determine a
difference among three or more means.
| p 
  À
12--4
12
12--2 Test for Goodness of Fit
12

^ Dhen one is testing to see


whether a frequency
distribution fits a specific
pattern, the chi
chi--square
goodness--of
goodness of--fit test is used.

| p 
  À
12--2 Test for Goodness of Fit -
12
12--5
12
Example

^ 3uppose a market analyst wished to see


whether consumers have any preference
among five flavors of a new fruit soda. A
sample of 100 people provided the
following data:
erry traw- range Lime Grape
erry
32 28 16 14 10

| p 
  À
12--2 Test for Goodness of Fit -
12
12--6
12
Example

^ If there were no preference, one


would expect that each flavor would
be selected with equal frequency.
^ In this case, the equal frequency is
100/5 = 20.
^ That is, approximately 20 people
would select each flavor.
| p 
  À
12--2 Test for Goodness of Fit -
12
12--7
12
Example

^ The frequencies obtained from the


sample are called observed
frequencies.
frequencies
^ The frequencies obtained from
calculations are called expected
frequencies.
frequencies
^ Table for the test is shown next.
| p 
  À
12--2 Test for Goodness of Fit -
12
12--8
12
Example

Freq. Cherry Stra - Orange ime Grape


berry
Observed 32 28 16 14 10
Expected 20 20 20 20 20

| p 
  À
12--2 Test for Goodness of Fit -
12
12--9
12
Example

^ The observed frequencies will almost


always differ from the expected
frequencies due to sampling error.
^ Question: Are these differences
significant, or are they due to chance?
^ The chi-square goodness-of-fit test will
enable one to answer this question.

| p 
  À
12--2 Test for Goodness of Fit -
12
12--10
12
Example

^ The appropriate hypotheses for this


example are:
^ 0: Consumers show no preference for
flavors of the fruit soda.
^ 1: Consumers show a preference.
^ The d. f. for this test is equal to the
number of categories minus 1.

| p 
  À
12--2 Test for Goodness of Fit -
12
12--11
12
Formula

  
À Ë  À

x     
   
    
    
| p 
  À
12--2 Test for Goodness of Fit -
12
12--12
12
Example

^ Is there enough evidence to reject the


claim that there is no preference in the
selection of fruit soda flavors? Let
  = 0.05.
^ 3tep 1: 3tate the hypotheses and
identify the claim.

| p 
  À
12--2 Test for Goodness of Fit -
12
12--13
12
Example

^ 0: Consumers show no preference for


flavors (claim).
^ 1: Consumers show a preference.
^ 3tep 2: Find the critical value. The d. f.
are 5 ± 1 = 4 and   = 0.05. Hence, the
critical value = 9.488.

| p 
  À
12--2 Test for Goodness of Fit -
12
12--14
12
Example

^ 3tep 3: Compute the test value.


Õ = (32 ± 20)2/20 + (28 is ± 20)2/20 + « +
(10 ± 20)2/20 = 18.0.
^ 3tep 4:ÕՄake
4: the decision. The
decision is to reject the null hypothesis,
since 18.0 > 9.488.

| p 
  À
12--2 Test for Goodness of Fit -
12
12--15
12
Example

^ 3tep 5: 3ummarize the results. There is


enough evidence to reject the claim that
consumers show no preference for the
flavors.

| p 
  À
12--2 Test for Goodness of Fit -
12
12--16
12
Example

î 

9.488

| p 
  À
12--2 Test for Goodness of Fit -
12
12--17
12
Example

^ The advisor of an ecology club at a large


college believes that the group consists
of 10% freshmen, 20% sophomores, 40%
juniors, and 30% seniors. The
membership for the club this year
consisted of 14 freshmen, 19
sophomores, 51 juniors, and 16 seniors.
At   = 0.10, test the advisor¶s conjecture.

| p 
  À
12--2 Test for Goodness of Fit -
12
12--18
12
Example

^ 3tep 1: 3tate the hypotheses and


identify the claim.
^ 0: The club consists of 10% freshmen,
20% sophomores, 40% juniors, and
30% seniors (claim)
^ 1: The distribution is not the same as
stated in the null hypothesis.

| p 
  À
12--2 Test for Goodness of Fit -
12
12--19
12
Example

^ 3tep 2: Find the critical value. The d. f.


are 4 ± 1 = 3 and   = 0.10. Hence, the
critical value = 6.251.
^ 3tep 3: Compute the test value.
  = (14 ± 10)2/10 + (19 ± 20)2/20 + « +
(16 ± 30)2/30 = 11.208.

| p 
  À
12--2 Test for Goodness of Fit -
12
12--20
12
Example

^ 3tep 4:ÕՄake
4: the decision. The
decision is to reject the null hypothesis,
since 11.208 > 6.251.
^ 3tep 5: 3ummarize the results. There is
enough evidence to reject the advisor¶s
claim.

| p 
  À
12--21
12
12--3 Tests Using Contingency Tables
12

^ Dhen data can be tabulated in table


form in terms of frequencies, several
types of hypotheses can be tested
using the chi-square test.
^ Two such tests are the independence of
variables test and the homogeneity of
proportions test.

| p 
  À
12--22
12
12--3 Tests Using Contingency Tables
12

^ The test of independence of variables is


used to determine whether two variables
are independent when a single sample is
selected.
^ The test of homogeneity of proportions is
used to determine whether the proportions
for a variable are equal when several
samples are selected from different
populations.
| p 
  À
12--3 Test for Independence -
12
12--23
12
Example

^ 3uppose a new postoperative procedure


is administered to a number of patients
in a large hospital.
^ Question: Do the doctors feel
differently about this procedure from
the nurses, or do they feel basically the
same way?
^ Data is on the next slide.
| p 
  À
12--3 Test for Independence -
12
12--24
12
Example

GGroup
roup Prefer
Prefer Prefer
Prefer No
No
ne
ne old
old preference
preference
procedure
procedure procedure
procedure
Nurses
Nurses 100
100 80
80 20
20

Doctors
Doctors 50
50 120
120 30
30

| p 
  À
12--3 Test for Independence -
12
12--25
12
Example

^ The null and the alternative hypotheses


are as follows:
^ 0: The opinion about the procedure is
independent of the profession.
^ 1: The opinion about the procedure is
dependent on the profession.

| p 
  À
12--3 Test for Independence -
12
12--26
12
Example

^ If the null hypothesis is not rejected, the


test means that both professions feel
basically the same way about the
procedure, and the differences are due to
chance.
^ If the null hypothesis is rejected, the test
means that one group feels differently
about the procedure from the other.

| p 
  À
12--3 Test for Independence -
12
12--27
12
Example

^ Note: The rejection of the null hypothesis


does not mean that one group favors the
procedure and the other does not.
^ The test value is the  2 value (same as the
goodness-of-fit test value).
^ The expected values are computed from:
(row sum)-(column sum)/(grand total).

| p 
  À
12--3 Test for Independence -
12
12--28
12
Example

| p 
  À
12--3 Test for Independence -
12
12--29
12
Example

^ From the „INITAB output, the


l-value = 0. Hence, the null hypothesis
will be rejected.
^ If the critical value approach is used, the
degrees of freedom for the chi-square
critical value will be (number of
columns ±1)-(number of rows ± 1).
^ d.f. = (3 ±1)(2 ± 1) = 2.
| p 
  À
12--3 Test for Homogeneity of
12
12--30
12
Proportions

^ Here, samples are selected from several


different populations and one is
interested in determining whether the
proportions of elements that have a
common characteristic are the same for
each population.

| p 
  À
12--3 Test for Homogeneity of
12
12--31
12
Proportions

^ The sample sizes are specified in


advance, making either the row totals or
column totals in the contingency table
known before the samples are selected.
^ The hypotheses will be:
0 : 1 = 2 = « = 
1: At least one proportion is different
from the others.
| p 
  À
12--3 Test for Homogeneity of
12
12--32
12
Proportions

^ The computations for this test


are the same as that for the test
of independence.

| p 
  À
12--33
12
12--4 Analysis of Variance (ANOVA)
12

^ Dhen an Πtest is used to test a


hypothesis concerning the
means of three or more
populations, the technique is
called analysis of variance
(ANOVA).
(ANOVA)

| p 
  À
12-4 Assumptions for the  Test for
12-
12--34
12
Comparing Three or More Means

^ The populations from which the


samples were obtained must be
normally or approximately normally
distributed.
^ The samples must be independent of
each other.
^ The variances of the populations must
be equal.
| p 
  À
12--35
12
12--4 Analysis of Variance
12

^ Although means are being compared


in this Πtest, variances are used in the
test instead of the means.
^ Two different estimates of the
population variance are made.

| p 
  À
12--36
12
12--4 Analysis of Variance
12

^ Between-group variance - this involves


Between-
computing the variance by using the
means of the groups or between the
groups.
^ Dithin--group variance - this involves
Dithin
computing the variance by using all
the data and is not affected by
differences in the means.
| p 
  À
12--37
12
12--4 Analysis of Variance
12

^ The following hypotheses should be


used when testing for the difference
between three or more means.
^ 0: oîÕ o = o = « = o
^ 1: At least one mean is different from
the others.

| p 
  À
12--38
12
12--4 Analysis of Variance
12

^ d.f.N. =  ± 1, where  is the number of


groups.
^ d.f.D. =  ± , where  is the sum of
the sample sizes of the groups.
^ Note: The formulas for this test are
tedious to work through, so examples
will be done in „INITAB. 3ee text for
formulas.
| p 
  À
12--39
12 12--4 Analysis of Variance -Example
12

^ A marketing specialist wishes to see


whether there is a difference in the
average time a customer has to wait in a
checkout line in three large self-service
department stores. The times (in
minutes) are shown on the next slide.
^ Is there a significant difference in the
mean waiting times of customers for each
store using   = 0.05?
| p 
  À
12--40
12 12--4
12 nalysis of Variance -Example

tore
tore tore
toreBB tore
tore
33 55 11
22 88 33
55 99 44
66 66 22
33 22 77
11 55 33

| p 
  À
12--41
12 12--4 Analysis of Variance -Example
12

^ 3tep 1: 3tate the hypotheses and


identify the claim.
^ 0: oîÕ o = o
1: At least one mean is different
from the others (claim).

| p 
  À
12--42
12 12--4 Analysis of Variance -Example
12

^ 3tep 2: Find the critical value. 3ince


 = 3,  = 18, and   = 0.05, d.f.N. =  ± 1
= 3 ± 1= 2, d.f.D. =  ±  = 18 ± 3 = 15.
The critical value is 3.68.
^ 3tep 3: Compute the test value. From
the „INITAB output, Œ = 2.70. (3ee
your text for computations).

| p 
  À
12--43
12 12--4 Analysis of Variance -Example
12

^ 3tep 4: „ake a decision. 3ince


2.70 < 3.68, the decision is not to reject
the null hypothesis.
^ 3tep 5: 3ummarize the results. There
is not enough evidence to support the
claim that there is a difference among
the means. The ANOVA summary
table is given on the next slide.
| p 
  À
12--44
12 12--4 Analysis of Variance -Example
12

| p 
  À

Vous aimerez peut-être aussi