Testing H 0 : ρ = 0: Comparing A Single Correlation to Zero

Similar documents
Chickens vs. Eggs: Replicating Thurman and Fisher (1988) by Arianto A. Patunru Department of Economics, University of Indonesia 2004

Comparing Means: t-tests for One Sample & Two Related Samples

Exponential and Logarithmic Functions -- ANSWERS -- Logarithms Practice Diploma ANSWERS 1

Lecture 6 - Testing Restrictions on the Disturbance Process (References Sections 2.7 and 2.10, Hayashi)

Econ107 Applied Econometrics Topic 7: Multicollinearity (Studenmund, Chapter 8)

Biol. 356 Lab 8. Mortality, Recruitment, and Migration Rates

Solutions to Odd Number Exercises in Chapter 6

Properties of Autocorrelated Processes Economics 30331

04. Kinetics of a second order reaction

Licenciatura de ADE y Licenciatura conjunta Derecho y ADE. Hoja de ejercicios 2 PARTE A

BOX-JENKINS MODEL NOTATION. The Box-Jenkins ARMA(p,q) model is denoted by the equation. pwhile the moving average (MA) part of the model is θ1at

HYPOTHESIS TESTING. four steps. 1. State the hypothesis and the criterion. 2. Compute the test statistic. 3. Compute the p-value. 4.

V The Fourier Transform

Introduction D P. r = constant discount rate, g = Gordon Model (1962): constant dividend growth rate.

ACE 564 Spring Lecture 7. Extensions of The Multiple Regression Model: Dummy Independent Variables. by Professor Scott H.

HYPOTHESIS TESTING. four steps. 1. State the hypothesis. 2. Set the criterion for rejecting. 3. Compute the test statistics. 4. Interpret the results.

Best test practice: Take the past test on the class website

15. Bicycle Wheel. Graph of height y (cm) above the axle against time t (s) over a 6-second interval. 15 bike wheel

Lecture 5. Time series: ECM. Bernardina Algieri Department Economics, Statistics and Finance

Description of the MS-Regress R package (Rmetrics)

- The whole joint distribution is independent of the date at which it is measured and depends only on the lag.

R t. C t P t. + u t. C t = αp t + βr t + v t. + β + w t

Institutional Assessment Report Texas Southern University College of Pharmacy and Health Sciences "P1-Aggregate Analyses of 6 cohorts ( )

A Specification Test for Linear Dynamic Stochastic General Equilibrium Models

5.1 - Logarithms and Their Properties

Regression with Time Series Data

Math 333 Problem Set #2 Solution 14 February 2003

Outline. lse-logo. Outline. Outline. 1 Wald Test. 2 The Likelihood Ratio Test. 3 Lagrange Multiplier Tests

AP CALCULUS AB 2003 SCORING GUIDELINES (Form B)

Financial Econometrics Jeffrey R. Russell Midterm Winter 2009 SOLUTIONS

Hypothesis Testing in the Classical Normal Linear Regression Model. 1. Components of Hypothesis Tests

Math 2142 Exam 1 Review Problems. x 2 + f (0) 3! for the 3rd Taylor polynomial at x = 0. To calculate the various quantities:

Diebold, Chapter 7. Francis X. Diebold, Elements of Forecasting, 4th Edition (Mason, Ohio: Cengage Learning, 2006). Chapter 7. Characterizing Cycles

Cointegration and Implications for Forecasting

