Common models and contrasts. Tuesday, Lecture 2 Jeane5e Mumford University of Wisconsin - Madison

Size: px
Start display at page:

Download "Common models and contrasts. Tuesday, Lecture 2 Jeane5e Mumford University of Wisconsin - Madison"

Transcription

1 ommon models and contrasts Tuesday, Lecture Jeane5e Mumford University of Wisconsin - Madison

2 Let s set up some simple models 1-sample t-test -sample t-test With contrasts!

3 1-sample t-test Y = 0 +

4 1-sample t-test Y Y = Y N 1

5 1-sample t-test Y Y = Y N 1 Mulply out the right hand side

6 1-sample t-test Y Y = Y N 0 Mulply out the right hand side

7 1-sample t-test Y Y = Y N 0 Mulply out the right hand side

8 ut why is it the mean and not something else?

9 ut why is it the mean and not something else? ecause we re using least squares!

10 I m going to write this out

11 Two-sample t-test There are at least ways I can think of parameterizing this! Start with the easiest a person is either in group 1 or in group Y i = 1 {sub i in group 1?} + {sub i in group?} +

12 Two-sample t-test There are at least ways I can think of parameterizing this! Start with the easiest a person is either in group 1 or in group Y i = 1 G 1i + G i + group indicator variables

13 Two-sample t-test Group 1 Group 6 4 Y 1 Y Y Y 4 Y 5 Y = apple 1 +

14 Two-sample t-test Y 1 Y Y Y 4 Y 5 Y =

15 Two-sample t-test 6 4 Y 1 Y Y Y 4 Y = mean for Group 1 + mean for Group Y 6

16 Two-sample t-test (another way) Now you do it. Unwrap what this means Y i = {subject i in Group 1} +

17 ontrasts ontrasts are vectors that pull out what we d like to test Using the two sample t-test from the first example, we might test Is the mean of G1 larger than 0? Is the mean of G larger than 0? Is the mean of G1 > G?

18 General idea Take your contrast statement and get it to look like something > 0 Figure out the vector, c, such that c = something

19 6 4 Y 1 Y Y Y 4 Y 5 Is group 1 > 0? 7 5 = Y We ve already established the first beta represents group 1 s mean c = [1, 0] pulls out the first beta apple

20 6 4 Y 1 Y Y Y 4 Y 5 Is group > 0? 7 5 = Y We ve already established the second beta represents group s mean c = [0, 1] pulls out the first beta apple

21 6 4 Is group 1 > group? Y First, get something > 0 group 1 group > 0 c = [1, -1] Y 1 Y Y Y 4 Y = apple = 1 1 apple 1 1 +

22 6 4 Is group 1 > group? Y First, get something > 0 group 1 group > 0 c = [1, -1] Y 1 Y Y Y 4 Y = apple = 1 1 apple 1 1 +

23 6 4 Is group 1 > group? Y First, get something > 0 group 1 group > 0 c = [1, -1] Y 1 Y Y Y 4 Y = apple = 1 1 apple 1 1 +

24 6 4 Is group 1 > group? Y First, get something > 0 group 1 group > 0 c = [1, -1] Y 1 Y Y Y 4 Y = apple = 1 1 apple 1 1 +

25 an you do this for the second setup of the -sample t-test?

26 Take away Did you feel pre5y confident with the last example? Yes = Yay! No = Ask quesons!

27 What you re going to learn Paired t-test 1-way ANOVA with levels Detour to introduce F-tests x ANOVA Revisit mean centering

28 ut those are all group models! Time series models look very similar Just add convoluon! Doesn t really apply to paired t-test

29 Paired t-test 1-way ANOVA with levels and repeated measures Wow, sounds so fancy!

30 Paired T Test A common mistake is to use a -sample t test instead of a paired test Tire example -sample T test p=0.58 Paired T test p<0.001 Automobile Tire A Tire

31 Why so different?

32 Why so different? Mean A Mean

33 Why so different? Difference is OK

34 Why so different? Residuals are HUGE!

35 Paired T Test Adjust for the mean of each pair

36 Paired T Test Mean A Mean

37 Paired T Test Difference is same Residual variance much smaller

38 Paired T Test GLM

39 Paired T Test GLM Mean of each pair

40 Paired T Test GLM Difference Mean of each pair

41 Paired T Test GLM Difference Mean of each pair HA : A> =) HA : A >0 c = [ ]

42 Paired T Test GLM Difference Mean of each pair HA : A> =) HA : A >0 c = [ ] What if you wanted to test HA: >A?

43 SPM is slightly different A 1 1 A A A 4 4 A A = A A

44 SPM is slightly different A 1 1 A A A 4 4 A A = A A Rank deficient, but that s okay in SPM. an you construct the contrast for A>?

45 1-Way ANOVA levels asically an extended -sample t-test I will teach the cell means approach ells = ollecons of data within each factor level (or level combinaon) -level 1-way ANOVA has ** cells e.g. types of intervenon

46 1-Way ANOVA levels L1 1 L1 L1 L 1 L L L 1 L L 1 A = A 1 1 A

47 1-Way ANOVA levels L1 1 L1 L1 L 1 L L L 1 L L 1 A = an you come up with a contrast to test if L1 > L? 1 A

48 1-Way ANOVA levels L1 1 L1 L1 L 1 L L L 1 L L 1 A = an you come up with a contrast to test if average of L1 and L > L 1 A

49 General rule for contrasts I m only willing to make this claim for cell means models (what we ve been doing) Posive parts of contrast (if present) should sum to 1 Negave parts of contrast (if present) should sum to -1 For previous example, we could have used [1 1 -] Stats would have been the same, but contrast esmates would differ I ll show you on board

50 F-tests Simultaneously test mulple contrasts E.g. are any of the levels different from each other? L1 = L = L Rejecon of the null implies at least 1 difference L1&L differ or L1&L differ or L&L differ

51 F-tests Uses a contrast matrix Tips for construcng matrix Start with your alternave Get a 0 on the end of your system of equaons reak it up

52 F-tests Uses a contrast matrix Tips for construcng matrix Start with your null Get a 0 on the end of your system of equaons reak it up H0 :L1 =L =L

