───✱*.。:。✱*.:。✧*.。✰*.:。✧*.。:。*.。✱ ───

Correlation measures the relationship between two variables, including the strength and direction between them.

Directions

  • Either positive, negative, or flat (no relationship)

Mean

  • 𝑥 → mean
  • 𝑥𝑖 → individual value

Standard Deviation

  • Measures the average deviation of the data from the mean
  • 𝜎=𝑛𝑖=1(𝑥𝑖𝑥)2𝑛

Variance

  • Measures how spread out the data is form the mean
  • Units are squared units of the data. If 𝑥 is in meters, variance is meters2
  • 𝑣=𝜎2=(𝑥𝑖𝑥2)𝑛

Covariance

  • cov(𝑥,𝑦) measures how 2 variables vary together
  • Positive → both increase/decrease together
  • Negative → one increases and the other decreases
  • cov(𝑥,𝑦)=(𝑥𝑖𝑥)(𝑦𝑖𝑦)𝑛1
    • Similar to the variance formula, but we use 𝑦 rather than squaring 𝑥

Correlation Coefficient

  • Referred to as 𝑟, where 𝑟[1,1]
  • 𝑟=cov(𝑥,𝑦)𝜎𝑥𝜎𝑦,𝑟[1,1]

Strength

  • The magnitude of 𝑟 represents the strength of the relationship
    • |𝑟|=1 → perfect
    • |𝑟|[0.8,0.9] → strong
    • |𝑟|[0.7,0.5] → medium
    • |𝑟|[0.1,0.4] → weak
    • |𝑟|=0 → no relationship

Direction

  • Positive → variables increase together
  • Negative → variables move in opposite directions

───✱*.。:。✱*.:。✧*.。✰*.:。✧*.。:。*.。✱ ───