URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State...

28
URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, & 11 of Neil Salkind’s Statistics for People who (Think They) Hate Statistics )

Transcript of URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State...

Page 1: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

URBP 204A QUANTITATIVE METHODS I

Statistical Analysis Lecture III

Gregory NewmarkSan Jose State University

(This lecture accords with Chapters 9,10, & 11 of Neil Salkind’sStatistics for People who (Think They) Hate Statistics)

Page 2: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Statistical Significance Revisited

• Steps:– State hypothesis– Set significance level associated with null

hypothesis– Select statistical test (we will learn these soon)– Computation of obtained test statistic value – Computation of critical test statistic value– Comparison of obtained and critical values• If obtained > critical reject the null hypothesis• If obtained < critical stick with the null hypothesis

Page 3: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Three Statistical Tests

• t-Test for Independent Samples– Tests between the means of two different groups

• t-Test for Dependent Samples– Tests between the means of two related groups

• Analysis of Variance (ANOVA)– Tests between means of more than two groups

Page 4: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Tests General Points

• Used for comparing sample means when population’s standard deviation is unknown (which is almost always)

• Accounts for the number of observations• Distribution of t-statistic is identical to normal

distribution when sample sizes exceed 120

Page 5: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Tests General Points

Page 6: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Independent Samples• Compares observations of a single variable

between two groups that are independent• Examples:– “Are there differences in TV exposure between

teens in Oakland and San Francisco?”– “We are going to take 100 people and give 50 of

them $2 and see which group is happier.”– “In 2008, did the average visitor spend less time at

the art museum than at the planetarium?”– “Do people in San Jose make different amounts of

monthly transit trips than folks in San Francisco?”

Page 7: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Independent Samples

• Example:– “Do people in San Jose make different amounts of

monthly transit trips than folks in San Francisco?”

• Steps:– State hypotheses• Null : H0 : µTrips San Jose = µTrips San Francisco

• Research : H1 : XbarTrips San Jose ≠ XbarTrips San Francisco

– Set significance level• Level of risk of Type I Error = 5% • Level of Significance (p) = 0.05

Page 8: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Independent Samples

• Steps (Continued)– Select statistical test• t-Test of Independent Samples

– Computation of obtained test statistic value • Insert obtained data into appropriate formula• (SPSS can expedite this step for us)

Page 9: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Independent Samples• Formula

• Where– Xbar is the mean– n is the number of participants– s is the standard deviation– Subscripts distinguish between Groups 1 and 2

Page 10: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Independent Samples

• Data

San Jose San FranciscoMean = 5.43 Mean = 5.53n = 30 n = 30s = 3.42 s = 2.06

Trips San Jose Trips San Francisco

7 8 6 4 2 5 8 5 5 6

3 5 10 3 5 4 8 4 6 2

3 8 10 5 2 4 9 4 4 8

2 5 5 7 12 5 8 6 3 9

3 5 1 1 15 5 3 7 2 7

8 4 1 9 4 7 2 7 7 6

Page 11: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Independent Samples

• Steps (Continued)– Computation of obtained test statistic value • tobtained = -0.14

• (don’t worry about the sign here)

– Computation of critical test statistic value• Value needed to reject null hypothesis• Look up p = 0.05 in t table• Consider degrees of freedom [df= n1 + n2 – 2]

• Consider number of tails (is there directionality?)• tcritical = 2.001

Page 12: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Independent Samples

• Steps (Continued)– Comparison of obtained and critical values• If obtained > critical reject the null hypothesis• If obtained < critical stick with the null hypothesis• tobtained = |-0.14| < tcritical = 2.001

– Therefore, we cannot reject the null hypothesis and we thus conclude that there are no differences in the mean transit trips per month between people in San Jose and San Francisco

Page 13: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Dependent Samples• Compares observations of a single variable

between one group at two time periods • Examples:– “Does watching this movie make audiences feel

happier?”– “Does a certain curriculum initiative improve

student test results?”– “Do people make more transit trips with the

extension of a BART line to their neighborhood?”– “Does sensitivity training make people more

sensitive?”

Page 14: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Dependent Samples

• Example:– “Does sensitivity training make people more

sensitive?”

• Steps:– State hypotheses• Null : H0 : µbefore training = µafter training

• Research : H1 : Xbarbefore training < Xbarafter training