Suggested Practice Problems (set #2) for the Physics Placement Test

SMT 2014 Calculus Test Solutions February 15, 2014 = 3 5 = 15.

HW6: MRI Imaging Pulse Sequences (7 Problems for 100 pts)

Logarithms Practice Exam - ANSWERS

Designing Information Devices and Systems I Spring 2019 Lecture Notes Note 17

Assignment 6. Tyler Shendruk December 6, 2010

Instructor: Barry McQuarrie Page 1 of 5

Econ Autocorrelation. Sanjaya DeSilva

Random Processes 1/24

(π 3)k. f(t) = 1 π 3 sin(t)

GMM - Generalized Method of Moments

(a) Set up the least squares estimation procedure for this problem, which will consist in minimizing the sum of squared residuals. 2 t.

Unit Root Time Series. Univariate random walk

FITTING EQUATIONS TO DATA

Innova Junior College H2 Mathematics JC2 Preliminary Examinations Paper 2 Solutions 0 (*)

!!"#"$%&#'()!"#&'(*%)+,&',-)./0)1-*23)

Forecasting optimally

1 Review of Zero-Sum Games

You must fully interpret your results. There is a relationship doesn t cut it. Use the text and, especially, the SPSS Manual for guidance.

Stationary Time Series

Version abc. General Certificate of Education. Mathematics MS2B Statistics 2. Mark Scheme examination - January series

Vector autoregression VAR. Case 1

Math 10B: Mock Mid II. April 13, 2016

WEEK-3 Recitation PHYS 131. of the projectile s velocity remains constant throughout the motion, since the acceleration a x

PRINCE SULTAN UNIVERSITY Department of Mathematical Sciences Final Examination Second Semester (072) STAT 271.

s in boxe wers ans Put

Chapter 15. Time Series: Descriptive Analyses, Models, and Forecasting

3.6 Derivatives as Rates of Change

Time series Decomposition method

University Physics with Modern Physics 14th Edition Young TEST BANK

Chapter 2 The Derivative Applied Calculus 107. We ll need a rule for finding the derivative of a product so we don t have to multiply everything out.

Decimal moved after first digit = 4.6 x Decimal moves five places left SCIENTIFIC > POSITIONAL. a) g) 5.31 x b) 0.

EECE 301 Signals & Systems Prof. Mark Fowler

Non-parametric techniques. Instance Based Learning. NN Decision Boundaries. Nearest Neighbor Algorithm. Distance metric important

