03 Random Variables: Covariance, Correlations & Linear Model Flashcards
What is covariance?
- measure of the joint variability of two random variables
- strength of dependence of variables
What is the difference of variance and covariance?
variance = covariance with itself
What is the covariance between x ∈ ℝ¹ and y ∈ ℝ¹ ?
σₓᵧ = E[xy] - E[x] E[y] = Cov (x, y)
What does a Cov(x,y) > 0 indicate?
that there is a positive relationship between x and y
What is the variance of x ∈ ℝ¹ ?
σₓₓ = Var(x) = E[x²] - (E[x])²
What is the covariance matrix of x ∈ ℝᵖ ?
Σₚₓₚ = E[(x - μ)(x - μ)ᵀ] => Matrix of ( σₓ₁ₓ₁…. etc) = Matrix of (σ₁₁ … etc)
How does the covariance help to describe the properties of X ∈ ℝᵖ ?
X ~ (μ, Σ) = X ~ ( E[x], Var [x] )
What is Σₓᵧᵀ?
Σᵧₓ
What is Σₓᵧ ?
Cov (X, Y) = E[(x - μ)(y - E[y])ᵀ] = E[XYᵀ] - E[X]E[Yᵀ]
=> Matrix of ( σₓ₁ᵧ₁…. etc)
How can you rewrite Var(A , x+b)?
Var(A , x+b) = A Var(X) Aᵀ
How can you rewrite Cov(X+Y , Z)?
Cov(X+Y , Z) = Cov ( X, Z) + Cov (Y, Z)
How can you rewrite Cov(AX, BY)?
Cov(AX, BY) = A Cov(X, Y) Bᵀ
What is Cov (X, Y) if X and Y are independent?
Cov (X, Y) = 0 ₚₓᵩ
How do you estimate μ?
^μ = n⁻¹ Xᵀ 1ₙ
What values can ρ take and what is it?
[-1, 1], correlation coefficient
How can you write the correlation matrix and what do its components mean?
P = D⁻¹/² Σ D⁻¹/²
Σ…..Cov (X, Y)
D…..diagonal matrix of variances
What is ρ (x, y) when x and y ∈ ℝ¹ ?
σₓᵧ / √ [ σₓₓσᵧᵧ ]
What does ordinary least squares stand for?
That you minimze the sum of squared errors
What are the linear regression model and two defining properties?
- Y = Xβ + ε
- E[ε] = 0ₙ
- Var(ε) = σ² Iₙ
What is the estimator for β?
^β = ( XᵀX )⁻¹ XᵀY
What is the estimated error term?
^ε = Y - ^Y
What is the estimated variance?
^σ = √ [ (^εᵀ ^ε)/(n-p) ]
How can you find D from Σ (in order to find the correlation matrtix)
D are the diagonal elements of Σ
When given Y and X and you are asked to conduct linear regression analysis, what do you do?
1) find estimator ^β
2) calculate the predicted ^Y
3) calculate the error term ^ε
4) calculate the variance ^σ
What can help when calculating Σ and P?
They are symmetric so only need to calculate half