53 F-tests Uses a contrast matrix Tips for construcng matrix Start with your null Get a 0 on the end of your system of equaons reak it up H0 :L1 L =L L =0

54 F-tests Uses a contrast matrix Tips for construcng matrix Start with your null Get a 0 on the end of your system of equaons reak it up to get HA HA : L1 L 6= 0 or L L 6= 0

55 F-tests Uses a contrast matrix Tips for construcng matrix Start with your null Get a 0 on the end of your system of equaons reak it up to get HA reate contrast matrix HA : L1 L 6= 0 or L L 6= 0

56 F-tests Uses a contrast matrix Tips for construcng matrix Start with your null Get a 0 on the end of your system of equaons reak it up to get HA reate contrast matrix

57 T-test vs F-test T- stat using contrast c t = ˆ dvar c ˆ

58 T-test vs F-test T- stat using contrast t = c(x0 X) 1 X 0 Y p c(x0 X) 1 c 0ˆ

59 T-test vs F-test T- stat using contrast t = c(x0 X) 1 X 0 Y p c(x0 X) 1 c 0ˆ F-stat : sll has mean/variance structure but with matrices

60 T-test vs F-test T- stat using contrast t = c(x0 X) 1 X 0 Y p c(x0 X) 1 c 0ˆ F-stat : sll has mean/variance structure but with matrices f df 1,df = c 0 ˆ 0 c 0 (X 0 X) 1 crˆ 1 c 0 ˆ

61 T-test vs F-test T- stat using contrast t = c(x0 X) 1 X 0 Y p c(x0 X) 1 c 0ˆ F-stat : sll has mean/variance structure but with matrices f df 1,df = c 0 ˆ 0 c 0 (X 0 X) 1 crˆ 1 c 0 ˆ r x p contrast matrix

62 T-test vs F-test T- stat using contrast t = c(x0 X) 1 X 0 Y p c(x0 X) 1 c 0ˆ F-stat : sll has mean/variance structure but with matrices f df 1,df = c 0 ˆ 0 c 0 (X 0 X) 1 crˆ 1 c 0 ˆ r=# row in c

63 T-test vs F-test T- stat using contrast t = c(x0 X) 1 X 0 Y p c(x0 X) 1 c 0ˆ F-stat : sll has mean/variance structure but with matrices f df 1,df = c 0 ˆ 0 c 0 (X 0 X) 1 crˆ 1 c 0 ˆ df1 = r, df = N-p ~ F(df1, df)

64 T-test vs F-test T- stat using contrast t = c(x0 X) 1 X 0 Y p c(x0 X) 1 c 0ˆ F-stat : sll has mean/variance structure but with matrices f df 1,df = c 0 ˆ 0 c 0 (X 0 X) 1 crˆ 1 c 0 ˆ Does this boil down to a scalar or a matrix?

65 When an F-test is a T-test If r=1 (contrast matrix has one row) Your F-test is equivalent to a -sided t-test

66 Uses for F-test ut down on mulple comparisons Instead of running separate t-tests, you can run a single f-test If F-test is significant you can look at separate t- tests to see what s going on If F-test isn t significant, none of your separate contrasts is significant

67 Uses for F-test ut down on mulple comparisons Instead of running separate t-tests, you can run a single f-test If F-test is significant you can look at separate t- tests to see what s going on If F-test isn t significant, none of your separate contrasts is significant Or is it!?!?!

68 F-test vs T-test illustraon onsider the following F-test H0 : 1 = =0

69 F-test vs T-test illustraon onsider the following F-test H0 : 1 = =0 1 0 c = 0 1

70 F-test vs T-test illustraon onsider the following F-test H0 : 1 = =0 1 0 c = 0 1 We will compare to the separate t-tests

71 F-test vs T-test illustraon onsider the following F-test H0 : 1 = =0 1 0 c = 0 1 We will compare to the separate t-tests Hope: If the F-test is significant, at least one of the t-tests is significant

72 β β 1

73 β t-test for beta1 significant β 1

74 β t-test for beta significant β 1

75 β Outside circle, F-test is significant β 1

76 β All tests significant β 1

77 β F and t for beta1 significant β 1

78 β None significant β 1

79 β F isn t significant but t is!! β 1

80 β F is significant and t s aren t! β 1

81 Do those last cases ever really happen? Yes! That s why I looked into it J More likely to occur if you re riding the p=0.05 edge Sll not a bad idea to run F-tests

82 x ANOVA levels of gender levels of intervenon Yet another extension of the -sample t-test Just focus on the cells How many cells are there? That s how many regressors you must have

83 F, L1 1 F, L1 F, L 1 F, L F, L 1 F, L M,L1 1 M,L1 M,L 1 M,L M,L 1 M,L 1 A x ANOVA = A A onstruct the contrast for F>M

84 F, L1 1 F, L1 F, L 1 F, L F, L 1 F, L M,L1 1 M,L1 M,L 1 M,L M,L 1 M,L 1 A x ANOVA = A A How about L1 = L = L?

85 F, L1 1 F, L1 F, L 1 F, L F, L 1 F, L M,L1 1 M,L1 M,L 1 M,L M,L 1 M,L 1 A x ANOVA = A A How about the interacon?

86 x ANOVA The interacon, what does it mean? That males and females differ for at least one level No interacon L1 L L

87 x ANOVA The interacon, what does it mean? That males and females differ for at least one level Interacon L1 L L

88 x ANOVA The interacon, what does it mean? That males and females differ for at least one level (there are mulple ways this can occur) Interacon L1 L L

89 x ANOVA What does the null look like? M-F differences the same for all levels

90 x ANOVA What does the null look like? M-F differences the same for all levels H0 :F, L1 M,L1 =F, L M,L =F, L M,L

91 x ANOVA What does the null look like? M-F differences the same for all levels H0 :F, L1 M,L1 =F, L M,L =F, L M,L What is this in terms of the betas??

92 x ANOVA What does the null look like? M-F differences the same for all levels H0 :F, L1 M,L1 =F, L M,L =F, L M,L Get zero on end and split to get HA HA :( 1 4 ) ( 6 ) 6= 0 or ( 5 ) ( 6 ) 6= 0

