Docsity

Elementary Statistics: Understanding ANOVA for Categorical and Quantitative Variables - Pr, Study notes of Data Analysis & Statistical Methods

Toggle sidebar
bg1
(C) 2007 Nancy Pfenning
Elementary Statistics: Looking at the Big Picture 1
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture
Lecture 31
Categorical & Quantitative Variable
More About ANOVA
ANOVA: Hypotheses, Table, Test Stat, P-value
1st Step in Practice: Displays, Summaries
ANOVA Output
Guidelines for Use of ANOVA
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31.2
Looking Back: Review
4 Stages of Statistics
Data Production (discuss ed in Lectures 1-4)
Displaying and Summari zing (Lectures 5-12)
Probability (discussed in Lectures 13-20)
Statistical Inference
1 categorical (discussed in Le ctures 21-23)
1 quantitative (discussed in Le ctures 24-27)
cat and quan: paired, 2-samp le, several-sample
2 categorical
2 quantitative
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31.3
Inference Methods for CQ (Review)
Paired: reduces to 1-sample t
Focused on mean of diff erences
Two-Sample: 2-sample t (similar to 1-sample t)
Focused on difference be tween means
Several-Sample: F distribution
Focus on differenc e among means
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31.4
Inference for Relationship (Review)
and about variables: not related or related
Applies to all three CQ , CC, QQ
and about parameters: equality or not
CQ: pop means e qual? (or mean=0? fo r paired)
CC: pop proportions equal?
QQ: pop slope equa ls zero?
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Elementary Statistics: Understanding ANOVA for Categorical and Quantitative Variables - Pr and more Study notes Data Analysis & Statistical Methods in PDF only on Docsity!

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture

Lecture 31

Categorical & Quantitative Variable

More About ANOVA

