Categorical Data Analysis - PowerPoint PPT Presentation

1 / 71
About This Presentation
Title:

Categorical Data Analysis

Description:

Test of Independence Contingency Table ... 1. Statistical Independence Means Joint Probability Equals Product of Marginal Probabilities ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 72
Provided by: johnj178
Category:

less

Transcript and Presenter's Notes

Title: Categorical Data Analysis


1
Chapter 13
  • Categorical Data Analysis

2
Learning Objectives
  • 1. Explain ?2 Test for Proportions
  • 2. Explain ?2 Test of Independence
  • 3. Solve Hypothesis Testing Problems
  • Two or More Population Proportions
  • Independence

3
Data Types
4
Qualitative Data
  • 1. Qualitative Random Variables Yield Responses
    That Classify
  • Example Gender (Male, Female)
  • 2. Measurement Reflects in Category
  • 3. Nominal or Ordinal Scale
  • 4. Examples
  • Do You Own Savings Bonds?
  • Do You Live On-Campus or Off-Campus?

5
Hypothesis Tests Qualitative Data
6
Chi-Square (?2) Test for k Proportions
7
Hypothesis Tests Qualitative Data
8
Chi-Square (?2) Test for k Proportions
  • 1. Tests Equality () of Proportions Only
  • Example p1 .2, p2.3, p3 .5
  • 2. One Variable With Several Levels
  • 3. Assumptions
  • Multinomial Experiment
  • Large Sample Size
  • All Expected Counts ? 5
  • 4. Uses One-Way Contingency Table

9
Multinomial Experiment
  • 1. n Identical Trials
  • 2. k Outcomes to Each Trial
  • 3. Constant Outcome Probability, pk
  • 4. Independent Trials
  • 5. Random Variable is Count, nk
  • 6. Example Ask 100 People (n) Which of 3
    Candidates (k) They Will Vote For

10
One-Way Contingency Table
  • 1. Shows Observations in k Independent Groups
    (Outcomes or Variable Levels)

11
One-Way Contingency Table
  • 1. Shows Observations in k Independent Groups
    (Outcomes or Variable Levels)

Outcomes (k 3)
Number of responses
12
?2 Test for k Proportions Hypotheses Statistic
13
?2 Test for k Proportions Hypotheses Statistic
Hypothesized probability
  • 1. Hypotheses
  • H0 p1 p1,0, p2 p2,0, ..., pk pk,0
  • Ha Not all pi are equal

14
?2 Test for k Proportions Hypotheses Statistic
Hypothesized probability
  • 1. Hypotheses
  • H0 p1 p1,0, p2 p2,0, ..., pk pk,0
  • Ha Not all pi are equal
  • 2. Test Statistic

Observed count
Expected count
15
?2 Test for k Proportions Hypotheses Statistic
Hypothesized probability
  • 1. Hypotheses
  • H0 p1 p1,0, p2 p2,0, ..., pk pk,0
  • Ha Not all pi are equal
  • 2. Test Statistic
  • 3. Degrees of Freedom k - 1

Observed count
Expected count
Number of outcomes
16
?2 Test Basic Idea
  • 1. Compares Observed Count to Expected Count If
    Null Hypothesis Is True
  • 2. Closer Observed Count to Expected Count, the
    More Likely the H0 Is True
  • Measured by Squared Difference Relative to
    Expected Count
  • Reject Large Values

17
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
18
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
?2 Table (Portion)
19
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
If ni E(ni), ?2 0. Do not reject H0
?2 Table (Portion)
20
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
If ni E(ni), ?2 0. Do not reject H0
? .05
?2 Table (Portion)
21
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
If ni E(ni), ?2 0. Do not reject H0
? .05
?2 Table (Portion)
22
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
If ni E(ni), ?2 0. Do not reject H0
? .05
?2 Table (Portion)
23
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
If ni E(ni), ?2 0. Do not reject H0
? .05
?2 Table (Portion)
24
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
If ni E(ni), ?2 0. Do not reject H0
? .05
df k - 1 2
?2 Table (Portion)
25
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
If ni E(ni), ?2 0. Do not reject H0
? .05
df k - 1 2
?2 Table (Portion)
26
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
If ni E(ni), ?2 0. Do not reject H0
? .05
df k - 1 2
?2 Table (Portion)
27
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
If ni E(ni), ?2 0. Do not reject H0
? .05
df k - 1 2
?2 Table (Portion)
28
Finding Critical Value Example
What is the critical ?2 value if k 3, ? .05?
If ni E(ni), ?2 0. Do not reject H0
? .05
df k - 1 2
?2 Table (Portion)
29
?2 Test for k Proportions Example
  • As personnel director, you want to test the
    perception of fairness of three methods of
    performance evaluation. Of 180 employees, 63
    rated Method 1 as fair. 45 rated Method 2 as
    fair. 72 rated Method 3 as fair. At the .05
    level, is there a difference in perceptions?

