Results 1 to 5 of 5
  1. #1
    Empie is offline Novice
    Windows 10 Office 365
    Join Date
    Jun 2021
    Posts
    2

    Standard Deviation not calculating correctly

    Hi there, I am using the Expression Builder & wish to calculate the sample Standard Deviation of a sample, using the Built-In Function StDev: -

    Sqr([SumOfSquaredDeviationsFromTheMean] / ([Count]-1))

    However, the result is the same as for the Standard Deviation of a population StDevP: -

    Sqr([SumOfSquaredDeviationsFromTheMean] / [Count])


    (i.e. no -1)

    StDev has worked correctly before on this data in a previous version of the file, so I am wondering why not now? Any idea?

    Regards.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,799
    Never used this function in Access but from what little I've just read, the syntax is StDev(fieldNameHere) or StDevP(fieldNameHere).
    As for why it used to work and doesn't now - possibly an Office upgrade. You would not be the first to report that code stopped working after an Access or Office upgrade. It's usually because it was not properly written. Not saying that is your situation, just that I've seen that behaviour before.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    I don't recall ever using standard deviation with Access. Here's a link that may be helpful to you.
    You could try the DStDEv or DStDEvP.
    Good luck. And let us (others) know what you find.

  4. #4
    Empie is offline Novice
    Windows 10 Office 365
    Join Date
    Jun 2021
    Posts
    2
    I tried DStDev to calculate the sample standard deviation, though no luck either. The only way I could find was to recover an earlier dBase version from the cloud & copy & past the query from that into the current dBase.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    Follow up based on curiosity.
    I reviewed Standard Deviation and related terms from the video here.
    Then created the following in Ms Access O365.

    tblDevTest
    id autonumber
    amnt number/single

    There are 6 records containing 2 fields in the recordset.

    Record id amnt

    0 1 17
    1 2 15
    2 3 23
    3 4 7
    4 5 9
    5 6 13

    To test the Avg, stdev and Var functions in Access.

    SELECT Avg(tblDEvTest.amnt) AS AvgOfamnt
    FROM tblDEvTest;

    AvgOfamnt
    14

    SELECT StDev(tblDEvTest.amnt) AS StDevOfamnt
    FROM tblDEvTest;

    StDevOfamnt
    5.76194411635517


    SELECT Var(tblDEvTest.amnt) AS VarOfamnt
    FROM tblDEvTest;

    VarOfamnt
    33.2


    All of which agree with the video example.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 03-18-2020, 03:42 PM
  2. Replies: 1
    Last Post: 10-17-2016, 07:57 AM
  3. Standard Deviation
    By tombo10 in forum Access
    Replies: 3
    Last Post: 04-13-2016, 03:34 PM
  4. st deviation function on array
    By registoni in forum Programming
    Replies: 2
    Last Post: 09-09-2013, 04:00 AM
  5. Replies: 23
    Last Post: 06-30-2010, 02:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums