Re: Kurtosis and variance of an image



"Ratnakar Dash" <newsreader@xxxxxxxxxxxxx> wrote in message
<g3lds6$4e5$1@xxxxxxxxxxxxxxxxxx>...
Calculate the variance of an image in this way /

var(var(matrix)). you will get a single value .. if you
write like you have given it will calculate the variance of
each column . so it produces 1X256 values.

bye..

WRONG!!!

That is not the true variance. It is not even close!

The operation proposed by the responder does
compute the variance of the variances of each
column. But that is a wildly different number
than is the variance of the entire image.

For example, lets consider a simple random
array.

A = rand(10,10);

The variance of the entire array is

var(A(:))
ans =
0.077627

var(var(A))
ans =
0.00044343

In var(A(:)) I have unrolled the array first into
a single column, then computed the variance.

In the var(var(A)), note that each estimate of
the variance is roughly the same number.

var(A)
ans =
Columns 1 through 6
0.10951 0.070793 0.048005 0.10292 0.054316 0.065199
Columns 7 through 10
0.09793 0.082046 0.063051 0.085977

Then we compute the variance of that, and
we get a much smaller number, with different
units on it.

The variance of the variances is not at all the
same as taking the mean of a set of means!

Again, do NOT follow the advice you got from
the previous response.

Even worse, do NOT compute the kurtosis in
that way, as kurtosis(kurtosis(A)).

Finally, if you have an image, perhaps as a 3
channel RGB image, what do you mean when
you ask for the variance? Do you wish to see
the variance in each channel? Or is your image
a single channel gray scale image.

John
.



Relevant Pages

  • Re: mean ans std dev of an array?
    ... Do I need to import it into a Numeric Array to do this? ... If you build an air liner or a ocean liner with this and the wings fall off at thirty thousand feet or it turns upside down in the middle of an ocean, respectively of course, I expect a bunch of contingency lawers lining up at my door wanting to sue you on my behalf.) ... Takes a sequence and returns mean, variance and standard deviation. ...
    (comp.lang.python)
  • Average and Variance of a periodic angles
    ... I'm trying to compute the average of an array of angles, ... avg = atan2(avgy, avgx); ... Now my problem comes in when trying to calculate the variance. ...
    (sci.math.num-analysis)
  • Re: averaging based on multiple criteria
    ... #1 as an array ... this spreadsheet is populated with new data weekly where there is ... a variance between how many rows will contain data, ... > What are the exact formulas you have used ...
    (microsoft.public.excel)
  • Re: Average and Variance of a periodic angles
    ... The problem is the data in an array of angles ... and the data is periodic in 2.0 pi radians. ... One way is to use the iterative formulae for mean and variance ...
    (sci.math.num-analysis)
  • Re: Data vector
    ... the mean or the variance. ... To the command ... nonzerosit responds with an empty matrix, ...
    (comp.soft-sys.matlab)