UNC resolution Uncertainty Learning Objectives: measurement interval ( You will turn in two worksheets and

Distribution of Estimates

V L. DT s D T s t. Figure 1: Buck-boost converter: inductor current i(t) in the continuous conduction mode.

The average rate of change between two points on a function is d t

Chapter 7: Solving Trig Equations

Solutions from Chapter 9.1 and 9.2

Topic Astable Circuits. Recall that an astable circuit has two unstable states;

Math 334 Test 1 KEY Spring 2010 Section: 001. Instructor: Scott Glasgow Dates: May 10 and 11.

Solutions Problem Set 3 Macro II (14.452)

Testing for a Single Factor Model in the Multivariate State Space Framework

20. Applications of the Genetic-Drift Model

Some Basic Information about M-S-D Systems

Explaining Total Factor Productivity. Ulrich Kohli University of Geneva December 2015

Linear Time-invariant systems, Convolution, and Cross-correlation

Section 5: Chain Rule

Mathcad Lecture #8 In-class Worksheet Curve Fitting and Interpolation

Fishing limits and the Logistic Equation. 1

4 Two movies, together, run for 3 hours. One movie runs 12 minutes longer than the other. How long is each movie?

5.2. The Natural Logarithm. Solution

L1, L2, N1 N2. + Vout. C out. Figure 2.1.1: Flyback converter

Intermediate Macroeconomics: Mid-term exam May 30 th, 2016 Makoto Saito

Q.1 Define work and its unit?

Homework 2: Kinematics and Dynamics of Particles Due Friday Feb 8, 2019

1. VELOCITY AND ACCELERATION

Lecture 12: Multiple Hypothesis Testing

Cosumnes River College Principles of Macroeconomics Problem Set 1 Due January 30, 2017

Data assimilation for local rainfall near Tokyo on 18 July 2013 using EnVAR with observation space localization

Methodology. -ratios are biased and that the appropriate critical values have to be increased by an amount. that depends on the sample size.

Lecture 2 April 04, 2018

Kriging Models Predicting Atrazine Concentrations in Surface Water Draining Agricultural Watersheds

Generalized Least Squares

Group B Human

Transcription:

Tesing H 0 : ρ = 0: Comaring A Single Correlaion o Zero February 5, 2018 Conens Tesing H 0 : ρ = 0 Examle 1: The correlaion beween heighs of your arens Examle 2: Drinking and Facebook friends Using R o run a hyohesis es for one correlaion Quesions Answers Tesing H 0 : ρ = 0 In his uorial we ll be esing he null hyohesis ha an observed correlaion is drawn from a oulaion of correlaions ha has a mean of zero (ρ = 0) This urns ou o be a simle -es Here s how o ge o he indeenden means -es in he flow char: START HERE Tes for = 0 Ch 172 1 number of correlaions correlaion (r) measuremen scale frequency number of variables 1 2 es frequency Ch 195 2 2 Tes for 1 = 2 Ch 174 Means 2 es indeendence Ch 199 z-es Ch 131 Yes Do you know? 1 number of means More han 2 number of 2 facors 2-facor ANOVA Ch 21 No 1 one samle -es Ch 1314 2 1-facor ANOVA Ch 20 indeenden measures -es Ch 156 Yes indeenden samles? No deenden measures -es Ch 164 Sir Ronald Fisher figured ou ha you can conver a correlaion value o a -saisic using he Fisher s z ransform : 1

= r 1 r 2 n 2 The degrees of freedom is df = n-2 where n is he number of airs in he correlaion Here s some good news: he book and our Excel sreadshee have a able (Table G) ha rovide he criical values of r so you don even need o calculae Plus I ve given you calculaor on he same Excel age ha gives you a -value for his -es Examle 1: The correlaion beween heighs of your arens Le s es he hyohesis ha eole end o marry eole of similar heighs Secifically, we ll use he survey from our class and es he hyohesis ha he correlaion beween he heighs of mohers and fahers is greaer han zero Le s choose an alha value of 001 For he 144 sudens in our class, he correlaion beween he heighs of mohers and fahers is 041 Here s he scaerlo: 80 n = 144, r = 041 75 fahers heighs (in) 70 65 60 55 52 54 56 58 60 62 64 66 68 70 72 mohers heighs (in) Since we re looking for a osiive correlaion, his will be a 1-ailed es All we need o do is look u he row in Table G for df = 144-2 = 142: 2

α: one ail 005 0025 001 0005 140 0139 0165 0195 0216 141 0138 0164 0194 0215 142 0138 0164 0194 0214 143 0137 0163 0193 0213 144 0137 0163 0192 0213 The criical value of r is 0194 Our observed value of r is 041 is greaer han he criical value of 0194 We herefore rejec H 0 and conclude ha he correlaion beween he heighs of mohers and fahers is significanly greaer han zero We can use he calculaor on he Excel sreadshee for able G o find he -value: r o α df r α (one ail) α (wo ail) 142 041 0 0 53566 α o r df r r cri (one ail) r cri (wo ail) 142 001 01937 0214 cri cri 23529 26109 To sae our conclusions using APA forma, we d sae: The correlaion beween mohers and fahers for sudens in his class heighs is significanly greaer han zero, r(142) = 041, < 00001 Examle 2: Drinking and Facebook friends For he 144 sudens in our class, he correlaion beween he number of of alcoholic drinks and he number of facebook friends is 035 Le s see if his correlaion is significanly differen han zero We ll use α = 005 This will be a 2-ailed es Looking u he row in Table G for df = 144-2 = 142, and he column for α = 005 2 = 0025 (since his is a wo-ailed es): α: one ail 005 0025 001 0005 140 0139 0165 0195 0216 141 0138 0164 0194 0215 142 0138 0164 0194 0214 143 0137 0163 0193 0213 144 0137 0163 0192 0213 3

The criical value of r is 0164 The calculaor in he sreadshee gives he -value of 0 r o α df r α (one ail) α (wo ail) 142 035 0 0 44523 α o r df r r cri (one ail) r cri (wo ail) 142 005 01376 01637 cri cri 16557 19768 Our observed value of r =035 is ouside he range from -0164 o 0164 We herefore rejec H 0 and conclude ha he correlaion beween he of alcoholic drinks and facebook friends is significanly differen han zero To resen our conclusions using APA forma, we d sae: The correlaion beween alcoholic drinks and facebook friends for sudens in his class is significanly differen han zero, r(142) = 035, < 00001 Using R o run a hyohesis es for one correlaion The following R scri covers how o run a es for ρ = 0 using he funcion cores : The R commands shown below can be found here: ComaringOneCorrelaionR # Comaring one correlaion o he null hyohesis ha rho = 0 # # If you have your raw x and y daa, R s funcion cores gives you a -value for esing # he hyohesis ha a correlaion was drawn from a oulaion ha has a correlaion of zero # I akes in he x and y variables along wih alernaive which can be "greaer", "less" # for a one-ailed es or "wosided"for a wo-ailed es Here are he examles from he # comaring_one_correlaion uorial # By defaul, cores convers he correlaion of x and y ino a -saisic and hen comues # a -es # Load in he survey daa survey <-readcsv("h://wwwcourseswashingonedu/sy315/daases/psych315w18surveycsv") # Examle 1: The correlaion beween heighs of your arens x <- survey$mheigh y <- survey$heigh goodvals =!isna(x) &!isna(y) x <- x[goodvals] y <- y[goodvals] # cores runs he -es for you: ou <- cores(x,y,alernaive = "greaer") 4

# esimae is he correlaion ou$esimae cor 04083501 # value is he -value ou$value [1] 1879602e-07 # saisic is he -saisic used in he es: ou$saisic 5330759 # wih degrees of freedom: ou$arameer df 142 # Here s how o dislay your resuls in APA forma: srinf( r(%g) = %42f, = %54f,ou$arameer,ou$esimae,ou$value) [1] "r(142) = 041, = 00000" # This is calculaed direcly from r and df So his should be he same # hing (See he beginning of he comariong_one_correlaion_uorialdf ou$esimae/sqr((1-ou$esimae^2)/(lengh(x)-2)) cor 5330759 # Examle 2: Two ailed es on he correlaion beween drinking and Facebook friends x <- survey$drink y <- survey$friends goodvals =!isna(x) &!isna(y) x <- x[goodvals] y <- y[goodvals] ou <- cores(x,y,alernaive = "wosided") # APA forma: srinf( r(%g) = %42f, = %54f,ou$arameer,ou$esimae,ou$value) [1] "r(150) = 035, = 00000" # If you jus have r and he samle size bu no he raw daa, you can calculae # he -value by running a -es by hand: # The correlaion beween x and y is: r <- cor(x,y) # The degrees of freedom is df <- lengh(x) -2 # The -saisic us comued using he Fisher s z ransform : <- r/sqr((1-r^2)/df) # The -value for a wo-ailed for no equal o 0 should give you he same -value as for cores: 2*(abs(),df,0,lowerail = FALSE) [1] 1237865e-05 5

Quesions I s random quesion ime! Here are 10 racice quesions followed by heir answers Some of hem require you o calculae correlaions from he acual scores For hese, you migh wan o coy he numbers and ase hem ino Excel 1) For some reason you samle 24 living bus riders from a oulaion and measure boh heir jusice and heir waer You calculae ha heir jusice correlaes wih waer wih r = 024 Using an alha value of α = 005, is his observed correlaion significanly greaer han zero? 2) Le s samle 7 orid cows from a oulaion and measure boh heir safey and heir ain hreshold You calculae ha heir safey correlaes wih ain hreshold wih r = 054 Using an alha value of α = 005, is his observed correlaion significanly differen han zero? 3) Your friend ges you o samle 13 uffy beer from a oulaion and measure boh heir rogress and heir hainess You calculae ha heir rogress correlaes wih hainess wih r = -05 Using an alha value of α = 005, is his observed correlaion significanly less han zero? 4) You go ou and samle 14 amygdalas from a oulaion and measure boh heir raffic and heir sofness You calculae ha heir raffic correlaes wih sofness wih r = 0 Using an alha value of α = 005, is his observed correlaion significanly less han zero? 5) You decide o samle 24 fingerrins from a oulaion and measure boh heir hainess and heir recogniion You calculae ha heir hainess correlaes wih recogniion wih r = 019 Using an alha value of α = 001, is his observed correlaion significanly differen han zero? 6) Wihou anyhing beer o do, you samle 6 daughers from a oulaion and measure boh heir cash and heir widh You calculae ha heir cash correlaes wih widh wih r = -075 Using an alha value of α = 001, is his observed correlaion significanly differen han zero? 7) You samle 14 widgis from a oulaion and measure boh heir culure and heir smell You calculae ha heir culure correlaes wih smell wih r = -032 Using an alha value of α = 001, is his observed correlaion significanly less han zero? 8) Le s samle 23 siky brains from a oulaion and measure boh heir imorance and heir cos You calculae ha heir imorance correlaes wih cos wih r = -026 Using an alha value of α = 001, is his observed correlaion significanly less han zero? 9) You go ou and samle 25 baseballs from a oulaion and measure boh heir evil and heir informaion You calculae ha heir evil correlaes wih informaion wih r = 023 Using an alha value of α = 005, is his observed correlaion significanly greaer han zero? 10) Jus for fun, you samle 25 Asian food from a oulaion and measure boh heir homework and heir disance You calculae ha heir homework correlaes wih disance wih r = 014 Using an alha value of α = 001, is his observed correlaion significanly greaer han zero? 6