ANOVA: Hypotheses, Table, Test Stat, P -value  1 st^ Step in Practice: Displays, Summaries ANOVA Output Guidelines for Use of ANOVA (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 2

Looking Back: Review

4 Stages of Statistics  Data Production (discussed in Lectures 1-4)  Displaying and Summarizing (Lectures 5-12)  Probability (discussed in Lectures 13-20)  Statistical Inference  1 categorical (discussed in Lectures 21-23)  1 quantitative (discussed in Lectures 24-27)  cat and quan: paired, 2-sample, several-sample  2 categorical  2 quantitative (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 3

Inference Methods for CQ (Review)

 Paired: reduces to 1-sample t  Focused on mean of differences  Two-Sample: 2-sample t (similar to 1-sample t )  Focused on difference between means  Several-Sample: F distribution  Focus on difference among means (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 4

Inference for Relationship (Review)

 and about variables: not related or related  Applies to all three CQ, CC, QQ  and about parameters: equality or not  CQ: pop means equal? (or mean=0? for paired)  CC: pop proportions equal?  QQ: pop slope equals zero?

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 5

ANOVA Null and Alternative Hypotheses

: explanatory C & response Q not related

 Equivalently,

(difference among sample means just chance)

: explanatory C & response Q are related

 Equivalently, : not all the are equal

(difference too extreme to be due to chance)

Depending on formulation, the word “not”

appears in Ho or Ha.

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 6

Example: How to Refute a Claim about “All”

Background : Reader asked medical advice columnist: “Dear Doctor, does everyone with Parkinson’s disease shake?” and doctor replied: All patients with Parkinson’s disease do not shake.Question: Is this what the doctor meant to say? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 8

Example: How to Refute a Claim about “All”

Background : Reader asked medical advice columnist: “Dear Doctor, does everyone with Parkinson’s disease shake?” and doctor replied: All patients with Parkinson’s disease do not shake.Response: No. He meant


(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 9

Example: ANOVA Alternative Hypothesis

Background : Null hypothesis to test for relationship between race (3 groups) and earnings:  Question: Is this the correct alternative?

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 15

ANOVA Table

 Organizes calculations

 “Source” refers to source of variation  DF: use I = no. of groups, N = total sample size  DFG = I – 1  DFE = N - I (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 16

ANOVA Table

 Organizes calculations

 “Source” refers to source of variation  DF: use I = no. of groups, N = total sample size  SSG measures overall variation among groups  SSE measures overall variation within groups SSG and SSE tedious to calculate; other table entries straightforward, except for P -value (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 17

ANOVA Table

 Organizes calculations

 “Source” refers to source of variation  DF: use I = no. of groups, N = total sample size  SSG measures overall variation among groups  SSE measures overall variation within groups  Mean Sums: Divide Sums by DFs  F : Take quotient of MSG and MSE  P -value: Found with software or tables (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 18

Example: Key ANOVA Values

Background : Compare mileages for 8 sedans, 8 minivans, 12 SUVs; find SSG=42.0, SSE=181.4.  Question: What are the following values for table?  DFGDFEMSGMSEF

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 20

Example: Key ANOVA Values

Background : Compare mileages for 8 sedans, 8 minivans, 12 SUVs; find SSG=42.0, SSE=181.4.  Response:DFG = 3 – 1 =  DFE= N – I = (8+8+12) – 3 =  MSG= SSG/DFG=42/2=  MSE =SSE/DFE=181.4/25=  F =MSG/MSE=21/7.256= (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 21

Example: Completing ANOVA Table

Background : Found these values for ANOVA:  DFG =3-1= 2  DFE= N - I =(8+8+12)-3= 25  MSG= SSG/DFG=42/2= 21  MSE =SSE/DFE=181.4/25= 7.  F =MSG/MSE=21/7.256= 2.  Question: Complete ANOVA table? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 23

Example: Completing ANOVA Table

Background : Found these values for ANOVA:  DFG =3-1= 2  DFE= N - I =(8+8+12)-3= 25  MSG= SSG/DFG=42/2= 21  MSE =SSE/DFE=181.4/25= 7.  F =MSG/MSE=21/7.256= 2.  Response: (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 24

ANOVA F Statistic and P -Value

 Sample means very different

F large

P -value small

Reject claim of equal population means.

 Sample means relatively close

F not large

P -value not small

Believe claim of equal population means.

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 31

Example: Examining Summaries

Background : For all students at a university, are Math SATs related to what year they’re in?  Response: Means decrease by about ______ points for each successive year 1 to 4. Standard deviations are around ___, and sample sizes are ___________. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 32

Example: ANOVA Output

Background : For all students at a university, are Math SATs related to what year they’re in?  Question: What does the output suggest? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 34

Example: ANOVA Output

Background : For all students at a university, are Math SATs related to what year they’re in?  Response: Test ___________________________ P -value =0.004. Small? _____ Reject? _____ Conclude all 5 population means are equal? _____ Year and Math SAT score related in pop?______ (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 35

How Large is “Large” F (Review)

Particular F dist determined by DFG, DFE (these determined by sample size, number of groups) P -value in software output lets us know if F is large. P -val=0.004 F =3.87 is large (in given situation)

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 36

Example: ANOVA Output (Continued)

Response: Test P -value is 0.004, very small, so reject. Conclude not all 5 population means are equal Year apparently plays a role in Math SAT score.

What about Data Production issues?

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 37

Guidelines for Use of ANOVA Procedure

 Need random samples taken independently from several populations.  Confounding variables should be separated out.  Sample sizes must be large enough to offset non- normality of distributions.  Need populations at least 10 times sample sizes.  Population variances must be equal. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 38

Pooled Two-Sample t Procedure (Review)

If we can assume , standardized difference between sample means follows a pooled t distribution.  Some apply Rule of Thumb: use pooled t if larger sample s.d. not more than twice smaller. The F distribution is in a sense “pooled”: our standardized statistic only follows the F distribution if population variances are equal (same as equal s.d.s) (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 39

Example: Checking Standard Deviations

Background : For all students at a university, are Math SATs related to what year they’re in?  Question: Is it safe to assume equal population variances?

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 46

Example: Considering Data Production

Background : F test found evidence of relationship between Math SAT and year ( P -value 0.004), but not Verbal SAT and year ( P -value 0.357).  Question: Keeping in mind that sample consisted of students in various years taking an introductory statistics class, are there any concerns about bias or confounding variables? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L31. 47

Example: Considering Data Production

Background : F test found evidence of relationship between Math SAT and year ( P -value 0.004), but not Verbal SAT and year ( P -value 0.357).  Response: Students taking an introductory statistics class are not necessarily representative of the larger population of students in terms of the relationship between year and Math SAT. Students who are “quantitatively challenged” may postpone their statistics requirement; those who are good in Math may tend to take it as freshmen. On the other hand, verbal ability would tend not to be an issue. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L19. 48

Lecture Summary

(Inference for Cat  Quan; More About ANOVA)

 ANOVA for several-sample inference  Formulating hypotheses correctly  ANOVA table  F statistic and P -value  1 st^ step in practice: displays and summaries  Side-by-side boxplots  Compare means, look at sds and sample sizes  ANOVA output  Guidelines for use of ANOVA