+ Reply to Thread
Results 1 to 7 of 7

mean and standard deviation of triangular matrix

Hybrid View

  1. #1
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: mean and standard deviation of triangular matrix

    What are the upper corner values in the array? Zero? Blanks?

    If they're blanks, no problem, they're ignored by the functions, carry on.

    If they're zeros... finding the mean is trivial (decompose to sum / COUNTIF), but the STDEV has to actually be built up because we want to ignore values of 0 going into n, the number of elements.

    Well, I'm going to split up the code, to make it easier to follow what's going on, but you could jam it all together into just two cells if you wanted.
    num = COUNTIF(range, ">0") // a user-defined variable for n, number of elements
    
    MEAN = SUM(range) / num // you could do SUMIF(range,">0"), but adding zeros to a summation... is meaningless.
    
    inner = SUMPRODUCT(range,range) / num // a user-defined variable for the inner term of the STDEV math
    
    STDEV = SQRT(inner - inner^2)

  2. #2
    Registered User
    Join Date
    06-18-2012
    Location
    belgium
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: mean and standard deviation of triangular matrix

    Thank you, both of you.

    In fact, I resolved a problem using R.

    MrShorty, I did as you explained to chcek that my results would be the same, it's ok.

    ben, thank you but it would not work because I got a couple of "0" distances so they would have been neglected.

    Thank you once again, I learnt something!

    have a nice day


    lucinka

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1