Pearson's correlation coefficient when applied to a population is commonly represented by the Greek letter (rho) and may be referred to as the population correlation coefficient or the population Pearson correlation coefficient. The formula for is:
x <- 1:100 y <- x + rnorm(length(x),0,10) cor_est <- cor(x,y)
This stencil creates two variables, , the series of numbers and , which is linearly related to with normally distributed errors,
The correlation between and was 0.951.