+ Reply to Thread
Results 1 to 6 of 6

Excel,z-score,standard deviations

Hybrid View

  1. #1
    Registered User
    Join Date
    03-25-2016
    Location
    north carolina
    MS-Off Ver
    2010
    Posts
    15

    Excel,z-score,standard deviations

    I would like to know if it is possible to calculate the # of standard deviations there is between 2 average salaries.

    I have two groups of people and I know the total number in both groups and the total salary of both groups.
    I also have the average salary for each group and the difference between the 2 average salaries.
    Would I be able to get the number of standard deviations it is between the 2 average salaries?

    For example:
    Group 1 has 10 persons and their total salary is 100K.
    Group 2 has 10 persons and their total salary is 200K.
    Group 1's average salary is 10K.
    Group 2's average salary is 20K.

    Is there a way to calculate the number of standard deviations of the 10K average difference?

    Thanks for any help.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: Excel,z-score,standard deviations

    Hi marina,

    The Standard Deviation is a measure of "how spread out the numbers are'. If you have the exact salaries of each person in the group you can calculate the standard deviation. See:

    http://www.mathsisfun.com/data/standard-deviation.html

    for some simple explanations about standard deviation.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-25-2016
    Location
    north carolina
    MS-Off Ver
    2010
    Posts
    15

    Re: Excel,z-score,standard deviations

    MarvinP,

    Thanks for your response.

    I do have the salary data.

    What I would like is Excel to calculate the spread between the average male and female salaries by department.

    For example, in my data base:

    Column "A" has the department number.
    Column "B" has the salary
    Column "C" has male or female

    Each department may have 10 to 200 rows of data. So I want excel to calculate the spread (# of standard deviations) between male and female average salaries for each department automatically.

    Can that be done.

    Thanks.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,406

    Re: Excel,z-score,standard deviations

    A pivot table can be configured to compute average and standard deviation based on criteria. Are your data arranged so they can be summarized in a pivot table?

    The data analysis tool has built in t-test and z-test utilities. This might be a useful tool for the analysis you want to perform. https://support.office.com/en-us/art...f-a8c23dc3098b

    These utilities are built on the built in z.test and t.test functions. You might also be able to use these functions, or a combination of the other statistical functions to perform the analysis. https://support.office.com/en-us/art...__toc309306716

    From there, we will probably need a more specific question -- what are you having trouble with? Arranging the data in the spreadsheet in order to take advantage of these built in tools? A different algorithm than those built into Excel?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    03-25-2016
    Location
    north carolina
    MS-Off Ver
    2010
    Posts
    15

    Re: Excel,z-score,standard deviations

    MrShorty,

    Thank you for the valuable information. I believe though, after using the different tool pak utilities that regression will work bet for what I need.

    I recorded a macro to do that. In column "A" is the "Y" data and column "B" has the "X" data.

    The problem is I recorded the macro using 50 rows of data and I need the macro to run however many rows of data I have when pasting new data.

    I have posted my code below in case you can help me so that the macro will run with any number of rows of data.

    Sub Macro8()
    '
    ' Macro8 Macro
    '
    ' Keyboard Shortcut: Ctrl+m
    '
    Application.Run "ATPVBAEN.XLAM!Regress", ActiveSheet.Range("$A$2:$A$50"), _
    ActiveSheet.Range("$B$2:$B$50"), False, False, , "", False, False, False _
    , False, , False
    End Sub


    In addition, although I don't think excel will do this, is it possible to have the code recognize the department number and run the regression by department?

    Column A would be the department number.
    Column B would be Y data
    Column C would be the X data.

    So if I had 5 different departments and each had from 10 to 100 rows of data the macro regression would run each department data separately.

    Thank you

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,406

    Re: Excel,z-score,standard deviations

    This forum can be very strict about putting code tags around code. The "Forum Rules" link at the top of the page gives instructions for using code tags. You want to comply to avoid getting your topic locked.

    This should be doable, though Excel is not going to do it all for you in a simple one click step (unless you program it to). A quick overview of how I would do this:

    1) Sort or extract the data so that the data for each regression is together in a single block of cells. Can I assume that you are familiar with sorting and filtering in Excel?
    2) I prefer to use the LINEST() worksheet function rather than the Regress tool. They both use the same regression algorithm, so it is not a significant difference. I tend to avoid VBA unless necessary, and using the LINEST() function will usually allow me to avoid VBA.
    3) With the data segragated into blocks, feed the desired data into the LINEST() function or Regress tool and store the output. If you are not yet familiar with the OFFSET() function or dynamic named ranges, those may be useful concepts in building the references for the LINEST() function.

+ 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. [SOLVED] Combine standard deviations
    By abousetta in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-29-2015, 04:11 PM
  2. 4 Standard Deviations
    By NathanScott in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-03-2008, 04:52 AM
  3. Calculate 2 Standard Deviations
    By Michael in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-17-2006, 01:15 PM
  4. Mean of standard deviations across columns?
    By ModelerGirl in forum Excel General
    Replies: 3
    Last Post: 02-04-2006, 01:00 PM
  5. Graph Standard Deviations
    By ed in forum Excel General
    Replies: 1
    Last Post: 08-03-2005, 05:05 PM
  6. Standard deviations in Excel
    By Fred Zack in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-14-2005, 09:05 PM
  7. PivotTables in Excel 2004 calculate incorrect standard deviations
    By lvphj in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-12-2005, 01:06 PM

Tags for this Thread

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