#flashcards/stats
Correlation is a measure of strength in a linear relationship
$r$ is the Correlation coefficient, which describes the amount of Correlation in a data set.
Formula for correlation coefficient::$$r=\frac{\sum_{i=1}^n(x_i-\bar{x})(y_i-\bar{y})}{(n-1)s_xs_y}$$
Where $\bar{x}$ is the [[Measures of central tendency|mean]] and $s_x$ is the [[Frequency distributions#Standard deviation|standard deviation]]
for [[Jointly distributed random variables]],$$\rho_{x,y}=\frac{\sigma_{xy}}{\sigma_x\ \sigma_y}$$Where $\sigma_x$ is the variance of [[random variables|random variable]] x and $\sigma_{xy}$ is the [[Jointly distributed random variables|covariance]] of X and Y
r or $\rho$ > 0: +ve correlation
r or $\rho$ < 0: -ve correlation
r or $\rho=0$ : No correlation
?
- $-1\le r\le1$
-
$y_i=a+bx_i$ then r=1 (b>0)
-
$y_i=a+bx_i$ then r=-1 (b<0)
- Correlation does not change if constants change(remain +ve) in a [[Linear transformation]]
$x_i$,$y_i$ -> $a+bx_i$,$c+dy_i$
r remains constant