12
Homework #2: Calculating a correlation year GDP/capita ODA (millions) 2000 200 173 2001 200 175 2002 220 175 2003 240 176.5 2004 300 178 2005 270 179 2006 375 400 2007 350 1000 2008 375 400 2009 400 200 2010 450 200 NOTE: these have different scale so I wouldn’t graph them together, but you could do two separate graphs. Do they move together?

Homework #2: Calculating a correlation

Embed Size (px)

DESCRIPTION

Homework #2: Calculating a correlation. NOTE: these have different scale so I wouldn’t graph them together, but you could do two separate graphs. Do they move together?. Calculating a correlation in Excel. Click on an empty cell and click on Insert function. - PowerPoint PPT Presentation

Citation preview

Page 1: Homework #2: Calculating a correlation

Homework #2:Calculating a correlation

year GDP/capita ODA (millions)

2000 200 173

2001 200 175

2002 220 175

2003 240 176.5

2004 300 178

2005 270 179

2006 375 400

2007 350 1000

2008 375 400

2009 400 200

2010 450 200

NOTE: these have different scale so I wouldn’t graph them together, but you could do two separate graphs. Do they move together?

Page 2: Homework #2: Calculating a correlation

Calculating a correlation in Excel

• Click on an empty cell and click on Insert function.

• Choose Correlation (either Correl or Pearson will work)

• Highlight array #1 (i.e. highlight the entire GNP/capita series) and then choose the second array (i.e. tech, ed., etc). Both arrays should span the same time period and have the same number of observations

Page 3: Homework #2: Calculating a correlation

Interpretation

(+) positive relationship between the two variables (1 would be a perfect correlation). They move together.

(-) Negative relationship (-1 would be perfectly negative correlation). They move in the opposite direction

0 If it is close to zero, there is no correlation.

Page 4: Homework #2: Calculating a correlation

Testing for statistical signficance of RCTs

Page 8: Homework #2: Calculating a correlation

Excel's TTEST

Excel takes the T statistic and the degrees of freedom (based on the sample size (N-2)) to calculate a

p-value: a test to see if you results are statistically significantWhen you do TTEST in Excel, it will return the p-value

Page 9: Homework #2: Calculating a correlation

P values: The smaller, the more significant!

Statistical significanceGood*:If it is less than 0.1 then the two samples are statistically differentThere’s a 1/10 chance that the difference is due to chanceBetter**:If it is less than 0.05There’s a 1/20 chance that the difference is due to chanceBest***:Less than 0.01There’s a 1/100 chance that the difference is due to chance

Page 10: Homework #2: Calculating a correlation

Using Excel to calculate a t-test

Click on empty cellInsert function TTESTChoose first array (control)Choose second array (treatment)Choose 2 tailed distributionChoose 3 sample unequal varianceEnterResult shows p value.

Page 11: Homework #2: Calculating a correlation

Excel calculation

Calculate the following:1. Mean of control, Mean of treatment2. P-value of TTEST

Cans of food collectedcontrol treatment

0 10 13 04 00 20 32 21 14 22 20 22 31 41 00 10 10 01 12 20 21 20 32 10 00 00 21 11 00 21 1

total 29 42

Page 12: Homework #2: Calculating a correlation

Excel calculation

Calculate the following:1. Mean of control, Mean of treatment

0.966667 and 1.4

2. Pvalue of TTEST 0.143184 > 0.10 so NOT statistically significant at 10% level

Cans of food collectedcontrol treatment

0 10 13 04 00 20 32 21 14 22 20 22 31 41 00 10 10 01 12 20 21 20 32 10 00 00 21 11 00 21 1

total 29 42