Ken Black QA ch12

download Ken Black QA ch12

of 32

Transcript of Ken Black QA ch12

  • 8/3/2019 Ken Black QA ch12

    1/32

    Business Statistics, 5th ed.by Ken Black

    Chapter 12

    Analysis ofCategorical Data

    Discrete Distributions

    PowerPoint presentations prepared by Lloyd Jaisingh,Morehead State University

  • 8/3/2019 Ken Black QA ch12

    2/32

    Learning Objectives

    Understand the 2 goodness-of-fit test and how touse it.

    Analyze data using the 2 test of independence.

  • 8/3/2019 Ken Black QA ch12

    3/32

    2 Goodness-of-Fit TestThe 2 goodness-of-fit test compares

    expected(theoretical)frequencies

    of categories from a population distribution

    to the observed(actual)frequencies

    from a distribution to determine whether

    there is a difference between what was

    expected and what was observed.

  • 8/3/2019 Ken Black QA ch12

    4/32

    2 Goodness-of-Fit Test

    datasamplethefromestimatedparametersofnumber=

    categoriesofnumber

    valuesexpectedoffrequency

    valuesobservedoffrequency:

    -1-=df

    2

    0

    02

    c

    k

    where

    ck

    e

    e

    e

    f

    f

    f

    ff

    The formula which is used to compute the test statistic fora chi-square goodness-of-fit test is given below.

  • 8/3/2019 Ken Black QA ch12

    5/32

    Month Gallons

    January 1,610

    February 1,585

    March 1,649

    April

    1,590

    May

    1,540

    June

    1,397July

    1,410

    August

    1,350

    September

    1,495

    October

    1,564

    November

    1,602December

    1,655

    18,447

    Milk Sales Datafor Demonstration

    Problem 12.1

  • 8/3/2019 Ken Black QA ch12

    6/32

    Hypotheses and Decision Rules

    for Demonstration Problem 12.1

    ddistributeuniformlynotare

    salesmilkforfiguresmonthlyThe:H

    ddistributeuniformlyare

    salesmilkforfiguresmonthlyThe:H

    a

    o

    .

    .. ,

    01

    1

    12 1 0

    11

    24 7250111

    2

    df k cIf reject H .

    If do not reject H .

    Cal

    2

    o

    Cal

    2

    o

    24 725

    24 725

    . ,

    . ,

  • 8/3/2019 Ken Black QA ch12

    7/32

    Calculations

    for Demonstration Problem 12.1Month fo fe (fo - fe)

    2/feJanuary 1,610 1,537.25 3.44

    February 1,585 1,537.25 1.48

    March 1,649 1,537.25 8.12

    April 1,590 1,537.25 1.81May 1,540 1,537.25 0.00

    June 1,397 1,537.25 12.80

    July 1,410 1,537.25 10.53

    August 1,350 1,537.25 22.81

    September 1,495 1,537.25 1.16

    October 1,564 1,537.25 0.47

    November 1,602 1,537.25 2.73

    December 1,655 1,537.25 9.02

    18,447 18,447.00 74.38

    ef

    18447

    12

    153725.

    Cal

    2

    74 37 .

  • 8/3/2019 Ken Black QA ch12

    8/32

    The observed chi-square value of 74.37 isgreater than the critical value of 24.725.

    The decision is to reject the null

    hypothesis. The data provides enoughevidence to indicate that the distributionof milk sales is not uniform.

    Calculations

    for Demonstration Problem 12.1

  • 8/3/2019 Ken Black QA ch12

    9/32

    Calculations

    for Demonstration Problem 12.1

  • 8/3/2019 Ken Black QA ch12

    10/32

    Bank Customer Arrival Data

    for Demonstration Problem 12.2

    Number of

    Arrivals

    Observed

    Frequencies

    0 7

    1 18

    2 25

    3 17

    4 12

    5 5

  • 8/3/2019 Ken Black QA ch12

    11/32

  • 8/3/2019 Ken Black QA ch12

    12/32

    Calculations

    for Demonstration Problem 12.2:

    Estimating the Mean Arrival RateNumber of

    Arrivals

    X

    Observed

    Frequencies

    f fX

    0 7 0

    1 18 18

    2 25 50

    3 17 51

    4 12 485 5 25192

    f X

    f

    192

    84

    2 3. customers per minute

    Mean

    Arrival

    Rate

  • 8/3/2019 Ken Black QA ch12

    13/32

    Calculations for Demonstration Problem

    12.2: Poisson Probabilities for = 2.3Number of

    Arrivals X

    Expected

    Probabilities

    P(X)

    Expected

    Frequencies

    nP(X)

    0 0.1003 8.421 0.2306 19.37

    2 0.2652 22.28

    3 0.2033 17.08

    4 0.1169 9.82

    0.0838 7.04

    n f

    84

    Poisson

    Probabilities

    for = 2.3

  • 8/3/2019 Ken Black QA ch12

    14/32

    2 Calculationsfor Demonstration Problem 12.2

    Cal

    2

    174 .Number ofArrivalsX

    Observed

    Frequencies

    f

    Expected

    Frequencies

    nP(X)

    (fo - fe)2

    fe

    0

    1

    2

    3

    45

    7 8.42

    18 19.37

    25 22.28

    17 17.08

    12 9.825 7.04

    84 84.00

    0.24

    0.10

    0.33

    0.00

    0.480.59

    1.74

  • 8/3/2019 Ken Black QA ch12

    15/32

    The observed chi-square value of 1.74 isless than the critical value of 9.4877.

    The decision is not to reject the null

    hypothesis. The data does not provideenough evidence to indicate that thedistribution of bank arrivals is Poisson.

    Calculations

    for Demonstration Problem 12.2

  • 8/3/2019 Ken Black QA ch12

    16/32

  • 8/3/2019 Ken Black QA ch12

    17/32

    Using a 2 Goodness-of-Fit Testto Test a Population Proportion

    .08:H

    .08=:

    ap

    pHo

    .

    .. ,

    05

    1

    2 1 0

    1

    384105 1

    2

    df k c

    If reject H .

    If do not reject H .

    Cal

    2

    o

    Cal

    2

    o

    3841

    3841

    . ,

    . ,

  • 8/3/2019 Ken Black QA ch12

    18/32

    Using a 2 Goodness-of-Fit Test to Testa Population Proportion: Calculations

    fo feDefects 33 16

    Nondefects 167 184

    200 200n =

    184

    92.200

    1

    16

    08.200

    f

    f

    f

    f

    e

    e

    e

    e

    PnNondef ects

    PnDef ects

    6332.19

    5707.10625.18

    184

    )184167(

    16

    )1633( 22

    2

    02

    e

    e

    f

    ff

  • 8/3/2019 Ken Black QA ch12

    19/32

    The observed chi-square value of 19.63 isgreater than the critical value of 3.8415.

    The decision is to reject the nullhypothesis. The data does provideenough evidence to indicate that themanufacturer does not produce 8% ofdefective items.

    Observing the actual sample result, in

    which 0.165 of the sample was defective,indicates that the proportion of thepopulation that is defective might begreater than 8%.

    Using a 2 Goodness-of-Fit Test toTest a Population Proportion

  • 8/3/2019 Ken Black QA ch12

    20/32

    Using a 2 Goodness-of-Fit Testto Test a Population Proportion

    MINITAB Solution

  • 8/3/2019 Ken Black QA ch12

    21/32

    2 Test of IndependenceUsed to analyze the frequencies of two

    variables with multiple categories todetermine whether the two variables

    are independent.

    Qualitative Variables

    Nominal Data

  • 8/3/2019 Ken Black QA ch12

    22/32

    2 Test of Independence: Investment Example

    In whichregion of the country do you reside?A. Northeast B. Midwest C. South D. West Whichtype of financial investment are you most likely to

    make today?E. Stocks F. Bonds G. Treasury bills

    Type of financialInvestment

    E F G

    A O13 nAGeographic B nBRegion C nC

    D nDnE nF nG N

    Contingency Table

  • 8/3/2019 Ken Black QA ch12

    23/32

    2 Test of Independence: Investment Example

    Type of FinancialInvestment

    E F G

    A e12 nA

    Geographic B nBRegion C nC

    D nDnE nF nG N

    Contingency Table

    If A and F are independent,

    P A F P A P F

    P AN

    P FN

    P A FN N

    A F

    A F

    n n

    n n

    AF

    A F

    A F

    en n

    n n

    N P A F

    NN N

    N

  • 8/3/2019 Ken Black QA ch12

    24/32

    2 Test of Independence: Formulas

    ij

    i j

    en n

    N

    where

    : i = the row

    j = the columnn

    the total of row ithe total of column j

    N = the total of all frequencies

    i

    j

    nn

    2 2 o ewhere

    f ff

    e

    : df = (r - 1)(c - 1)r = the numberr of rowsc = the numberr of columns

    ExpectedFrequencies

    Calculated (Observed )

  • 8/3/2019 Ken Black QA ch12

    25/32

    Type ofGasoline

    Income Regular PremiumExtra

    Premium

    Less than $30,000$30,000 to $49,999$50,000 to $99,000

    At least $100,000

    r = 4 c = 3

    2 Test of Independence: GasolinePreference Versus Income Category

    incomeoftindependen

    notisgasolineofType:H

    incomeoftindependen

    isgasolineofType:

    a

    oH

    .

    .. ,

    01

    1 1

    4 1 3 1

    6

    1681201 6

    2

    df r c

    If reject H .

    If do not reject H .

    Cal

    2o

    Cal

    2

    o

    16812

    16812

    . ,

    . ,

  • 8/3/2019 Ken Black QA ch12

    26/32

    Gasoline Preference Versus Income

    Category: Observed Frequencies

    Type of

    Gasoline

    Income Regular PremiumExtra

    Premium

    Less than $30,000 85 16 6 107

    $30,000 to $49,999 102 27 13 142

    $50,000 to $99,000 36 22 15 73

    At least $100,000 15 23 25 63238 88 59 385

  • 8/3/2019 Ken Black QA ch12

    27/32

    Gasoline Preference Versus Income

    Category: Expected Frequencies

    Type ofGasoline

    Income Regular Premium

    Extra

    PremiumLess than $30,000 (66.15) (24.46) (16.40)

    85 16 6 107

    $30,000 to $49,999 (87.78) (32.46) (21.76)

    102 27 13 142

    $50,000 to $99,000 (45.13) (16.69) (11.19)

    36 22 15 73

    At least $100,000 (38.95) (14.40) (9.65)

    15 23 25 63

    238 88 59 385

    ij

    i j

    en n

    e

    e

    e

    N

    11

    12

    13

    107 238385

    66 15

    107 88

    385

    24 46107 59

    385

    16 40

    .

    .

    .

  • 8/3/2019 Ken Black QA ch12

    28/32

    2

    2

    88 66 15 16 24 46 6 16 40

    102 87 78 27 32 46 13 21 76

    36 45 13 22 16 69 15 11 19

    15 38 95 23 14 40 25 9 65

    66 15 24 46 16 40

    87 78 32 46 21 76

    45 13 16 69 11 19

    38 95 14 40 9 6570 78

    o ef f

    fe

    2 2 2

    2 2 2

    2 2 2

    2 2 2

    . . .

    . . .

    . . .

    . . .

    . . .

    . . .

    . . .

    . . ..

    Gasoline Preference Versus Income

    Category: 2 Calculation

  • 8/3/2019 Ken Black QA ch12

    29/32

  • 8/3/2019 Ken Black QA ch12

    30/32

    Gasoline Preference Versus Income

    Category: 2 Calculation

  • 8/3/2019 Ken Black QA ch12

    31/32

    Gasoline Preference Versus Income

    Category: MINITAB Output

  • 8/3/2019 Ken Black QA ch12

    32/32

    Copyright 2008 John Wiley & Sons, Inc.All rights reserved. Reproduction or translation

    of this work beyond that permitted in section 117of the 1976 United States Copyright Act without

    express permission of the copyright owner isunlawful. Request for further information shouldbe addressed to the Permissions Department, JohnWiley & Sons, Inc. The purchaser may makeback-up copies for his/her own use only and notfor distribution or resale. The Publisher assumesno responsibility for errors, omissions, or damagescaused by the use of these programs or from theuse of the information herein.