Message-ID: <20241004154103.3668dcb7@arachnoid>
Date: 2024-10-04T12:41:03Z
From: Ivan Krylov
Subject: apply
In-Reply-To: <a771c1cd-c8cf-4a14-881d-2e2746f19178@ntu.edu.tw>
? Fri, 4 Oct 2024 20:28:01 +0800
Steven Yen <styen at ntu.edu.tw> ?????:
> Suppose I have two vectors, x and y. Is there a way
> to do the covariance matrix with ?apply?.
There is no covariance matrix for just two samples (vectors) 'x' and
'y'. You can only get one covariance value for these.
If you had a pair of vectors of _random variates_, the situation would
be different, but those are more abstract mathematical concepts. You
would need to sample every random variate, producing two matrices 'x'
and 'y' in order to calculate a covariance matrix for them.
--
Best regards,
Ivan