Upload
ian-stanley
View
19
Download
3
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
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?
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
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.
Testing for statistical signficance of RCTs
Are the results reliable?A T-test simply measures whether there is a reliable difference
between two means
Control groupAverage collection
Treatment groupAverage collection
Calculating a t-test(for unpaired samples, unequal variance)
T statistic= difference between groupsVariance within groups
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
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
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.
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
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