Presentation is loading. Please wait.

Presentation is loading. Please wait.

URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture IV Gregory Newmark San Jose State University (This lecture is based on Chapters 5,12,13,

Similar presentations


Presentation on theme: "URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture IV Gregory Newmark San Jose State University (This lecture is based on Chapters 5,12,13,"— Presentation transcript:

1 URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture IV Gregory Newmark San Jose State University (This lecture is based on Chapters 5,12,13, & 15 of Neil Salkind’s Statistics for People who (Think They) Hate Statistics, 2 nd Edition which is also the source of many of the offered examples. All cartoons are from CAUSEweb.org by J.B. Landers.)

2 More Statistical Tests Factorial Analysis of Variance (ANOVA) – Tests between means of more than two groups for two or more factors (independent variables) Correlation Coefficient – Tests the association between two variables One Sample Chi-Square (χ 2 ) – Tests if an observed distribution of frequencies for one factor is what one would expect by chance Two Factor Chi-Square (χ 2 ) – Tests if an observed distribution of frequencies for two factors is what one would expect by chance

3 Factorial ANOVA Compares observations of a single variable among two or more groups which incorporate two or more factors. Examples: – Reading Skills School (Elementary, Middle, High) Academic Philosophy (Montessori, Waldorf) – Environmental Knowledge Commute Mode (Car, Bus, Walking) Age (Under 40, 40+) – Wealth Favorite Team (A’s, Giants, Dodger, Angels) Home Location (Oakland, SF, LA) – Weight Loss Gender (Male, Female) Exercise (Biking, Running)

4 Factorial ANOVA Two Types of Effects – Main Effects: differences within one factor – Interaction Effects: differences across factors Example: – Weight Loss Gender (Male, Female) Exercise (Biking, Running) – Main Effects: Does weight loss vary by exercise? Does weight loss vary by gender? – Interaction Effects: Does weight loss due to exercise vary by gender?

5 Factorial ANOVA Example: – “How is weight loss affected by exercise program and gender?” Steps: – State hypotheses Null : H 0 : µ Male = µ Female H 0 : µ Biking = µ Running H 0 : µ Male-Biking = µ Female-Biking = µ Male-Running = µ Female-Running Research : What would these three be?

6 Factorial ANOVA Steps (Continued): – Set significance level Level of risk of Type I Error = 5% Level of Significance (p) = 0.05 – Select statistical test Factorial ANOVA – Computation of obtained test statistic value Insert obtained data into appropriate formula (SPSS can expedite this step for us)

7 Factorial ANOVA Weight Loss Data Male-BikingMale-RunningFemale-BikingFemale-Running 768865 78769067 76 6567 76 9087 76566578 74769056 74769054 76987956 76887054 55789056

8 Factorial ANOVA SPSS Outputs =p

9 Factorial ANOVA SPSS Outputs

10 Factorial ANOVA SPSS Outputs – Graph them!

11 Factorial ANOVA Steps (Continued) – Computation of obtained test statistic value ExerciseF = 2.444, p = 0.127 Gender F = 1.908, p = 0.176 InteractionF = 9.683, p = 0.004 – Look up the critical F score df numerator = # of Factors – 1 df denominator = # of Observations – # of Groups What is the critical F score? – Comparison of obtained and critical values If obtained > critical reject the null hypothesis If obtained < critical stick with the null hypothesis

12 Factorial ANOVA Steps (Continued) – Therefore we reject the null hypothesis for the interaction effects. This means that while choice of exercise alone and gender alone make no difference to weight loss, in combination they do differentially affect weight loss. Men should run and women should bike, according to these data.

13 Correlation Coefficient Tests whether changes in two variables are related Examples – “Are property values positively related to distance from waste dumps?” – “Is age correlated with height for minors?” – “Are apartment rents negatively related to commute time?” – “Does someone’s height relate to income?” – “How related are hand size and height?”

14 Correlation Coefficient Are Tastiness and Ease correlated for fruit? Is there directionality?

15 Correlation Coefficient Numeric index that reflects the linear relationship between two variables (bivariate correlation) – “How does the value of one variable change when another variable changes?” – Each case has two data points: E.g. This study records each persons height and weight to see if they are correlated. – Ranges from -1.0 to +1.0 – Two types of possible correlations Change in the same direction : positive or direct correlation Change in opposite directions: negative or indirect correlation – Absolute value reflects strength of correlation Pearson Product-Moment Correlation – Both variables need to be ratio or interval

16 Correlation Coefficient Scatterplot

17 Correlation Coefficient Coefficient of Determination – Squaring the correlation coefficient (r 2 ) – The percentage of variance in one variable that is accounted for by the variance in another variable Example: GPA and Time Spent Studying – [r GPA and Study Time = 0.70]; [r 2 GPA and Study Time = 0.49] 49% of the variance in GPA can be explained by the variance in studying time GPA and studying time share 49% of the variance between themselves

18 Correlation Coefficient Example – “How related are hand size and height?” Steps – State hypotheses Null : H 0 : ρ Hand Size and Height = 0 Research: H 1 : r Hand Size and Height ≠ 0 – Non-directional – Set significance level Level of risk of Type I Error = 5% Level of Significance (p) = 0.05

19 Correlation Coefficient Steps (Continued) – Select statistical test Correlation Coefficient (it is the test statistic!) – Computation of obtained test statistic value Insert obtained data into appropriate formula

20 Correlation Coefficient Plot the data: n = 30

21 Correlation Coefficient Steps (Continued) – Computation of obtained test statistic value r Hand Size and Height = 0.736 Correlations HeightHand Height Pearson Correlation 1.736 ** Sig. (2-tailed).000 N30 Hand Pearson Correlation.736 ** 1 Sig. (2-tailed).000 N30 **. Correlation is significant at the 0.01 level (2-tailed).

22 Correlation Coefficient Steps (Continued) – Computation of critical test statistic value Value needed to reject null hypothesis Look up p = 0.05 in critical value table Consider degrees of freedom [df= n – 2] Consider number of tails (is there directionality?) r critical = ?

23 Correlation Coefficient What happens to the critical score when the number of cases (n) decreases? Why?

24 Correlation Coefficient Steps (Continued) – Comparison of obtained and critical values If obtained > critical reject the null hypothesis If obtained < critical stick with the null hypothesis r obtained = 0.736 > r critical = 0.349 – Therefore, we reject the null hypothesis and accept the research hypothesis that height and handbreadth are correlated. Is there a directionality to that correlation?

25 Correlation Coefficient Significance vs. Meaning – Rules of Thumb r = 0.8 to 1.0Very strong relationship r = 0.6 to 0.8Strong relationship r = 0.4 to 0.6Moderate relationship r = 0.2 to 0.4Weak relationship r = 0.0 to 0.2Weak or no relationship

26 Correlation Coefficient Does correlation express causation? Classic Example: – Ice Cream Eaten – Crimes Committed

27 Correlation Coefficient Correlation expresses association only

28 Chi-Square (χ 2 ) Non-Parametric Test – Does not rely on a given distribution Useful for small sample sizes – Enables consideration of data that comes as ordinal or nominal frequencies Number of children in different grades Percentage of people by state receiving social security

29 One Sample Chi-Square (χ 2 ) Tests whether an observed distribution of frequencies for one factor is likely to have occurred by chance Examples: – “Is this community evenly distributed among ethnic groups?” – “Are the 31 ice cream flavors at Baskin Robbins equally purchased?” – “Are commuting mode shares evenly spread out?” – “Did people report equal preferences for a school voucher policy?”

30 One Sample Chi-Square (χ 2 ) Examples: – “Did people report equal preferences for a school voucher policy?” – Data (90 People split into 3 Categories) For23 Maybe 17 Against50 – Always try to have at least 5 responses per category

31 One Sample Chi-Square (χ 2 ) Steps: – State hypotheses Null : H 0 : Proportion For = Proportion Maybe = Proportion Against Research : H 1 : Proportion For ≠ Proportion Maybe ≠ Proportion Against – Set significance level Level of risk of Type I Error = 5% Level of Significance (p) = 0.05 – Select statistical test Chi-Square (χ 2 )

32 One Sample Chi-Square (χ 2 ) Steps (Continued): – Computation of obtained test statistic value Insert obtained data into appropriate formula (SPSS can expedite this step for us)

33 One Sample Chi-Square (χ 2 ) Steps (Continued): – Computation of obtained test statistic value CategoryOE(O-E)(O-E) 2 (O-E) 2 /E For2330-7491.63 Against1730-131695.63 Maybe50302040013.33 Total90 -- 20.59

34 One Sample Chi-Square (χ 2 ) Steps (Continued): – Computation of obtained test statistic value χ 2 obtained = 20.59 – Computation of critical test statistic value Value needed to reject null hypothesis Look up p = 0.05 in χ 2 table Consider degrees of freedom [df= # of categories - 1] χ 2 critical = 5.99

35 One Sample Chi-Square (χ 2 ) Steps (Continued): – Computation of obtained test statistic value

36 One Sample Chi-Square (χ 2 ) Steps (Continued): – Comparison of obtained and critical values If obtained > critical reject the null hypothesis If obtained < critical stick with the null hypothesis χ 2 obtained = 20.59 > χ 2 critical = 5.99 – Therefore, we can reject the null hypothesis and we thus conclude that distribution of preferences regarding the school voucher is not even.

37 Two Factor Chi-Square (χ 2 ) What if we want to see if gender effects the distribution of votes? How is this different from Factorial ANOVA?

38 Two Factor Chi-Square (χ 2 ) Steps: – State hypotheses Null : H 0 : P For*Male = P Maybe*Male = P Against *Male = P For*Female = P Maybe*Female = P Against *Female Research : H 1 : P For*Male ≠ P Maybe*Male ≠ P Against *Male ≠ P For*Female ≠ P Maybe*Female ≠ P Against *Female – Set significance level Level of risk of Type I Error = 5% Level of Significance (p) = 0.05 – Select statistical test Chi-Square (χ 2 )

39 Two Factor Chi-Square (χ 2 ) Steps (Continued): – Computation of obtained test statistic value Insert obtained data into appropriate formula Same as for One Factor Chi-Square

40 Two Factor Chi-Square (χ 2 ) How do we find the expected frequencies? – (Row Total * Column Total)/ Total Total – Expected Value [For*Male] = (23*44)/90 = 11.2

41 Two Factor Chi-Square (χ 2 ) Steps (Continued): – Computation of obtained test statistic value χ 2 obtained = 7.750

42 Two Factor Chi-Square (χ 2 ) Steps (Continued): – Computation of critical test statistic value Value needed to reject null hypothesis Look up p = 0.05 in χ 2 table Consider degrees of freedom df= (# of rows – 1) * (# of columns – 1) χ 2 critical = ?

43 Two Factor Chi-Square (χ 2 ) Steps (Continued): – Comparison of obtained and critical values If obtained > critical reject the null hypothesis If obtained < critical stick with the null hypothesis χ 2 obtained = 7.750 > χ 2 critical = 5.99 – Therefore, we can reject the null hypothesis and we thus conclude that gender affects the distribution of preferences regarding the school vouchers.

44 Tutorial Time


Download ppt "URBP 204A QUANTITATIVE METHODS I Statistical Analysis Lecture IV Gregory Newmark San Jose State University (This lecture is based on Chapters 5,12,13,"

Similar presentations


Ads by Google