30
?2 Test for k Proportions Solution
31
?2 Test for k Proportions Solution
  • H0
  • Ha
  • ?
  • n1 n2 n3
  • Critical Value(s)

Test Statistic Decision Conclusion
32
?2 Test for k Proportions Solution
  • H0 p1 p2 p3 1/3
  • Ha At least 1 is different
  • ?
  • n1 n2 n3
  • Critical Value(s)

Test Statistic Decision Conclusion
33
?2 Test for k Proportions Solution
  • H0 p1 p2 p3 1/3
  • Ha At least 1 is different
  • ? .05
  • n1 63 n2 45 n3 72
  • Critical Value(s)

Test Statistic Decision Conclusion
34
?2 Test for k Proportions Solution
  • H0 p1 p2 p3 1/3
  • Ha At least 1 is different
  • ? .05
  • n1 63 n2 45 n3 72
  • Critical Value(s)

Test Statistic Decision Conclusion
? .05
35
?2 Test for k Proportions Solution
36
?2 Test for k Proportions Solution
  • H0 p1 p2 p3 1/3
  • Ha At least 1 is different
  • ? .05
  • n1 63 n2 45 n3 72
  • Critical Value(s)

Test Statistic Decision Conclusion
?2 6.3
? .05
37
?2 Test for k Proportions Solution
  • H0 p1 p2 p3 1/3
  • Ha At least 1 is different
  • ? .05
  • n1 63 n2 45 n3 72
  • Critical Value(s)

Test Statistic Decision Conclusion
?2 6.3
Reject at ? .05
? .05
38
?2 Test for k Proportions Solution
  • H0 p1 p2 p3 1/3
  • Ha At least 1 is different
  • ? .05
  • n1 63 n2 45 n3 72
  • Critical Value(s)

Test Statistic Decision Conclusion
?2 6.3
Reject at ? .05
? .05
There is evidence of a difference in proportions
39
?2 Test of Independence
40
Hypothesis Tests Qualitative Data
41
?2 Test of Independence
  • 1. Shows If a Relationship Exists Between 2
    Qualitative Variables
  • One Sample Is Drawn
  • Does Not Show Causality
  • 2. Assumptions
  • Multinomial Experiment
  • All Expected Counts ? 5
  • 3. Uses Two-Way Contingency Table

42
?2 Test of Independence Contingency Table
  • 1. Shows Observations From 1 Sample Jointly in
    2 Qualitative Variables

43
?2 Test of Independence Contingency Table
  • 1. Shows Observations From 1 Sample Jointly in
    2 Qualitative Variables

Levels of variable 2
Levels of variable 1
44
?2 Test of Independence Hypotheses Statistic
  • 1. Hypotheses
  • H0 Variables Are Independent
  • Ha Variables Are Related (Dependent)

45
?2 Test of Independence Hypotheses Statistic
  • 1. Hypotheses
  • H0 Variables Are Independent
  • Ha Variables Are Related (Dependent)
  • 2. Test Statistic

Observed count
Expected count
46
?2 Test of Independence Hypotheses Statistic
  • 1. Hypotheses
  • H0 Variables Are Independent
  • Ha Variables Are Related (Dependent)
  • 2. Test Statistic
  • Degrees of Freedom (r - 1)(c - 1)

