Advanced Statistics - Biology 6030
Bowling Green State University, Fall 2017
Analysis of associations between variables: Pearson's Product-Moment Correlation
- characterize the relationship between two variables with unknown dependence to determine the strength and direction of the linear association between 2 variables.
- variables with unknown dependence (dependent or independent variables)
- no asumptions about causality (Correlation analysis vs. Regression analysis)
- plot of X and Y
- continuous and normally distributed (recode or transform)
- confirm homogeneity of samples
How this is done
- Calculate Variance for 1 variable or Covariance
- Variance = (X-) * (X-)
- Covariance = (X-) * (Y-)
- Pearson's Product-Moment Correlation: Correlation coefficients are the standardized covariance between two variables. It is best used if the relationship is believed to be linear.
or using an equivalent computer formula that can be calculated in a single pass of the data.
- the t-statistic allows you to test for significance of the correlation coefficient. r = correlation between two variables in the entire population. Ho: r = 0; Ha: r != 0. Compare to a t-distribution and n-2. n refers to the number of paired measures.
In R first import the datafile DummyData, then calculate terms for the correlation for variables "Age", "Brightness" and "Size", then report the results:
> dummy <- read.table("/DummyData.txt", header=TRUE, sep="", na.strings="NA", dec=".", strip.white=TRUE)
> cor.test(dummy$Brightness, dummy$Size, alternative="two.sided", method="pearson")
last modified: 2/3/14
This material is copyrighted and MAY NOT be used for commercial purposes, © 2001-2017 lobsterman.
[ Advanced Statistics Course page | About BIO 6030 | Announcements ]
[ Course syllabus | Exams & Grading | Glossary | Evaluations | Links ]