– Set significance level• Level of risk of Type I Error = 5% • Level of Significance (p) = 0.05

Page 15: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Dependent Samples

• Steps:– Select statistical test• t-Test of Dependent Samples

– Computation of obtained test statistic value • Insert obtained data into appropriate formula• (SPSS can expedite this step for us)

Page 16: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Dependent Samples

• Formula

Page 17: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Dependent SamplesSubject Before After Difference Difference2

1 3 7 4 16

2 5 8 3 9

3 4 6 2 4

4 6 7 1 1

5 5 8 3 9

6 5 9 4 16

7 4 6 2 4

8 5 6 1 1

9 3 7 4 16

10 6 8 2 4

11 7 8 1 1

12 8 7 -1 1

Sum 61 87 26 82

Page 18: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Dependent Samples

• Steps (Continued)– Computation of obtained test statistic value • tobtained = 4.91

• (don’t worry about the sign here)

– Computation of critical test statistic value• Value needed to reject null hypothesis• Look up p = 0.05 in t table• Consider degrees of freedom [df = n -1 ]• Consider number of tails (is there directionality?)• tcritical = 1.80

Page 19: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

t-Test of Dependent Samples

• Steps (Continued)– Comparison of obtained and critical values• If obtained > critical reject the null hypothesis• If obtained < critical stick with the null hypothesis• tobtained = |4.91| > tcritical = 1.80

– Therefore, we reject the null hypothesis and we thus conclude that the sensitivity training works

Page 20: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Goodbye, t-Tests. Hello, ANOVA.

Page 21: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Simple ANOVA• Compares observations of a single variable

between multiple groups• Examples:– “Are there differences between the reading skills

of high school, college, and graduate students?”– “Does environmental knowledge vary between

people who commute by car, bus, and walking?”– “Are there wealth differences between A’s, Giants,

Dodger, and Angels fans?”– “Are there differences in the speech development

among three groups of preschoolers?”

Page 22: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Simple ANOVA• Also called One-way ANOVA• Compares means of more than two groups on one

factor or dimension with F statistic• Calculated as a ratio of the amount of variability

between groups (due to the grouping factor) to the amount of variability within groups (due to chance)– F = Variability between different Groups

Variability within each Group– As this ratio exceeds one it is more likely to be due to

something other than chance• No directionality, therefore no issue of tails

Page 23: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Simple ANOVA

• Example:– “Are there differences in the speech development

among three groups of preschoolers?”• Steps:– State hypotheses• Null : H0 : µgroup 1 = µgroup 2 = µgroup 3

• Research : H1 : Xbargroup 1 ≠ Xbargroup 2 ≠ Xbargroup 3

– Set significance level• Level of risk of Type I Error = 5% • Level of Significance (p) = 0.05

Page 24: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Simple ANOVA

• Steps:– Select statistical test• Simple ANOVA

– Computation of obtained test statistic value • Insert obtained data into appropriate formula• (SPSS can expedite this step for us)

Page 25: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Simple ANOVA

• Formula

casesNgroupskWhenkN

SumSquaresk

SumSquares

aresMeanSumSqu

aresMeanSumSquF

within

between

within

between

;:

1

Page 26: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Simple ANOVA

• Fobtained = 65.31

• Degrees of Freedom– Numerator = 2– Denominator = 27

Data Group 1

Group 2

Group 3

3 2 1

4 3 1

5 2 1

5 3 1

5 2 1

4 1 1

4 1 1

3 1 1

4 1 1

5 1 1

n 10 10 10

Sum 42 17 10

Mean 4.2 1.7 1.0

Page 27: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Simple ANOVA

• Steps (Continued)– Computation of obtained test statistic value • Fobtained = 65.31

– Computation of critical test statistic value• Value needed to reject null hypothesis• Look up p = 0.05 in F table• Consider degrees of freedom for numerator and

denominator• No need to worry about number of tails• Fcritical = 3.36

Page 28: URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture III Gregory Newmark San Jose State University (This lecture accords with Chapters 9,10, &

Simple ANOVA

• Steps (Continued)– Comparison of obtained and critical values• If obtained > critical reject the null hypothesis• If obtained < critical stick with the null hypothesis• Fobtained = 65.31 > Fcritical = 3.36

– Therefore, we reject the null hypothesis and we thus conclude that there are differences in the speech abilities of the students in the preschools.