Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Determine mean and variance in 3d.

61 views
Skip to first unread message

Ironic Prata

unread,
Nov 10, 2009, 3:13:02 PM11/10/09
to
I?m not that proficient in matlab, so i hope you can help with this:

I have a few functions that give a probability distribution in 3d. I want to intersect the probabilities (i multiplicate all the functions values at each point in 3d) The result is a blob in 3D, in wich, each point has a probability value. (it?s a 4d graph).

I need to know the mean and co-variance matrix of that blob. My ideia is to calculate let?s say 100 points of the resulting function and use matlab to fit a gaussian to it, but that to me seems a bit heavy and not very accurate.

Is there anyway to do this in a more efficient way? Maybe directly from the product of functions?

Thank You

Matt Fetterman

unread,
Nov 10, 2009, 4:12:02 PM11/10/09
to
"Ironic Prata" <lixodo...@hotmail.com> wrote in message <hdchge$8jl$1...@fred.mathworks.com>...

You could use the mean function.
In 1-D it is mean(x).
But then in 3D, it is mean(mean(mean(x)))
Same thing with var and other functions.

Ironic Prata

unread,
Nov 10, 2009, 4:29:05 PM11/10/09
to

That should work for the mean but i?m not sure for the variance. If i?m, not mistaken that would give the variance as a scalar, but in this case the variance is a matrix, since the variance isn?t the same in all the directions...

But tks anyway

Ironic Prata

unread,
Nov 10, 2009, 5:39:02 PM11/10/09
to

Star Strider

unread,
Nov 10, 2009, 8:23:04 PM11/10/09
to
"Ironic Prata" <lixodo...@hotmail.com> wrote in message <hdchge$8jl$1...@fred.mathworks.com>...

I'm not quite sure what you have and what you want.

1. If you have functions that produce probability distributions for multi-dimsnsional data, can't you get the mean and variance in each axis from the parameters of the functions themselves?

2. If you have output from the functions themselves that produce 3 x n matrices of n data points, wouldn't you calculate the means and variances in each direction (in this case, the columns)?


I'm not sure one mean and one variance really mean anything

Ironic Prata

unread,
Nov 10, 2009, 9:45:04 PM11/10/09
to
"Star Strider" <skystrider...@ieee.net> wrote in message <hdd3lo$o82$1...@fred.mathworks.com>...

The functions are beam models and distance estimates from observing an object in a camera. Only by intersecting them i can obtain a probability distribution for the object position. The result is a blob in 3d. I want the mean and the co-variance matrix of that blob, to be able to use a kalman filter.

The sencond method you described, i think it?s the same as i said in the 1st post...

0 new messages