93 x ANOVA What does the null look like? M-F differences the same for all levels H0 :F, L1 M,L1 =F, L M,L =F, L M,L Get zero on end and split to get HA HA :( 1 4 ) ( 6 ) 6= 0 or ( 5 ) ( 6 ) 6= 0 an you construct the contrast matrix?

94 Time for a curve ball What if I parameterized the model differently? an you sll figure out the contrasts? I ll show you a trick to get contrasts with ease

95 How to grab contrasts off design matrix Ask yourself the following quesons Are there the appropriate number of regressors e.g. x ANOVA needs 6 regressors Is this matrix full rank? compute rank(x) in matlab, rank(x) = # columns If matrix isn t full rank, hopefully there s a column you can dump to make it full rank. Just ignore this column Within cell do the rows of the design matrix match? e.g. all female subjects in L1 If yes to all, the design matrix row is the contrast for that cell

96 1 Way ANOVA - Factor Effects

97 1 Way ANOVA - Factor Effects

98 1 Way ANOVA - Factor Effects

99 1 Way ANOVA - Factor Effects

100 1 Way ANOVA - Factor Effects

101 1 Way ANOVA - Factor Effects Now you can combine these to compare groups

102 1 Way ANOVA - Factor Effects HA : G1 G > 0 =) ( 1 + ) ( 1 + ) > 0 =) > 0

103 Is there me for mean centering regressors?

104 Mean centering regressors Is it magic? No Model fit is the same Just changes the interpretaon of some of the parameters in your model

105 Review Age (years) RT (s) RT = Age +

106 General observaon Y = X + The intercept is simply the value of Y when X is 0 No ma5er what X is

107 Mean centering age RT = Age + vs RT = Age demeaned +

108 Mean centering age RT = Age + vs RT = (Age mean(age)) +

109 Mean centering age RT = Age + vs RT = (Age mean(age)) + 0 RT when Age = 0 0 RT when Age-mean(Age) = 0 RT when Age = mean(age) (or just mean RT)

110 Mean centering age RT = Age + vs RT = (Age mean(age)) + 0 RT when Age = 0 0 These are not the same RT when Age-mean(Age) = 0 RT when Age = mean(age) (or just mean RT)

111 Mean centering age RT = Age + vs RT = (Age mean(age)) + The same! a 1 year difference in mean centered age is the same as a 1 year difference in age ages: 10, 11, 8, 9, 10, 1 ages mean centered: 0, 1, -, -1, 0,

112 Mean centering age RT = Age + vs RT = (Age mean(age)) + The same! a 1 year difference in mean centered age is the same as a 1 year difference in age ages: 10, 11, 8, 9, 10, 1 ages mean centered: 0, 1, -, -1, 0,

113 Mean centering age RT = Age + vs RT = (Age mean(age)) + The same! a 1 year difference in mean centered age is the same as a 1 year difference in age ages: 10, 11, 8, 9, 10, 1 ages mean centered: 0, 1, -, -1, 0,

114 Mean centering age RT = Age + vs RT = (Age mean(age)) + The same! a 1 year difference in mean centered age is the same as a 1 year difference in age ages: 10, 11, 8, 9, 10, 1 ages mean centered: 0, 1, -, -1, 0,

115 Mean centering X is basically moving the Y-axis Age (years) RT (s)

116 Age (years) RT (s) Mean centering X is basically moving the Y-axis

117 Mean centered age(years) RT (s) Mean centering X is basically moving the Y-axis

118 Interacon model group x age interacon Mulple ways to set it up I ll show most intuive

119 Interacon model Hypothesis Does the RT/age slope vary by group? Regressors Mean for G1 Mean for G Slope for G1 Slope for G

120 Interacon model 6 4 Y 1 Y Y Y 4 Y 5 Y =

121 Interacon model 6 4 Y 1 Y Y Y 4 Y 5 Y = What is the contrast to test the interacon??

122 Interacon model 6 4 Y 1 Y Y Y 4 Y 5 Y = Does it make sense to test the [ ] contrast?

123 Interacon model : mean centering 6 4 You can mean center age across all subjects Y 1 Y Y Y 4 Y 5 Y 6 Does not change inference for the interacon hanges interpretaon of first betas =

124 Interacon model : mean centering Do not mean center within group There are some excepons With this model, you may be interested in group difference adjusted for age. If you mean center within group, the age adjustment won t occur 6 4 Y 1 Y Y Y 4 Y 5 Y =

125 Interacon model : mean centering Do not mean center within group 6 4 There are some excepons With this model, you may be interested in group difference adjusted for age. If you mean center within group, the age adjustment won t occur Y 1 Y Y Y 4 Y 5 Y =

126 Interacon model : mean centering Do not mean center within group 6 4 There are some excepons With this model, you may be interested in group difference adjusted for age. If you mean center within group, the age adjustment won t occur Y 1 Y Y Y 4 Y 5 Y =

127 I have a handy pdf you can refer to h5p://mumford.fmripower.org/ mean_centering/

128 All you need to know What does mean centering do to the parameter associated with the regressor that was centered? Does the model fit be5er awer mean centering? What does change in the model?

129 All you need to know TW, this is exactly what we talked about with parametric regressors yesterday!

130 Other model This is a great resource for the more complicated models h5p:// publicaons/rik_anova.pdf

131 How do these modeling things relate to SPM output? beta*.img eta image (one for each beta) con*.img ontrast esmates (numbered in order you specified your contrasts) spm_t*.img orresponding t-stats for each contrast ees*.img Extra sums of squares (relates to F-test)

132 How do these things relate to SPM output? spm_f_*.img F stasc output ResMS.img Esmate of σ

133 Quesons?

Common models and contrasts. Tuesday, Lecture 5 Jeanette Mumford University of Wisconsin - Madison

Common models and contrasts. Tuesday, Lecture 5 Jeanette Mumford University of Wisconsin - Madison ommon models and contrasts Tuesday, Lecture 5 Jeanette Mumford University of Wisconsin - Madison Let s set up some simple models 1-sample t-test -sample t-test With contrasts! 1-sample t-test Y = 0 + 1-sample