Observed count
Expected count
Rows Columns
47
?2 Test of Independence Expected Counts
  • 1. Statistical Independence Means Joint
    Probability Equals Product of Marginal
    Probabilities
  • 2. Compute Marginal Probabilities Multiply for
    Joint Probability
  • 3. Expected Count Is Sample Size Times Joint
    Probability

48
Expected Count Example
49
Expected Count Example
50
Expected Count Example
112 160
Marginal probability
51
Expected Count Example
112 160
Marginal probability
78 160
Marginal probability
52
Expected Count Example
112 160
Marginal probability
Joint probability
78 160
Marginal probability
53
Expected Count Example
112 160
Marginal probability
Joint probability
78 160
Marginal probability
54.6
54
Expected Count Calculation
55
Expected Count Calculation
56
Expected Count Calculation
11282 160
11278 160
4878 160
4882 160
57
?2 Test of Independence Example
  • Youre a marketing research analyst. You ask a
    random sample of 286 consumers if they purchase
    Diet Pepsi or Diet Coke. At the .05 level, is
    there evidence of a relationship?

58
?2 Test of Independence Solution
59
?2 Test of Independence Solution
  • H0
  • Ha
  • ?
  • df
  • Critical Value(s)

Test Statistic Decision Conclusion
60
?2 Test of Independence Solution
  • H0 No Relationship
  • Ha Relationship
  • ?
  • df
  • Critical Value(s)

Test Statistic Decision Conclusion
61
?2 Test of Independence Solution
  • H0 No Relationship
  • Ha Relationship
  • ? .05
  • df (2 - 1)(2 - 1) 1
  • Critical Value(s)

Test Statistic Decision Conclusion
62
?2 Test of Independence Solution
  • H0 No Relationship
  • Ha Relationship
  • ? .05
  • df (2 - 1)(2 - 1) 1
  • Critical Value(s)

Test Statistic Decision Conclusion
? .05
63
?2 Test of Independence Solution
?
E(nij) ? 5 in all cells
116132 286
154132 286
170132 286
170154 286
64
?2 Test of Independence Solution
65
?2 Test of Independence Solution
  • H0 No Relationship
  • Ha Relationship
  • ? .05
  • df (2 - 1)(2 - 1) 1
  • Critical Value(s)

Test Statistic Decision Conclusion
?2 54.29
? .05
66
?2 Test of Independence Solution
  • H0 No Relationship
  • Ha Relationship
  • ? .05
  • df (2 - 1)(2 - 1) 1
  • Critical Value(s)

Test Statistic Decision Conclusion
?2 54.29
Reject at ? .05
? .05
67
?2 Test of Independence Solution
  • H0 No Relationship
  • Ha Relationship
  • ? .05
  • df (2 - 1)(2 - 1) 1
  • Critical Value(s)

Test Statistic Decision Conclusion
?2 54.29
Reject at ? .05
? .05
There is evidence of a relationship
68
Siskel and Ebert
  • Ebert
  • Siskel Con Mix Pro
    Total
  • ------------------------------------------------
    ------
  • Con 24 8 13
    45
  • Mix 8 13 11
    32
  • Pro 10 9 64
    83
  • ------------------------------------------------
    ------
  • Total 42 30 88
    160

69
Siskel and Ebert
  • Ebert
  • Siskel Con Mix Pro
    Total
  • ------------------------------------------------
    ------
  • Con 24 8 13
    45
  • 11.8 8.4 24.8
    45.0
  • ------------------------------------------------
    ------
  • Mix 8 13 11
    32
  • 8.4 6.0 17.6
    32.0
  • ------------------------------------------------
    ------
  • Pro 10 9 64
    83
  • 21.8 15.6 45.6
    83.0
  • ------------------------------------------------
    ------
  • Total 42 30 88
    160
  • 42.0 30.0 88.0
    160.0
  • Pearson chi2(4) 45.3569 p lt 0.001

70
Conclusion
  • 1. Explained ?2 Test for Proportions
  • 2. Explained ?2 Test of Independence
  • 3. Solved Hypothesis Testing Problems
  • Two or More Population Proportions
  • Independence

71
End of Chapter
Any blank slides that follow are blank
intentionally.
Write a Comment
User Comments (0)
About PowerShow.com