+ Reply to Thread
Results 1 to 6 of 6

Getting the standard deviation of a range after using TRIMMEAN

  1. #1
    Registered User
    Join Date
    10-01-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    7

    Getting the standard deviation of a range after using TRIMMEAN

    Hello there,

    I have been trying to resolve an Excel-problem without success. For a data range (X4:AI4) I have used TRIMMEAN with the following formula, but I would like to know the standard deviation of this range:
    =TRIMMEAN(X4:AI4;0,2)

    Thanks in advance,
    Tim

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Getting the standard deviation of a range after using TRIMMEAN

    X4:AI4 is 12 cells so by using TRIMMEAN with 0.2 you will exclude just the smallest and highest values, assuming the range is fully populated that's the equivalent of taking the average without the smallest and 12th smallest, i.e.

    =AVERAGE(SMALL(X4:AI4;{2;3;4;5;6;7;8;9;10;11}))

    so you can do the same with Standard Deviation by replacing AVERAGE with STDEV, i.e.

    =STDEV(SMALL(X4:AI4;{2;3;4;5;6;7;8;9;10;11}))

    If you want a formula to cope with variable sized ranges or for when the cells are only partially populated then you need a slightly more complex version.....
    Audere est facere

  3. #3
    Registered User
    Join Date
    10-01-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Getting the standard deviation of a range after using TRIMMEAN

    Hello Daddylonglegs,

    Thank you for your reply, but indeed I need a formula which is able to cope with varying sample sizes and trimmed values (trimmean 0.2 / 0.4)

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Getting the standard deviation of a range after using TRIMMEAN

    OK, more generic, then - this "array formula" will give you STDEV of the trimmed Range1, using Percent value (to trim)

    =STDEV(SMALL(Range1;ROW(INDIRECT(INT(COUNT(Range1)*Percent/2)+1&":"&COUNT(Range1)-INT(COUNT(Range1)*Percent/2)))))

    confirmed with CTRL+SHIFT+ENTER
    Last edited by daddylonglegs; 10-01-2012 at 08:32 AM.

  5. #5
    Registered User
    Join Date
    10-01-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    7

    Thumbs up Re: Getting the standard deviation of a range after using TRIMMEAN

    Hello,

    Thank you, I still have one question concerning the formula stated above. Generally when you use TRIMMEAN you will trim the lowest AND biggest value(s), depending on the trim percentage. As it seems to me this hasn't been taken into account in the formula above? I just need to be sure of this.

    Thanks in advance!!

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Getting the standard deviation of a range after using TRIMMEAN

    Yes, it's designed to use exactly the same values as TRIMMEAN does for an average. You can test that by using AVERAGE in place of STDEV in that last formula I suggested (still "array entered") and you should get the same result as TRIMMEAN for the same values.

    A small example.

    If you have 24 values in Range1 and Percent set to 0.4 the TRIMMEAN trims 20% of the values off the top and bottom, in this case 20% of 24 is 4.8 so that's rounded down to 4 and 4 values are trimmed off the top and the bottom.

    My suggested formula works out that the remaining values are the 5th smallest through to the 20th smallest, and calculates the STDEV of those values only (excluding the top 4 and bottom 4).

    Make sure you use CTRL+SHIFT+ENTER so that curly braces like { and } appear around the formula

+ 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