+ Reply to Thread
Results 1 to 7 of 7

Standard Deviation of Groups in List

  1. #1
    Registered User
    Join Date
    03-01-2014
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    6

    Angry Standard Deviation of Groups in List

    I have a big dataset, and I am trying to determine the standard deviation of separate groups. The groups are in a single column, for simplicity sake let's say they are just "A" and "B." The scores are in a second column. I want to have a single forumla that I can paste into a "Group Standard Deviation" column that will discern whether the group column has a value of "A" or "B."

    I tried the suggestion here, also demonstrated here:

    Please Login or Register  to view this content.
    ctr+shift+enter

    In my case:
    Please Login or Register  to view this content.
    ctr+shift+enter

    But I am getting a "#DIV/0!" error.

    I think I am getting the error becuase my groups are differentiated in the same column (A2:A21), so I only have RangeX and RangeX. It appears that this approach only works if RangeX is different than RangeY.

    Is there a way to do this? Below is sample data.

    Thanks!

    ColumnA ColumnB
    A 1
    A 2
    A 3
    A 4
    A 5
    A 6
    A 7
    A 8
    A 9
    A 10
    B 10
    B 20
    B 30
    B 40
    B 50
    B 60
    B 70
    B 80
    B 90
    B 100

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Standard Deviation of Groups in List

    Welcome to the forum.

    I can't tell what you're trying to do, but no values survive that test because no column A value can't be both "A" and "B". Watch the formula evaluate.

    If you want the SD of the A group,

    =STDEV(IF(A2:A21="A", B2:B21))
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-01-2014
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Standard Deviation of Groups in List

    Thanks for the reply. Sorry to be unclear.

    I am trying to enter a formula into one new column, that I can paste down the whole column, that will calculate the standard deviation for the values in Column B only of the rows where there is a specified value of Column A (i.e., "A", then "B", etc. etc.).

    So, for example, if Column A = A, the formula would generate a standard deviation for the values in Column B -- but only for B2:B11. And when Column A = B, it would calcluate the standard deviation for the values in Column B -- but only for B12:B21.

    Essentially, I want a single column with standard deviations in Column C for each subgroup listed in Column A.

    I hope that makes sense. And it is possible. . . .

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Standard Deviation of Groups in List

    This is still a muddle to me. Maybe in C2 and copy down,

    =STDEV(IF(A$2:A$21=A2, B$2:B$21))

    But all of those formulas are going to give one of two answers.

  5. #5
    Registered User
    Join Date
    03-01-2014
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Standard Deviation of Groups in List

    Again, apologies -- I must be having a hard time making this clear. Here is what I want the outcome to look like:

    Please Login or Register  to view this content.
    Column C gives the standard deviation of Column B, but by the subgroups in Column A. So when Column A = "A", the standard deviation is calcluated only for A2:A11 and is 3.027. When Column A = "B", the standard deviation is calcluated only for A12:A21, and is 30.276.

    Is that possible?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Standard Deviation of Groups in List

    The formula in my last post gives exactly that result.

  7. #7
    Registered User
    Join Date
    03-01-2014
    Location
    DC
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Standard Deviation of Groups in List

    So it does! I of course forgot to use the "ctrl+shift+enter" when I replied!

    Thanks so much! And for sticking with me!


    __________________________________
    Question: is there a way to copy/paste that formula down the column? I am getting an error: "You cannot change part of an array."

    NEVERMIND (I had to move to the next cell after the copied one first!)
    Last edited by mbwd; 03-14-2014 at 12:56 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel 2007 : standard deviation
    By Jerseynjphillypa in forum Excel General
    Replies: 6
    Last Post: 06-15-2012, 12:21 PM
  2. Standard Deviation
    By mar_bun in forum Excel General
    Replies: 1
    Last Post: 06-29-2010, 03:19 AM
  3. Standard deviation
    By nms2130 in forum Excel General
    Replies: 1
    Last Post: 06-16-2008, 05:11 PM
  4. [SOLVED] Standard Deviation
    By Stan Banner in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-11-2006, 05:15 PM
  5. Standard Deviation help
    By paddyb270 in forum Excel General
    Replies: 1
    Last Post: 10-30-2005, 07:05 PM

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