Answers 1) Correlaion beween jusice and waer of living bus riders r obs = 024 = 11596 cri = 172(df = 22) or r cri = 034 We fail o rejec H 0 The correlaion beween jusice and waer for living bus riders is no significanly greaer han zero, r(22) = 024, = 01293 r <- 024 df <- 24-2 # Fisher s z ransform <- r/sqr((1-r^2)/df) [1] 1159591 <- (,df,0,lowerail=false) [1] 01293231 # APA forma: srinf( r(%g) = %42f, = %54f,df,r,) [1] "r(22) = 024, = 01293" 2) Correlaion beween safey and ain hreshold of orid cows r obs = 054 = 14346 cri = ±257(df = 5) or r cri = ±075 We fail o rejec H 0 The correlaion beween safey and ain hreshold for orid cows is no significanly differen han zero, r(5) = 054, = 02109 r <- 054 df <- 7-2 # Fisher s z ransform <- r/sqr((1-r^2)/df) [1] 1434629 <- 2*(abs(),df,0,lowerail = FALSE) [1] 02108582 # APA forma: srinf( r(%g) = %42f, = %54f,df,r,) [1] "r(5) = 054, = 02109" 3) Correlaion beween rogress and hainess of uffy beer r obs = 05 = 19149 cri = 180(df = 11) or r cri = 048 7

