+ Reply to Thread
Results 1 to 6 of 6

Calculate conditional standard deviations in a running list of values

  1. #1
    Registered User
    Join Date
    07-06-2023
    Location
    Sydney, Australia
    MS-Off Ver
    2016
    Posts
    5

    Calculate conditional standard deviations in a running list of values

    I am trying to calculate a set of ongoing standard deviations of each batsman's performances (runs) from one list that contains multiple batsmen.

    Attached is an example of what I am trying to achieve here.

    I am aware of the DSTDEVP function but the difficulty with using this function for this case is that the field parameter requires column headers to identify the column that the criteria will be checked against. In a running list of performances, I cannot have a header of column titles above every performance (my spreadsheet has thousands of rows). Also, I want to use this list to lookup standard deviation values for each batsman at different points in time (my actual spreadsheet contains dates as well) so that's another reason why I can't intersperse the records with headers.

    I'm wondering is there a way around this where I can still use the DSTDEVP function?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Calculate conditional standard deviations in a running list of values

    I'm not sure from your description that this sample data really fully represtents the real data, so it's likely that any solution offered won't work.

    Can you update it so that it illustrates the caveats you've mentione above?

    So glad someone still uses the term 'batsman' instead of the all-new 'batter'.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-06-2023
    Location
    Sydney, Australia
    MS-Off Ver
    2016
    Posts
    5

    Re: Calculate conditional standard deviations in a running list of values

    OK thanks. Attached is an enhanced version of this example that includes some manually worked calculations that hopefully better explains what I am trying to achieve here.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,569

    Re: Calculate conditional standard deviations in a running list of values

    Perhaps the following will help.
    The array entered formula** for the SD (Runs) column is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    07-06-2023
    Location
    Sydney, Australia
    MS-Off Ver
    2016
    Posts
    5

    Re: Calculate conditional standard deviations in a running list of values

    Thanks. That works. I forgot about the way you are supposed to enter array formulas.

    I tweaked the formula a bit so it calculates the standard deviation of batsmen before the date of the record where the SD is being entered (this is because I am trying to predict the runs scored in the current row). For example in row 23:

    =STDEV.P(IF(A$3:A22=A23,C$3:C22))

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,569

    Re: Calculate conditional standard deviations in a running list of values

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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. [SOLVED] Conditional Formatting with Standard Deviations
    By ajzeleny in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-20-2014, 11:42 AM
  3. Conditional Formatting for Standard Deviations
    By ajzeleny in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 08-19-2014, 06:13 PM
  4. Conditional Formatting with standard deviations
    By joker007 in forum Excel General
    Replies: 12
    Last Post: 10-01-2009, 06:25 PM
  5. 4 Standard Deviations
    By NathanScott in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-03-2008, 04:52 AM
  6. [SOLVED] Calculate 2 Standard Deviations
    By Michael in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-17-2006, 01:15 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

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