Questions tagged [covariance]

Covariance is a quantity used to measure the strength and direction of the linear relationship between two variables. The covariance is unscaled, & thus often difficult to interpret; when scaled by the variables' SDs, it becomes Pearson's correlation coefficient.

Filter by
Sorted by
Tagged with
2
votes
0answers
20 views

Best approximation of the Mahalanobis distance by standardized Euclidean distance

I am looking for the best way to approximate the Mahalanobis distance by the standardized Euclidean distance, which would reduce the number of the required multiplications. The easiest way is the ...
-1
votes
0answers
8 views

Covariance of variables [closed]

Let X, Y, and Z be random variables. How do we compute the Cov(aX+b,cY+dZ)? Thank you.
-1
votes
0answers
23 views

Covariance of two or more random variables [closed]

Let X, Y, and Z be random variables. Suppose that the variance of X is a, Cov(X,Y) =b, Cov(X,Z) =c , and Cov(Y,Z) =d. I want to compute Cov(6X+3Y). Is this equal to 63b? Also, to compute the following:...
0
votes
0answers
12 views

Alternative to Proc IML? Using SAS Viya without IML available [closed]

I'm running the SAS Viya environment and do not have access to IML. However, I need to use the following code, or something similar, to calculate standard errors accurately by combining the covariance ...
0
votes
0answers
15 views

Unbiased Estimation of Mixed 3rd-Order Moment

Let $X$ be a random variable on the space $\mathcal{X}$, and let $f, g$ be two well-behaved functions $: \mathcal{X} \to \mathbf{R}$ such that \begin{align} \bar{f} = \mathbf{E} [ f(X) ] < \infty \\...
0
votes
0answers
21 views

covariance of squared projections

Given a vector $x$ of independent mean-zero random variables, and two nonrandom orthogonal unit vectors $u,v$, does $u'v=0$ imply $cov(x'uu'x,x'vv'x)=0$? If so, what is the proof? If not, what happens ...
0
votes
1answer
41 views

Why is SSXY used in calculating covariance?

I am reading an introductory statistics book and am lost at the authors explanation for covariance. I follow up until the point the author arrives at: $$cov(x,y)=E(xy)-E(x)E(y)$$ However, they then go ...
3
votes
1answer
28 views

Covariance of Sum of Random Variables [closed]

Let $a_1,a_2,b,c_1,c_2,d$ be constants and assume $X_1, X_2, Y_1, Y_2$ are Random Variables. I am trying to prove $$Cov(a_1X_1+a_2X_2+b, c_1Y_1+c_2Y_2+d)= a_1c_1Cov(X_1,Y_1)+a_1c_2Cov(X_1,Y_2)+...
1
vote
1answer
27 views

Covariance scalar from matrix

I am trying to implement SSIM Structural similarity in Python. One of the necessary elements is the covariance between the two matrices. Using numpy.cov() We get a ...
1
vote
0answers
43 views

Compute joint probability distribution of dependent random variables

Let $X$ and $Y$ be jointly normal random variables with mean 0 and covariance matrix \begin{pmatrix} 1~~\rho \\ \rho~~1 \end{pmatrix}, where $\rho=-\frac{q}{1-q}$. X and Y are used to define an ...
0
votes
0answers
12 views

Testing particular value of correlation / covariance

I'm writing code for a Monte Carlo simulation and I know that a particular subset of generated values should be independent identically, normally distributed with covariance have a fixed covariance ...
1
vote
1answer
16 views

Deriving joint probabilities from marginal probabilities & polychoric correlations

Given three ordered-categorical variables: $u_1, u_2, u_3$ with $K$ categories, I'm trying to derive their expected variance-covariance matrix using their marginal probabilities, thresholds, and ...
3
votes
1answer
14 views

Comparison / Selection of covariance structures - linear mixed model in SPSS

Hi together, I am currently trying to build a linear mixed model with repeated measurements in SPSS. I would expect that the correlation between my measurements is highest at adjacent time points, so ...
6
votes
1answer
151 views

What is the name of this quantity?

Given two vectors $X$ and $Y$ (length $n$, sampled from random variables), what is the name of the following quantity: $$ \frac{1}{n^2}\sum_{i=1}^n\sum_{j=1}^n(x_i-y_j)^2 $$ I 'came up' with the ...
1
vote
0answers
15 views

Unable to match numerical output of Newey-West standard error in statsmodel

I'm trying to implement Newey-West from scratch to better understand each component. Currently having trouble replicating a basic numerical example of Newey-West with lag=1 from ...
0
votes
0answers
13 views

Trying to calculate error for equation with dependent variables

I have the following equation for which I am trying to calculate the error in: $$v=b+c/t$$ $t$ is error-less but $b$ and $c$ depend on each other and therefore I cannot use the standard addition in ...
0
votes
0answers
18 views

