Calculating conditional expectation of 2 vectors from dataset

32 Views Asked by At

So I'm having trouble understanding what I'm doing wrong here.

For context, I have some velocity components in my dataset for turbulence (simplified).

I have flattened them out so my 3 velocity vectors are A, B, C, which are all 1*N vectors now. And at each point they have a different values on a continuous spectrum (not discrete values).

So I need to find the Conditional Expectation of A conditioned on B. $E[A|B=b]$

And I have this formula to use:

$$\mu_A + \Sigma_{AB} (\Sigma_{BB})^{-1}*(b-\mu_B)$$

I'd expect if I draw a single b from the data set and ran it through that equation above, it would give me a single number for a. But my covariance matrices must not be the right dimensions because I am getting some dimension mismatch errors and even if it works it's giving me a 2x2 vector or something like that rather than a single number.

Your help/guidance would be greatly appreciated!

1

There are 1 best solutions below

0
On

If A, B, and C are the three components of a velocity field taken as three scalar fields, then the covariance matrices are all 1x1 like: $\Sigma_{AB}=(A-\mu_A [1\ 1 ... 1]^T)^T (B-\mu_B[1\ 1 ... 1]^T).$

So you should have got all 1x1 matrices in your expression.