Standard Deviation indicators – minor fix.

Forums ProRealTime English forum ProBuilder support Standard Deviation indicators – minor fix.

  • This topic has 1 reply, 1 voice, and was last updated 3 years ago by avatarJS.
Viewing 2 posts - 1 through 2 (of 2 total)
  • #127079

    I posted three indicators to the library that all carry out various standard deviation calculations. I have just found out that there are two ways to calculate standard deviation – one way when calculating it on populations and another way when calculating it on data samples. I appear to have used the wrong one in the code. The difference is only minor and at the last step of the calculation:

    • population version:                   standard deviation = sqrt(total/(p-1))
    • data sample version:                 standard deviation = sqrt(total/(p))

    The difference in the results is very tiny but some may prefer the more correct calculation so rather than ask Nicolas to change all the library posts I will just post modified versions of the indicator ITF files here and add a link in each library posts comments.

     

     

    2 users thanked author for this post.
    #173615
    JS

    It is just the other way round:

    When you calculate the standard deviation and uses  the whole population then divide by N

    When using a data sample (part of the whole data) divide by (N-1)

    The statistical error (not using all data) tends to reduce the calculated value of the SD, to compensate for this use (N-1) instead of N.

    If N is small the statistical error will be very large…!!!

    The difference is not at the last step but already begins when you calculate the mean…(you must calculate the mean before you can calculate the SD)

    The standard deviation in PRT under Indicators uses the N- deviation which is actually wrong because you always use a data sample (of the whole population) so you must divide by (N-1).

Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login