March 18, 2019

- correlation
- technical details

- random association
- \(p\) values

degree of association or relationship between the **observed** values taken by two variables (\(X\) and \(Y\))

- Many different ways of doing this (compare group means, regression) are all fundamentally about correlation.
- correlations have a
**direction**:- positive: implies that as \(X\) increases, \(Y\) increases
- negative: \(X\) increases, \(Y\) decreases

- correlations have
**strength**(has nothing to do**size of effect**):**strong**: \(X\) and \(Y\) almost**always**move together**weak**: \(X\) and \(Y\) do not move together very much

- There is also a
**technical**definition of correlation (later)

(Pearson) **correlation**: also has specific **mathematical** definition (you don't need to know it):

\[r = \frac{\sum_{i}^n (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_i^n(x_i - \bar{x})^2}\sqrt{\sum_i^n (y_i - \bar{y})^2}}\]

This captures extent to which deviations from mean of \(X\) move with deviations from mean of \(Y\).

**mathematically**: correlation is the degree of **linear** association between \(X\) and \(Y\)

- Takes values between \(-1\) and \(1\)
- Values close to \(1\) or \(-1\) suggest
**high**degree of*linear*association - Values close to \(0\) suggest
**low**degree of*linear*association - Value of correlation does
**not**tell us**how much**\(Y\) changes with \(X\)

**negative correlation**: (correlation \(< 0\)) values of \(X\) and \(Y\) move in opposite direction:

- higher values of \(X\) appear with lower values of \(Y\)
- lower values of \(X\) appear with higher values of \(Y\)

**positive correlation**: (correlation \(> 0\)) values of \(X\) and \(Y\) move in same direction:

- higher values of \(X\) appear with higher values of \(Y\)
- lower values of \(X\) appear with lower values of \(Y\)