More information

The General Linear Model. How we re approaching the GLM. What you ll get out of this 8/11/16

The General Linear Model. How we re approaching the GLM. What you ll get out of this 8/11/16 8// The General Linear Model Monday, Lecture Jeanette Mumford University of Wisconsin - Madison How we re approaching the GLM Regression for behavioral data Without using matrices Understand least squares

More information

The General Linear Model. Monday, Lecture 2 Jeanette Mumford University of Wisconsin - Madison

The General Linear Model. Monday, Lecture 2 Jeanette Mumford University of Wisconsin - Madison The General Linear Model Monday, Lecture 2 Jeanette Mumford University of Wisconsin - Madison How we re approaching the GLM Regression for behavioral data Without using matrices Understand least squares

More information

LECTURE 15: SIMPLE LINEAR REGRESSION I

LECTURE 15: SIMPLE LINEAR REGRESSION I David Youngberg BSAD 20 Montgomery College LECTURE 5: SIMPLE LINEAR REGRESSION I I. From Correlation to Regression a. Recall last class when we discussed two basic types of correlation (positive and negative).

More information

One- factor ANOVA. F Ra5o. If H 0 is true. F Distribu5on. If H 1 is true 5/25/12. One- way ANOVA: A supersized independent- samples t- test

One- factor ANOVA. F Ra5o. If H 0 is true. F Distribu5on. If H 1 is true 5/25/12. One- way ANOVA: A supersized independent- samples t- test F Ra5o F = variability between groups variability within groups One- factor ANOVA If H 0 is true random error F = random error " µ F =1 If H 1 is true random error +(treatment effect)2 F = " µ F >1 random

More information

Business Statistics. Lecture 9: Simple Regression

Business Statistics. Lecture 9: Simple Regression Business Statistics Lecture 9: Simple Regression 1 On to Model Building! Up to now, class was about descriptive and inferential statistics Numerical and graphical summaries of data Confidence intervals

More information

Chapter 26: Comparing Counts (Chi Square)

Chapter 26: Comparing Counts (Chi Square) Chapter 6: Comparing Counts (Chi Square) We ve seen that you can turn a qualitative variable into a quantitative one (by counting the number of successes and failures), but that s a compromise it forces

More information

Quadratic Equations Part I

Quadratic Equations Part I Quadratic Equations Part I Before proceeding with this section we should note that the topic of solving quadratic equations will be covered in two sections. This is done for the benefit of those viewing

More information

1.) Fit the full model, i.e., allow for separate regression lines (different slopes and intercepts) for each species

1.) Fit the full model, i.e., allow for separate regression lines (different slopes and intercepts) for each species Lecture notes 2/22/2000 Dummy variables and extra SS F-test Page 1 Crab claw size and closing force. Problem 7.25, 10.9, and 10.10 Regression for all species at once, i.e., include dummy variables for

More information

Chapter 27 Summary Inferences for Regression

Chapter 27 Summary Inferences for Regression Chapter 7 Summary Inferences for Regression What have we learned? We have now applied inference to regression models. Like in all inference situations, there are conditions that we must check. We can test

More information

Chapter 12 - Lecture 2 Inferences about regression coefficient

Chapter 12 - Lecture 2 Inferences about regression coefficient Chapter 12 - Lecture 2 Inferences about regression coefficient April 19th, 2010 Facts about slope Test Statistic Confidence interval Hypothesis testing Test using ANOVA Table Facts about slope In previous

More information

Regression, part II. I. What does it all mean? A) Notice that so far all we ve done is math.

Regression, part II. I. What does it all mean? A) Notice that so far all we ve done is math. Regression, part II I. What does it all mean? A) Notice that so far all we ve done is math. 1) One can calculate the Least Squares Regression Line for anything, regardless of any assumptions. 2) But, if

More information

Usually, when we first formulate a problem in mathematics, we use the most familiar

Usually, when we first formulate a problem in mathematics, we use the most familiar Change of basis Usually, when we first formulate a problem in mathematics, we use the most familiar coordinates. In R, this means using the Cartesian coordinates x, y, and z. In vector terms, this is equivalent

More information

Correla'on. Keegan Korthauer Department of Sta's'cs UW Madison

Correla'on. Keegan Korthauer Department of Sta's'cs UW Madison Correla'on Keegan Korthauer Department of Sta's'cs UW Madison 1 Rela'onship Between Two Con'nuous Variables When we have measured two con$nuous random variables for each item in a sample, we can study

More information

Lesson 3-1: Solving Linear Systems by Graphing

Lesson 3-1: Solving Linear Systems by Graphing For the past several weeks we ve been working with linear equations. We ve learned how to graph them and the three main forms they can take. Today we re going to begin considering what happens when we

More information

appstats27.notebook April 06, 2017

appstats27.notebook April 06, 2017 Chapter 27 Objective Students will conduct inference on regression and analyze data to write a conclusion. Inferences for Regression An Example: Body Fat and Waist Size pg 634 Our chapter example revolves

More information

1. (Problem 3.4 in OLRT)

1. (Problem 3.4 in OLRT) STAT:5201 Homework 5 Solutions 1. (Problem 3.4 in OLRT) The relationship of the untransformed data is shown below. There does appear to be a decrease in adenine with increased caffeine intake. This is

More information

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2 Final Review Sheet The final will cover Sections Chapters 1,2,3 and 4, as well as sections 5.1-5.4, 6.1-6.2 and 7.1-7.3 from chapters 5,6 and 7. This is essentially all material covered this term. Watch

More information

appstats8.notebook October 11, 2016

appstats8.notebook October 11, 2016 Chapter 8 Linear Regression Objective: Students will construct and analyze a linear model for a given set of data. Fat Versus Protein: An Example pg 168 The following is a scatterplot of total fat versus

More information

Review of Multiple Regression

