Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
2answers
19 views

Covariance of two normally distributed variables

I saw in a statistic book that "It can be prooved that if two normally distributed variables have covariance = 0, they are independent". How can I start this proof? Can I say that $cov(X,Y) = E(XY) ...
0
votes
0answers
17 views

Finite second moments inhertitable to conditional variables?

Assume a random vector $\mathbf{x}=(x_1,\ldots,x_n)^\top$ that has finite second moments, i.e., $$\int\mathbf{x}\mathbf{x}^\top\rho(\mathbf{x})\,\text{d}\mathbf{x} < \infty.$$ Does it follow that ...
2
votes
1answer
49 views

Minimum variance of the mean for $n$ correlated random variables

If $X_1,\cdots,X_n$ all have the same variance equal to 1, then $0\leq \mbox{Var}[\bar{X}]\leq 1$ where $\bar{X}=(X_1 + \cdots + X_n)/n$. The upper bound is attained if $\mbox{Cov}[X_k,X_l]=1$ for all ...
0
votes
1answer
38 views

Variance and covariance inequality

Given a real-valued random variable $X$, is $$2\mathbb E[X] \mathrm{Var}(X) \geq \mathrm{Cov}(X, X^2)$$ true? Any pointers for how to tackle this problem would be immensely helpful.
2
votes
1answer
31 views

Does $\text{cov}(a_1' X, a_2' X) = 0$ imply $a_1 \cdot a_2 = 0$?

Let $X$ be a $p$-dimensional random vector with $p$ principal components $y_1, y_2, \dots, y_p$. By definition, a restriction put on the second principal component $y_2 = a_2'X$ is $$ \text{cov}(y_1, ...
0
votes
0answers
15 views

Variance of ratio of a time series of random numbers

Say we have a time series($X_0, X_1, ..., X_n$) with only the first element $X_0$ known, rest being random. How can we express: $$ {\rm var} \frac{X_n}{X_0} = f({\rm var} \frac{X_i}{X_{i-1}})$$ Don'...
0
votes
0answers
21 views

Notation problem with sparse regularized correlation matrix

I am trying to apply a specific method to obtain a sparse correlation matrix $R$ from a regularized correlation matrix $\Sigma^{\delta}$, which was computed from $N$ observations of a multivariate ...
0
votes
0answers
18 views