Approximating mean/covariance of truncated/folded/censored normal distribution

Given a normally distributed $X$, what is the best way to approximate the covariance matrix and mean vector of $\tilde{X} = \max(0, X)$? I am interested in the censored distribution, but the truncated ...
1
vote
0answers
53 views

Robust Covariance in Multivariate / Multi-response OLS

Assume we are in the OLS setting with $y = X\beta + \epsilon$. When $y$ is a response vector, and $X$ are covariates, we can get two types of covariance estimates: The homoskedastic covariance $cov(\...
0
votes
0answers
15 views

How to calculate Newey-West adjusted covariance matrix?

I have a $T \times N$ matrix of asset returns, where $T$ = number of periods, and $N$ = number of assets. Calculating the covariance matrix of this set of returns is simple. How do I calculate the ...
0
votes
1answer
47 views

Computing the covariance of the truncated normal distribution

In the paper On Moments of Folded and Truncated Multivariate Normal Distributions on page 17, one can find the explicit expression for low order moments of the truncated multivariate normal ...
0
votes
1answer
37 views

EWMA covariance matrix number of lags

When calculating an exponentially weighted covariance matrix for t observations, formula 10.2 here: https://www.oreilly.com/library/view/analysis-of-financial/9781118017098/c10_level1_1.xhtml Uses ...
3
votes
2answers
60 views

How to show $\rho(\beta_0, \beta_1) \leq 0$?

Consider a simple linear regression $Y_i = \beta_0 + \beta_1x_i + \epsilon_i$ where each $\epsilon_i \sim N(0, \sigma^2)$. The solution to the linear regression problem is given by $\pmb{\beta} = (\...
3
votes
1answer
63 views

Interpretation of multiple regressions posterior distribution

I'm interested in how we evaluate performance of Bayesian regression (linear, multiple, logistic, etc.) The posterior distribution will capture the relative likeliness of any parameter combination. So ...
1
vote
0answers
25 views

Multiplying vector by the covariance matrix only known approximately

(cross-posted on math.SE) For random variable $(x,y)$ in $\mathbb{R}^{2d}$ and vector $v$, I need to perform the following operation on a $d \times d$ covariance matrix $E[xy']$ $$T(v)=E[xy']v$$ The ...
1
vote
1answer
34 views

Finding the distribution of [F; X]

I need to find the distribution of \begin{bmatrix}F\\X\end{bmatrix} where = (F1, F2, X1, X2, X3)^T This is the solution to the problem: I don't really understand the part of $D([F; X])$. Why there ...
0
votes
0answers
10 views

Covariance-based classification

Let's say we want to figure out if cats and rats are different from each other from some observable parameters, for example, weight and whisker length. First, we check if we can tell them apart by ...
0
votes
1answer
20 views

Correlation between two vectors sharing some elements

Suppose $\mathbf{x,y}$ are column vectors of length $n$, where $x_i,y_i \sim \mathcal{D}, \forall i \in \{1,2,\ldots ,n\}$. $\mathbf{z}$ shares $m$ elements with $\mathbf{x}$ and $n-m$ elements with $\...
1
vote
0answers
132 views

Is it possible to reconstruct a regression coefficient from a truncated regression output?

I am trying to help a friend solve an exam question and I fear that I am missing the obvious solution. Problem: Students are provided a regression output from R. Just a simple linear OLS estimation ...
1
vote
0answers
33 views

replace variable in a linear model with new variable with same covariance that yields the same least-sqares parameter estimate

Consider the following linear model, which explains the relation between a $d$-dimensional set of explanatory variables $\{\mathbf{X},D \}$ and a 1-dimensional effect variable $Y$ ($\{\mathbf{X},D \}$ ...
0
votes
0answers
19 views

Confidence intervals for a joint probability distribution [duplicate]

I've asked this question before but it was marked as a duplicate with this question that didn't answer my question. My question is as follows: I have a 2-D probability distribution along the lines of ...
0
votes
0answers
22 views

Generalizing variance to two dimensions [duplicate]

I have a 2-D probability distribution along the lines of this plot: I know how to find the confidence interval for a 1-D probability distribution (by the definition of standard deviation or the 68-95-...
3
votes
1answer
80 views

Covariance between $X$ and a non-decreasing function of $X$

During my stats class, the teacher mentionned the following property of univariate covariance. I was not able to figure out how to derive it, neither find other posts talking about it. Suppose $X$ is ...
2
votes
0answers
23 views

How to remove the covariance of two measurement methods in order to separately estimate the variance of each

I wish to compare two different methods of measuring an underlying property, and wish to extract the variance of each method of measurement, independent of the other. The problem is how to correctly ...
2
votes
2answers
54 views

Correlation of $X$ and $Y$ and Correlation of $\frac{1}{X}$ and $Y$

Assume the two random variables $X$ and $Y$. The correlation of these two variables is given by the formula: $\rho_{X,Y} = \frac{Cov(X,Y)}{\sigma_{X}\sigma_{Y}}$ Assume now that the two random ...
0
votes
0answers
12 views

Box's M fewer than two nonsingular cell covariance matrices

would appreciate some help with the following problem. While running a MANCOVA i received the following error message from SPSS: " Box's Test of quality of Covariance Matrices is not computed ...
0
votes
1answer
29 views

Principle component regression accounting for age and sex

Should I include covariates (i.e. age and sex) in the principle component regression as predictors? Or do I not need to do that because they were accounted for in the PCA? Any help would be greatly ...
0
votes
0answers
6 views

What is the proper way to isolate the covariance operation with regards to sums of random variables?

The question is simple, but I want to get all the steps right, but things get a little trick with all the summations needed. But, in the following covariance calculation, how can I develop the algebra ...
0
votes
0answers
18 views

Interpretation of Frobenius norm of covariance matrix?

Is there a statistical interpretation of the Frobenius norm of covariance matrix? More specifically, I have a transformation $Y=T(X)$ where the following holds, what can we say about $T$? $$\|E[YY']\|...
6
votes
1answer
148 views

Multiplying vectors by the covariance matrix?

I thought I knew covariance but I'm starting to think that there's more to it. For example, what happens when you multiply observations by their corresponding covariance matrix? ...
1
vote
1answer
50 views

What is the conditional covariance matrix of $(X_2,X_3)^T$ given $X_1$?

$X=(X_1,X_2,X_3)^T\sim N_3(\mu,\Sigma).$ Suppose $X_1,...,X_{20}$ are i.i.d. observations from $X$. The sample mean vector and the covariance matrix are then defined by $$ \bar{x} = (1,0,2)^T,\quad S=...
0
votes
0answers
20 views

Difference between the following two covariance expressions

What is the difference between $\sum_{i=1}^{5} (x_i-\bar{x})*(y_i-\bar{y})$ and $\sum_{i=1}^{5}\sum_{j=1}^{5} (x_i-\bar{x})*(y_j-\bar{y})$? Which of these is proportional to covariance? What is the ...
0
votes
0answers
12 views

Need help interpreting relationship correlation and covariance with scatter plot

I'm having a bit of trouble interpreting this data. The correlation is very low and I'm assuming that covariance is low given the equation Cor(x,y) = Cov(x,y)/Sd(x)Sd(y). Although, the scatter plots ...
0
votes
0answers
25 views

Multinomial Probability Model with Correlation between random variables

I'm trying to create a p.m.f. for a Multinomial distribution where the variables are correlated with one another. Let $k$ index the random variables $x$ and their probabilities $p$. There are to be $n$...
0
votes
1answer
24 views

Relationship of x regress y and y regress x on the slope

Consider a linear regression model y on x and x on y. We have $Y = a'X + a$ where $a' = \frac{cov(X,Y)}{Var(X)}$. Equivalently, we have $X = b'Y+b$ where $b' = \frac{cov(X,Y)}{Var(Y)}$. I am ...
0
votes
0answers
36 views

Covariance matrix of residuals [duplicate]

I am trying to do an optimization process that minimizes the residuals of an OLS regression. Typically the unbiased OLS residual variance is given by : E(RSS/N−p-1)=σ². Where RSS is the Residual Sum ...
1
vote
1answer
64 views

Proof: If a matrix is semi-definite and symmetric positive then it is a covariance matrix

Anyone have the following proof? If a matrix is semi-definite positive and symmetric then it is a covariance matrix.
1
vote
1answer
33 views

Understanding covariance

I came across following problem: A discrete random variable $P$ takes values $-3,-2,0,2,3$ with probability $0.2$. Let $Q=P^2$ be another random variable. What is covariance of $P$ and $Q$? I solved ...
2
votes
2answers
35 views

Covariance for Random Variables vs. Sample Data

In my textbook, it says that the formula for finding covariance between two random variables is: $Cov(X,Y)=E((X-EX)(Y-EY))$ With $EY$ and $EX$ being the mathematical expectation for the random ...
0
votes
0answers
25 views

Shrunken covariance matrix in the Sparse inverse covariance selection

The original version of the L1 regularization method uses sample covariance matrix ${\mathbf{S}}$ as follows: \begin{equation} \hat{\mathbf{\Omega}}= argmin_{\mathbf{\Theta}\succ 0} \bigg(tr(\...
-1
votes
1answer
68 views

How come covariance can pick up non-linear relationships but correlation can't? [closed]

correlation is computed from covariance so how come covariance can pick up non-linear relationships between variables $X$ and $Y$ but (Pearson's) correlation can't?

1
2 3 4 5
28