Review of Multiple Regression Ronald H. Heck 1 Let s begin with a little review of multiple regression this week. Linear models [e.g., correlation, t-tests, analysis of variance (ANOVA), multiple regression, path analysis, multivariate

More information

REVIEW 8/2/2017 陈芳华东师大英语系

REVIEW 8/2/2017 陈芳华东师大英语系 REVIEW Hypothesis testing starts with a null hypothesis and a null distribution. We compare what we have to the null distribution, if the result is too extreme to belong to the null distribution (p

More information

My data doesn t look like that..

My data doesn t look like that.. Testing assumptions My data doesn t look like that.. We have made a big deal about testing model assumptions each week. Bill Pine Testing assumptions Testing assumptions We have made a big deal about testing

More information

III. Inferential Tools

III. Inferential Tools III. Inferential Tools A. Introduction to Bat Echolocation Data (10.1.1) 1. Q: Do echolocating bats expend more enery than non-echolocating bats and birds, after accounting for mass? 2. Strategy: (i) Explore

More information

Simple Linear Regression for the Climate Data

Simple Linear Regression for the Climate Data Prediction Prediction Interval Temperature 0.2 0.0 0.2 0.4 0.6 0.8 320 340 360 380 CO 2 Simple Linear Regression for the Climate Data What do we do with the data? y i = Temperature of i th Year x i =CO

More information

Algebra & Trig Review

Algebra & Trig Review Algebra & Trig Review 1 Algebra & Trig Review This review was originally written for my Calculus I class, but it should be accessible to anyone needing a review in some basic algebra and trig topics. The

More information

Univariate analysis. Simple and Multiple Regression. Univariate analysis. Simple Regression How best to summarise the data?

Univariate analysis. Simple and Multiple Regression. Univariate analysis. Simple Regression How best to summarise the data? Univariate analysis Example - linear regression equation: y = ax + c Least squares criteria ( yobs ycalc ) = yobs ( ax + c) = minimum Simple and + = xa xc xy xa + nc = y Solve for a and c Univariate analysis

More information

CHI SQUARE ANALYSIS 8/18/2011 HYPOTHESIS TESTS SO FAR PARAMETRIC VS. NON-PARAMETRIC

CHI SQUARE ANALYSIS 8/18/2011 HYPOTHESIS TESTS SO FAR PARAMETRIC VS. NON-PARAMETRIC CHI SQUARE ANALYSIS I N T R O D U C T I O N T O N O N - P A R A M E T R I C A N A L Y S E S HYPOTHESIS TESTS SO FAR We ve discussed One-sample t-test Dependent Sample t-tests Independent Samples t-tests

More information

Lecture 10: Powers of Matrices, Difference Equations

Lecture 10: Powers of Matrices, Difference Equations Lecture 10: Powers of Matrices, Difference Equations Difference Equations A difference equation, also sometimes called a recurrence equation is an equation that defines a sequence recursively, i.e. each

More information

Axiomatic systems. Revisiting the rules of inference. Example: A theorem and its proof in an abstract axiomatic system:

Axiomatic systems. Revisiting the rules of inference. Example: A theorem and its proof in an abstract axiomatic system: Axiomatic systems Revisiting the rules of inference Material for this section references College Geometry: A Discovery Approach, 2/e, David C. Kay, Addison Wesley, 2001. In particular, see section 2.1,

More information

Lesson 3-2: Solving Linear Systems Algebraically

Lesson 3-2: Solving Linear Systems Algebraically Yesterday we took our first look at solving a linear system. We learned that a linear system is two or more linear equations taken at the same time. Their solution is the point that all the lines have

More information

Lecture 6 Force and Motion. Identifying Forces Free-body Diagram Newton s Second Law

Lecture 6 Force and Motion. Identifying Forces Free-body Diagram Newton s Second Law Lecture 6 Force and Motion Identifying Forces Free-body Diagram Newton s Second Law We are now moving on from the study of motion to studying what causes motion. Forces are what cause motion. Forces are

More information

Sta$s$cal Significance Tes$ng In Theory and In Prac$ce

Sta$s$cal Significance Tes$ng In Theory and In Prac$ce Sta$s$cal Significance Tes$ng In Theory and In Prac$ce Ben Cartere8e University of Delaware h8p://ir.cis.udel.edu/ictir13tutorial Hypotheses and Experiments Hypothesis: Using an SVM for classifica$on will

More information

Algebra Exam. Solutions and Grading Guide

Algebra Exam. Solutions and Grading Guide Algebra Exam Solutions and Grading Guide You should use this grading guide to carefully grade your own exam, trying to be as objective as possible about what score the TAs would give your responses. Full

More information

CS 124 Math Review Section January 29, 2018

CS 124 Math Review Section January 29, 2018 CS 124 Math Review Section CS 124 is more math intensive than most of the introductory courses in the department. You re going to need to be able to do two things: 1. Perform some clever calculations to

More information

Course Review. Kin 304W Week 14: April 9, 2013

Course Review. Kin 304W Week 14: April 9, 2013 Course Review Kin 304W Week 14: April 9, 2013 1 Today s Outline Format of Kin 304W Final Exam Course Review Hand back marked Project Part II 2 Kin 304W Final Exam Saturday, Thursday, April 18, 3:30-6:30

More information

base 2 4 The EXPONENT tells you how many times to write the base as a factor. Evaluate the following expressions in standard notation.

base 2 4 The EXPONENT tells you how many times to write the base as a factor. Evaluate the following expressions in standard notation. EXPONENTIALS Exponential is a number written with an exponent. The rules for exponents make computing with very large or very small numbers easier. Students will come across exponentials in geometric sequences

More information

Ordinary Least Squares Linear Regression

Ordinary Least Squares Linear Regression Ordinary Least Squares Linear Regression Ryan P. Adams COS 324 Elements of Machine Learning Princeton University Linear regression is one of the simplest and most fundamental modeling ideas in statistics

More information

Applied Regression Analysis. Section 2: Multiple Linear Regression

Applied Regression Analysis. Section 2: Multiple Linear Regression Applied Regression Analysis Section 2: Multiple Linear Regression 1 The Multiple Regression Model Many problems involve more than one independent variable or factor which affects the dependent or response

More information

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Multilevel Models in Matrix Form Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Today s Lecture Linear models from a matrix perspective An example of how to do

More information

Solving with Absolute Value

Solving with Absolute Value Solving with Absolute Value Who knew two little lines could cause so much trouble? Ask someone to solve the equation 3x 2 = 7 and they ll say No problem! Add just two little lines, and ask them to solve

More information

Ch 7: Dummy (binary, indicator) variables

Ch 7: Dummy (binary, indicator) variables Ch 7: Dummy (binary, indicator) variables :Examples Dummy variable are used to indicate the presence or absence of a characteristic. For example, define female i 1 if obs i is female 0 otherwise or male

More information

An Introduction to Path Analysis

An Introduction to Path Analysis An Introduction to Path Analysis PRE 905: Multivariate Analysis Lecture 10: April 15, 2014 PRE 905: Lecture 10 Path Analysis Today s Lecture Path analysis starting with multivariate regression then arriving

More information

MATH 310, REVIEW SHEET 2

MATH 310, REVIEW SHEET 2 MATH 310, REVIEW SHEET 2 These notes are a very short summary of the key topics in the book (and follow the book pretty closely). You should be familiar with everything on here, but it s not comprehensive,

More information

Ratios, Proportions, Unit Conversions, and the Factor-Label Method

Ratios, Proportions, Unit Conversions, and the Factor-Label Method Ratios, Proportions, Unit Conversions, and the Factor-Label Method Math 0, Littlefield I don t know why, but presentations about ratios and proportions are often confused and fragmented. The one in your

More information

Math Fundamentals for Statistics I (Math 52) Unit 7: Connections (Graphs, Equations and Inequalities)

Math Fundamentals for Statistics I (Math 52) Unit 7: Connections (Graphs, Equations and Inequalities) Math Fundamentals for Statistics I (Math 52) Unit 7: Connections (Graphs, Equations and Inequalities) By Scott Fallstrom and Brent Pickett The How and Whys Guys This work is licensed under a Creative Commons

More information

Eigenvalues & Eigenvectors

Eigenvalues & Eigenvectors Eigenvalues & Eigenvectors Page 1 Eigenvalues are a very important concept in linear algebra, and one that comes up in other mathematics courses as well. The word eigen is German for inherent or characteristic,

More information

One sided tests. An example of a two sided alternative is what we ve been using for our two sample tests:

One sided tests. An example of a two sided alternative is what we ve been using for our two sample tests: One sided tests So far all of our tests have been two sided. While this may be a bit easier to understand, this is often not the best way to do a hypothesis test. One simple thing that we can do to get

More information

Some Review and Hypothesis Tes4ng. Friday, March 15, 13

Some Review and Hypothesis Tes4ng. Friday, March 15, 13 Some Review and Hypothesis Tes4ng Outline Discussing the homework ques4ons from Joey and Phoebe Review of Sta4s4cal Inference Proper4es of OLS under the normality assump4on Confidence Intervals, T test,

More information

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2:

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: 03 17 08 3 All about lines 3.1 The Rectangular Coordinate System Know how to plot points in the rectangular coordinate system. Know the

More information

Intro to Linear Regression

Intro to Linear Regression Intro to Linear Regression Introduction to Regression Regression is a statistical procedure for modeling the relationship among variables to predict the value of a dependent variable from one or more predictor

More information

PHYSICS 15a, Fall 2006 SPEED OF SOUND LAB Due: Tuesday, November 14

PHYSICS 15a, Fall 2006 SPEED OF SOUND LAB Due: Tuesday, November 14 PHYSICS 15a, Fall 2006 SPEED OF SOUND LAB Due: Tuesday, November 14 GENERAL INFO The goal of this lab is to determine the speed of sound in air, by making measurements and taking into consideration the

More information

Statistical Distribution Assumptions of General Linear Models

Statistical Distribution Assumptions of General Linear Models Statistical Distribution Assumptions of General Linear Models Applied Multilevel Models for Cross Sectional Data Lecture 4 ICPSR Summer Workshop University of Colorado Boulder Lecture 4: Statistical Distributions

More information

review session gov 2000 gov 2000 () review session 1 / 38

review session gov 2000 gov 2000 () review session 1 / 38 review session gov 2000 gov 2000 () review session 1 / 38 Overview Random Variables and Probability Univariate Statistics Bivariate Statistics Multivariate Statistics Causal Inference gov 2000 () review

More information

Regression and the 2-Sample t

Regression and the 2-Sample t Regression and the 2-Sample t James H. Steiger Department of Psychology and Human Development Vanderbilt University James H. Steiger (Vanderbilt University) Regression and the 2-Sample t 1 / 44 Regression

More information

Math 31 Lesson Plan. Day 5: Intro to Groups. Elizabeth Gillaspy. September 28, 2011

Math 31 Lesson Plan. Day 5: Intro to Groups. Elizabeth Gillaspy. September 28, 2011 Math 31 Lesson Plan Day 5: Intro to Groups Elizabeth Gillaspy September 28, 2011 Supplies needed: Sign in sheet Goals for students: Students will: Improve the clarity of their proof-writing. Gain confidence

More information

, (1) e i = ˆσ 1 h ii. c 2016, Jeffrey S. Simonoff 1

, (1) e i = ˆσ 1 h ii. c 2016, Jeffrey S. Simonoff 1 Regression diagnostics As is true of all statistical methodologies, linear regression analysis can be a very effective way to model data, as along as the assumptions being made are true. For the regression

More information

Chi Square Analysis M&M Statistics. Name Period Date

Chi Square Analysis M&M Statistics. Name Period Date Chi Square Analysis M&M Statistics Name Period Date Have you ever wondered why the package of M&Ms you just bought never seems to have enough of your favorite color? Or, why is it that you always seem

More information

Solution to Proof Questions from September 1st

Solution to Proof Questions from September 1st Solution to Proof Questions from September 1st Olena Bormashenko September 4, 2011 What is a proof? A proof is an airtight logical argument that proves a certain statement in general. In a sense, it s

More information

CHAPTER 5 VECTOR TRANSFORMATIONS. look at parametric equations. This is because we can always associate a position

CHAPTER 5 VECTOR TRANSFORMATIONS. look at parametric equations. This is because we can always associate a position CHAPTER 5 VECTOR TRANSFORMATIONS Now that we ve talked about vectors, they re going to give us a whole new way to look at parametric equations. This is because we can always associate a position vector,

More information

Confidence intervals

Confidence intervals Confidence intervals We now want to take what we ve learned about sampling distributions and standard errors and construct confidence intervals. What are confidence intervals? Simply an interval for which

More information

Lecture 2: Linear regression

Lecture 2: Linear regression Lecture 2: Linear regression Roger Grosse 1 Introduction Let s ump right in and look at our first machine learning algorithm, linear regression. In regression, we are interested in predicting a scalar-valued

More information

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Intro to Learning Theory Date: 12/8/16

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Intro to Learning Theory Date: 12/8/16 600.463 Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Intro to Learning Theory Date: 12/8/16 25.1 Introduction Today we re going to talk about machine learning, but from an

More information

ECON 497 Midterm Spring

ECON 497 Midterm Spring ECON 497 Midterm Spring 2009 1 ECON 497: Economic Research and Forecasting Name: Spring 2009 Bellas Midterm You have three hours and twenty minutes to complete this exam. Answer all questions and explain

More information

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed. This document was written and copyrighted by Paul Dawkins. Use of this document and its online version is governed by the Terms and Conditions of Use located at. The online version of this document is

More information

Appendix A: Review of the General Linear Model

Appendix A: Review of the General Linear Model Appendix A: Review of the General Linear Model The generallinear modelis an important toolin many fmri data analyses. As the name general suggests, this model can be used for many different types of analyses,

More information

Differential Equations

Differential Equations This document was written and copyrighted by Paul Dawkins. Use of this document and its online version is governed by the Terms and Conditions of Use located at. The online version of this document is

More information

Course Introduction and Overview Descriptive Statistics Conceptualizations of Variance Review of the General Linear Model

Course Introduction and Overview Descriptive Statistics Conceptualizations of Variance Review of the General Linear Model Course Introduction and Overview Descriptive Statistics Conceptualizations of Variance Review of the General Linear Model PSYC 943 (930): Fundamentals of Multivariate Modeling Lecture 1: August 22, 2012

More information

Contingency Tables. Safety equipment in use Fatal Non-fatal Total. None 1, , ,128 Seat belt , ,878

Contingency Tables. Safety equipment in use Fatal Non-fatal Total. None 1, , ,128 Seat belt , ,878 Contingency Tables I. Definition & Examples. A) Contingency tables are tables where we are looking at two (or more - but we won t cover three or more way tables, it s way too complicated) factors, each

More information

MA 3280 Lecture 05 - Generalized Echelon Form and Free Variables. Friday, January 31, 2014.

MA 3280 Lecture 05 - Generalized Echelon Form and Free Variables. Friday, January 31, 2014. MA 3280 Lecture 05 - Generalized Echelon Form and Free Variables Friday, January 31, 2014. Objectives: Generalize echelon form, and introduce free variables. Material from Section 3.5 starting on page

More information

A Re-Introduction to General Linear Models (GLM)

A Re-Introduction to General Linear Models (GLM) A Re-Introduction to General Linear Models (GLM) Today s Class: You do know the GLM Estimation (where the numbers in the output come from): From least squares to restricted maximum likelihood (REML) Reviewing

More information

Uni- and Bivariate Power

Uni- and Bivariate Power Uni- and Bivariate Power Copyright 2002, 2014, J. Toby Mordkoff Note that the relationship between risk and power is unidirectional. Power depends on risk, but risk is completely independent of power.

More information

A discussion on multiple regression models

A discussion on multiple regression models A discussion on multiple regression models In our previous discussion of simple linear regression, we focused on a model in which one independent or explanatory variable X was used to predict the value

More information

MITOCW ocw-18_02-f07-lec02_220k

MITOCW ocw-18_02-f07-lec02_220k MITOCW ocw-18_02-f07-lec02_220k The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free.

More information

REGRESSION AND CORRELATION ANALYSIS

REGRESSION AND CORRELATION ANALYSIS Problem 1 Problem 2 A group of 625 students has a mean age of 15.8 years with a standard devia>on of 0.6 years. The ages are normally distributed. How many students are younger than 16.2 years? REGRESSION

More information

Linear Regression Analysis for Survey Data. Professor Ron Fricker Naval Postgraduate School Monterey, California

Linear Regression Analysis for Survey Data. Professor Ron Fricker Naval Postgraduate School Monterey, California Linear Regression Analysis for Survey Data Professor Ron Fricker Naval Postgraduate School Monterey, California 1 Goals for this Lecture Linear regression How to think about it for Lickert scale dependent

More information

Lecture 18: Simple Linear Regression

Lecture 18: Simple Linear Regression Lecture 18: Simple Linear Regression BIOS 553 Department of Biostatistics University of Michigan Fall 2004 The Correlation Coefficient: r The correlation coefficient (r) is a number that measures the strength

More information

General linear model: basic

General linear model: basic General linear model: basic Introducing General Linear Model (GLM): Start with an example Proper>es of the BOLD signal Linear Time Invariant (LTI) system The hemodynamic response func>on (Briefly) Evalua>ng

More information

Guide to Proofs on Sets

Guide to Proofs on Sets CS103 Winter 2019 Guide to Proofs on Sets Cynthia Lee Keith Schwarz I would argue that if you have a single guiding principle for how to mathematically reason about sets, it would be this one: All sets

More information

Chapter 6. Net or Unbalanced Forces. Copyright 2011 NSTA. All rights reserved. For more information, go to

Chapter 6. Net or Unbalanced Forces. Copyright 2011 NSTA. All rights reserved. For more information, go to Chapter 6 Net or Unbalanced Forces Changes in Motion and What Causes Them Teacher Guide to 6.1/6.2 Objectives: The students will be able to explain that the changes in motion referred to in Newton s first

More information

Introduction. So, why did I even bother to write this?

Introduction. So, why did I even bother to write this? Introduction This review was originally written for my Calculus I class, but it should be accessible to anyone needing a review in some basic algebra and trig topics. The review contains the occasional

More information

Lecture 3: Special Matrices

Lecture 3: Special Matrices Lecture 3: Special Matrices Feedback of assignment1 Random matrices The magic matrix commend magic() doesn t give us random matrix. Random matrix means we will get different matrices each time when we

More information

Multiple comparisons - subsequent inferences for two-way ANOVA

Multiple comparisons - subsequent inferences for two-way ANOVA 1 Multiple comparisons - subsequent inferences for two-way ANOVA the kinds of inferences to be made after the F tests of a two-way ANOVA depend on the results if none of the F tests lead to rejection of

More information

Inference with Simple Regression

Inference with Simple Regression 1 Introduction Inference with Simple Regression Alan B. Gelder 06E:071, The University of Iowa 1 Moving to infinite means: In this course we have seen one-mean problems, twomean problems, and problems

More information

Lecture 10: F -Tests, ANOVA and R 2

Lecture 10: F -Tests, ANOVA and R 2 Lecture 10: F -Tests, ANOVA and R 2 1 ANOVA We saw that we could test the null hypothesis that β 1 0 using the statistic ( β 1 0)/ŝe. (Although I also mentioned that confidence intervals are generally

More information

Structural Equa+on Models: The General Case. STA431: Spring 2013

Structural Equa+on Models: The General Case. STA431: Spring 2013 Structural Equa+on Models: The General Case STA431: Spring 2013 An Extension of Mul+ple Regression More than one regression- like equa+on Includes latent variables Variables can be explanatory in one equa+on

More information

Multiple Regression Analysis

Multiple Regression Analysis Multiple Regression Analysis y = β 0 + β 1 x 1 + β 2 x 2 +... β k x k + u 2. Inference 0 Assumptions of the Classical Linear Model (CLM)! So far, we know: 1. The mean and variance of the OLS estimators

More information

Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3

Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3 Answers in blue. If you have questions or spot an error, let me know. 3 4. Find all matrices that commute with A =. 4 3 a b If we set B = and set AB = BA, we see that 3a + 4b = 3a 4c, 4a + 3b = 3b 4d,

More information

An Introduction to Mplus and Path Analysis

An Introduction to Mplus and Path Analysis An Introduction to Mplus and Path Analysis PSYC 943: Fundamentals of Multivariate Modeling Lecture 10: October 30, 2013 PSYC 943: Lecture 10 Today s Lecture Path analysis starting with multivariate regression

More information

Roberto s Notes on Linear Algebra Chapter 4: Matrix Algebra Section 7. Inverse matrices

Roberto s Notes on Linear Algebra Chapter 4: Matrix Algebra Section 7. Inverse matrices Roberto s Notes on Linear Algebra Chapter 4: Matrix Algebra Section 7 Inverse matrices What you need to know already: How to add and multiply matrices. What elementary matrices are. What you can learn

More information

CALCULUS III. Paul Dawkins

CALCULUS III. Paul Dawkins CALCULUS III Paul Dawkins Table of Contents Preface... iii Outline... iv Three Dimensional Space... Introduction... The -D Coordinate System... Equations of Lines... 9 Equations of Planes... 5 Quadric

More information

Lecture 5: Special Functions and Operations

Lecture 5: Special Functions and Operations Lecture 5: Special Functions and Operations Feedback of Assignment2 Rotation Transformation To rotate by angle θ counterclockwise, set your transformation matrix A as [ ] cos θ sin θ A =. sin θ cos θ We

More information

STA 101 Final Review

STA 101 Final Review STA 101 Final Review Statistics 101 Thomas Leininger June 24, 2013 Announcements All work (besides projects) should be returned to you and should be entered on Sakai. Office Hour: 2 3pm today (Old Chem

More information

Math 2250 Lab #1 : Tennis Ball Missile Defense

Math 2250 Lab #1 : Tennis Ball Missile Defense Math 2250 Lab #1 : Tennis Ball Missile Defense 1. INTRODUCTION TO THE LAB PROGRAM. Here are some general notes and ideas which will help you with the lab. The purpose of the lab program is to expose you

More information

MATH 310, REVIEW SHEET

MATH 310, REVIEW SHEET MATH 310, REVIEW SHEET These notes are a summary of the key topics in the book (and follow the book pretty closely). You should be familiar with everything on here, but it s not comprehensive, so please

More information

Your schedule of coming weeks. One-way ANOVA, II. Review from last time. Review from last time /22/2004. Create ANOVA table

Your schedule of coming weeks. One-way ANOVA, II. Review from last time. Review from last time /22/2004. Create ANOVA table Your schedule of coming weeks One-way ANOVA, II 9.07 //00 Today: One-way ANOVA, part II Next week: Two-way ANOVA, parts I and II. One-way ANOVA HW due Thursday Week of May Teacher out of town all week

More information

Answers for Calculus Review (Extrema and Concavity)

Answers for Calculus Review (Extrema and Concavity) Answers for Calculus Review 4.1-4.4 (Extrema and Concavity) 1. A critical number is a value of the independent variable (a/k/a x) in the domain of the function at which the derivative is zero or undefined.

More information

Lecture 7: OLS with qualitative information

Lecture 7: OLS with qualitative information Lecture 7: OLS with qualitative information Dummy variables Dummy variable: an indicator that says whether a particular observation is in a category or not Like a light switch: on or off Most useful values:

More information

Lecture 4: Constructing the Integers, Rationals and Reals

Lecture 4: Constructing the Integers, Rationals and Reals Math/CS 20: Intro. to Math Professor: Padraic Bartlett Lecture 4: Constructing the Integers, Rationals and Reals Week 5 UCSB 204 The Integers Normally, using the natural numbers, you can easily define

More information

The Mean Version One way to write the One True Regression Line is: Equation 1 - The One True Line

The Mean Version One way to write the One True Regression Line is: Equation 1 - The One True Line Chapter 27: Inferences for Regression And so, there is one more thing which might vary one more thing aout which we might want to make some inference: the slope of the least squares regression line. The

More information

Section 4: Multiple Linear Regression

Section 4: Multiple Linear Regression Section 4: Multiple Linear Regression Carlos M. Carvalho The University of Texas at Austin McCombs School of Business http://faculty.mccombs.utexas.edu/carlos.carvalho/teaching/ 1 The Multiple Regression

More information