Interpretation of $det(X'X)$ in MLR

I would like to understand the interpretation of $det(X'X)$ in case of multiple regressors. $Var(x) = \sum_i^n(x_i-\bar{x})^2 = \frac{1}{n}\sum_i^nx_i^2 - \bar{x}^2 = \frac{1}{n}\sum_i^nx_i^2 - \frac{...
1
vote
0answers
20 views

Variance of a hypergeometric distribution

I'm trying to answer the following question from Ross's book: A pond contains 100 fish, of which 30 are carp. If 20 fish are caught, what are the mean and variance of the number of carp among the 20? ...
1
vote
0answers
29 views

Convergence of covariance matrix

I was looking for a simple way to find the number of samples $n$ needed to get a decent approximation to the covariance matrix $\boldsymbol{\Sigma}$. Given a random sample $\{ \mathbf{X}_1,\mathbf{X}...
0
votes
1answer
20 views

Usage of sample covariance and sample mean

I understand the difference between sample mean/covariance and population mean/covariance and how to calculate them. However, I'm a bit unsure about what happens afterwards. If I only have the sample ...
3
votes
1answer
37 views

Misunderstanding of time series autocovariance

I'm reading the "Time Series: Theory and Methods (2nd ed.)" by P.J.Brockwell and R.A.Davis. I've stopped at the one moment at pp.218-219 (Chapter 7 "Estimation of the mean and the Autocovariance ...
1
vote
0answers
13 views

Using coeftest results in predict.lm() in R [closed]

I am analyzing a dataset in which the variance of the error term in my regression is not constant for all observations. For this, I re-built the model, estimating heteroskedasticity-robust (Huber-...
0
votes
0answers
26 views

Method of moment through covariance derivation

Given a Bivariate INAR(1) Poisson Process: $Y_t^1 = \rho_1 * Y_{t-1}^1+R_t^1$ $Y_t^2 = \rho_2 * Y_{t-1}^1+R_t^2$ Where $R_t^1$ and $R_t^2$ are the innovation terms and follow the bivariate Poisson ...
1
vote
1answer
23 views

Finding optimal subspace for Linear Discriminant Analysis - Elements of Statistical Learning 4.3.3

Linear Discriminant Analysis (LDA) possibly operates a dimension reduction. Section 4.3.3 in Elements of Statistical Learning explicits this notion as well as a method for computing the "optimal ...
1
vote
1answer
20 views

Computation of LDA in Elements of Statistical Learning 4.3.2

Elements of Statistical Learning 4.3.2 elaborates on computation for Linear Discriminant Analysis. https://web.stanford.edu/~hastie/Papers/ESLII.pdf Procedure is said to be • Sphere the data with ...
0
votes
1answer
28 views

Question about Covariance

Let $z$ be an $m$ dimensional vector distributed as $z \sim N(0,D)$ where $D$ is some diagonal covariance matrix. And let $x$ be some $n$ dimensional vector whose conditional distribution with $z$ is ...
3
votes
0answers
52 views

What is the geometric meaning of correlation matrix

I recently read this article explaining the geometric meaning of covariance matrix. http://www.visiondummy.com/2014/04/geometric-interpretation-covariance-matrix/ My question is : is there an ...
0
votes
1answer
37 views

Calculate first principal component direction and scores

Given that x1 = (9, 9, −18)^T and x2 = (18, 9, 9)^T with eigendecomposition of its sample covariance matrix Σ = cov(X) How do I calculate the first two principal component direction and the ...
0
votes
0answers
15 views

Proxy for Mahalanobis distance when n < p? [duplicate]

I'm working on a ranking problem where I want to measure the distance between a collection of query points (as a group) and each target point in my database. Each query point is part of the set of ...
0
votes
0answers
23 views

variance of Cohen's d effect size for two “dependent” samples [duplicate]

The derivation of the sampling variance of Cohen's $d$ effect size for the case of two independent samples is well established (see HERE). However, my question is what is the sampling variance of ...
0
votes
1answer
72 views

Distribution of sums and differences of n correlated normal random variables

Suppose $x_1\sim\mathcal N(2,0.5),x_2\sim \mathcal N(2,3),$ and $x_3\sim \mathcal N(2.5,7)$ with correlations $\rho_{(1,2)}=0.3,\rho_{(1,3)}=0.1,$and $\rho_{(2,3)}=0.4.$ What is the distribution of ...
2
votes
1answer
32 views

Computing conditional probabilities on multivariate data from covariances

I am struggling to implement some Bayesian algorithm which I hope you may help me with. I am required to compute all probabilities of the form: $$P(Z_i\le z_i\;|\;Z_1=z_1, \dots, Z_{i-1}=z_{i-1}) \;\...
0
votes
0answers
20 views

Estimation of covariance over a range of independent variable

I have a set of data that comprise 2 dependent variables (let's call them $x_1$ and $x_2$) evaluated at different temperatures, T. There is an assumption that for a range of T ($T_0<T<T_1$) ...
0
votes
0answers
8 views

covariance for measuring linear relationship, how about the non-linear relationship

I once heard the statement that Covariance is a measure of the linear relationship between two variables, such as X and Y If X and Y has non-linear relationship,...
0
votes
0answers
11 views

Dimensionality of similarity matrix

Below is a screen shot of a paper. The authors take a data-set $E\in R^{nxm}$. Here $n$ is the number of observations/samples/patients and $m$ is the number of genes/features. Preprocessing ...
0
votes
0answers
49 views

Handling negative variances on the derivative of Gaussian processes

The variance of the derivative of a Gaussian process, $f$, is given by (9.1): $$ Var(\frac{\partial f}{\partial x}) =\frac {\partial ^2 k(x,x)}{\partial x^2},$$ where $k(·, ·)$ is both a positive-...
2
votes
1answer
83 views

How does one do a Wald test on estimates from two variables?

Given a dataset with two variables $X$ and $Y$, with each observation independent of the others, test the null hypothesis $$\mu_X = \mu_Y\\ \sigma^2_X = \sigma^2_Y$$ using a Wald test. This question ...
0
votes
1answer
43 views

What is the variance of the difference of two means?

I'm trying to express $\mathrm{Var}(\mu_x - \mu_y)$ in terms of $\rho$, $\sigma_x$ and $\sigma_y$, where $\mu$ denotes the mean of the random variable. Firstly:\begin{align*} \mathrm{Var}\left(\sum_{...
0
votes
2answers
15 views

notation in standard form of covariance formula

I'm trying to build my basic intuition on covariance, but am confused about the notation I typically see: cov(X,Y) = E[(X - E[X])(Y - E[Y])] Why is there no summation sign in this formula, and why ...
0
votes
0answers
26 views

R: Covariance matrix with Kronecker product

I use the Kronecker product for the fast generation of a big covariance matrix for two random vectors $X = (X_1,..., X_p)$ and $Y = (Y_1, ..., Y_k)$ based on a small covariance matrix applying to each ...
6
votes
3answers
121 views

Is the sample correlation always positively correlated with the sample variance?

The sample correlation $r$ and the sample standard deviation of $X$ (call it $s_X$) seem to be positively correlated if I simulate bivariate normal $X$, $Y$ with a positive true correlation (and seem ...
0
votes
0answers
10 views

How do i select the attribute from the correlation and covariance metrics?

I have a values from heatmap which is contain correlation and covarian. for the correlation values, i got with this code : ...
0
votes
0answers
13 views

Covariance of measurement uncertainties

So I have a sample of data points call them $X_1$ and $X_2$, these are derived quantities based on measured values and each has a mean $\mu_{X_{1,2}}$ and variance $\sigma^2_{X_{1,2}}$ which can be ...
1
vote
0answers
16 views

How to account for experimental errors when computing the derivative of a Gaussian process?

When applying Gaussian process regression upon training data, the covariance function can be generally given in the form: $\Sigma_{i,j} = k(x_i, x_j) + \sigma(x_i) \delta_{i,j}$, where $k$ is a ...
1
vote
1answer
93 views

Pooled Covariance Matrix with very different amount of samples per class

I have a dataset with 10 classes, and want to estimate the covariance. It turns out that due to numerical stabilitiy, it is much better to use a pooled covariance matrix. Suppose I have $N$ samples ...
1
vote
1answer
38 views

Using variance-covariance matrix of mixed-effects logistic regression to obtain p-values for custom contrasts

My question is a follow-up to this question, following through on @Isabelle Ghement's excellent series of responses. I just want to run this past some people in the know to see if what I am doing is ...
0
votes
1answer
21 views

Adjusted Mean of Variable given Single Covariate with Weak/Moderate Relationship

Say I have two variables X and Y, each a data set with corresponding data points 1 through n. These two variables have some casual, small but significant relationship (low r value). Then I am unsure ...
1
vote
0answers
29 views

Covariance of two uncorrelated variables multiplied with the same random variable [duplicate]

I have a problem where I am faced with the term $\operatorname{Cov}[XY,XZ]$. However, I do not know what to do with this term. I may assume that $Y$ and $Z$ are independent and that $X$ is independent ...
0
votes
0answers
21 views

Inferences about leverage score and Mahalanobis distance [duplicate]

I have some inference given below: Given the design matrix $\textbf{X}$, the leverage score is defined as $\textbf{H}_{ii}$ where $\textbf{H} = \textbf{X} (\textbf{X}^T \textbf{X})^{-1} \textbf{X}^T$ ...
0
votes
1answer
27 views

The covariance of 2 independent and identically distributed

I am currently researching a paper and they have the following set-up: " $(\epsilon_{1}, \epsilon_{2})iid \sim N(\mu, \xi)$. captures the collective biases that in-vestors may have about d, is ...
0
votes
2answers
76 views

Moving average process - stationarity

If we consider a moving average process of order 1, is that stationary? Because, although, the mean will remain the same for Yt and Yt+k, the variance and co-variance will change if you calculate ...
2
votes
1answer
37 views

How to show sample correlation is sample covariance for standardized values?

Given a matrix $X$ and the resulting sample correlation matrix $R$, consider the standardized observations: $$\frac{(x_{jk} - \bar x)} {\sqrt{S_{kk}}} \quad k=1,2,...,p \quad j=1,2,...,n$$ Show that ...
1
vote
2answers
45 views

How to calculate Mean adjusted by Covariate?

I need to calculate the mean of a variable, adjusted by another variable. Both variables are ratio scaled. I found this online: https://ideas.repec.org/c/boc/bocode/s344803.html which does what I want,...
1
vote
1answer
73 views

Why does my SEM ('lavaan') return covariance estimates for all pairwise variable combinations that were not specified in the model?

I specified the following model for SEM analysis using the 'lavaan' package in R. I want to specify a covariance between two observed variables (livestock and human occupancy). This is the only ...
0
votes
1answer
102 views

What is the difference between covariate and confounding variables?

What do covariate and confounding variables have in common and how do they differ? And what are their specific effects in causal inference? (in statistics and causal inference)
0
votes
0answers
15 views

Variance of a Sum of Random Variable [duplicate]

Unsure about my teachers solution as she was not very convincing when she presented the solution and was quite confused herself. $$Y = a+bX+cZ \\ X \sim \mathcal{N}(4,\,\sigma^{2}_x)\\ Z \sim \...
0
votes
1answer
30 views

Simplifying covariance expression, don't understand steps in between

Can anyone explain the steps in between? In particular I don't understand: 1) How the $n$ became part of the final result. Does this $n$ just denote the total number of observations? Does it iterate ...
0
votes
0answers
25 views

What is the best way to combine “Price” and “Volume” in stock prediction?

I am trying to use LSTM network to predict stock prices. I know in real world there is a relation between the stock price and the trade volume. So I am looking a way to see if is it possible to ...
0
votes
0answers
64 views

Common covariance matrix explanation (LDA and QDA)

I'm looking for a layman's explanation of the "common covariance matrix" assumption in LDA because I don't think I understand it. I understand that a common covariance matrix (as assumed in LDA for ...