We rejec H 0 The correlaion beween rogress and hainess for uffy beer is significanly less han zero, r(11) = -05, = 00409 r <- -05 df <- 13-2 # Fisher s z ransform <- r/sqr((1-r^2)/df) [1] -1914854 <- (,df,0,lowerail=true) [1] 004093212 # APA forma: srinf( r(%g) = %42f, = %54f,df,r,) [1] "r(11) = -050, = 00409" 4) Correlaion beween raffic and sofness of amygdalas r obs = 0 = 0 cri = 178(df = 12) or r cri = 046 We fail o rejec H 0 The correlaion beween raffic and sofness for amygdalas is no significanly less han zero, r(12) = -0, = 05 r <- -0 df <- 14-2 # Fisher s z ransform <- r/sqr((1-r^2)/df) [1] 0 <- (,df,0,lowerail=true) [1] 05 # APA forma: srinf( r(%g) = %42f, = %54f,df,r,) [1] "r(12) = -000, = 05000" 5) Correlaion beween hainess and recogniion of fingerrins r obs = 019 = 09077 cri = ±282(df = 22) or r cri = ±052 We fail o rejec H 0 The correlaion beween hainess and recogniion for fingerrins is no significanly differen han zero, r(22) = 019, = 03739 r <- 019 df <- 24-2 # Fisher s z ransform 8

<- r/sqr((1-r^2)/df) [1] 09077138 <- 2*(abs(),df,0,lowerail = FALSE) [1] 03738656 # APA forma: srinf( r(%g) = %42f, = %54f,df,r,) [1] "r(22) = 019, = 03739" 6) Correlaion beween cash and widh of daughers r obs = 075 = 22678 cri = ±460(df = 4) or r cri = ±092 We fail o rejec H 0 The correlaion beween cash and widh for daughers is no significanly differen han zero, r(4) = -075, = 00859 r <- -075 df <- 6-2 # Fisher s z ransform <- r/sqr((1-r^2)/df) [1] -2267787 <- 2*(abs(),df,0,lowerail = FALSE) [1] 00859375 # APA forma: srinf( r(%g) = %42f, = %54f,df,r,) [1] "r(4) = -075, = 00859" 7) Correlaion beween culure and smell of widgis r obs = 032 = 117 cri = 268(df = 12) or r cri = 061 We fail o rejec H 0 The correlaion beween culure and smell for widgis is no significanly less han zero, r(12) = -032, = 01324 r <- -032 df <- 14-2 # Fisher s z ransform <- r/sqr((1-r^2)/df) [1] -1170036 <- (,df,0,lowerail=true) [1] 01323501 # APA forma: srinf( r(%g) = %42f, = %54f,df,r,) 9

[1] "r(12) = -032, = 01324" 8) Correlaion beween imorance and cos of siky brains r obs = 026 = 12339 cri = 252(df = 21) or r cri = 048 We fail o rejec H 0 The correlaion beween imorance and cos for siky brains is no significanly less han zero, r(21) = -026, = 01154 r <- -026 df <- 23-2 # Fisher s z ransform <- r/sqr((1-r^2)/df) [1] -1233905 <- (,df,0,lowerail=true) [1] 01154349 # APA forma: srinf( r(%g) = %42f, = %54f,df,r,) [1] "r(21) = -026, = 01154" 9) Correlaion beween evil and informaion of baseballs r obs = 023 = 11334 cri = 171(df = 23) or r cri = 034 We fail o rejec H 0 The correlaion beween evil and informaion for baseballs is no significanly greaer han zero, r(23) = 023, = 01344 r <- 023 df <- 25-2 # Fisher s z ransform <- r/sqr((1-r^2)/df) [1] 1133428 <- (,df,0,lowerail=false) [1] 01343557 # APA forma: srinf( r(%g) = %42f, = %54f,df,r,) [1] "r(23) = 023, = 01344" 10) Correlaion beween homework and disance of Asian food r obs = 014 = 06781 cri = 250(df = 23) or r cri = 046 10

We fail o rejec H 0 The correlaion beween homework and disance for Asian food is no significanly greaer han zero, r(23) = 014, = 02522 r <- 014 df <- 25-2 # Fisher s z ransform <- r/sqr((1-r^2)/df) [1] 06780946 <- (,df,0,lowerail=false) [1] 02522386 # APA forma: srinf( r(%g) = %42f, = %54f,df,r,) [1] "r(23) = 014, = 02522" 11