8 Replies Latest reply on Dec 14, 2016 2:29 AM by Randy Adhitama Setiadi

    Standard Devation and Variance Weighted

    Randy Adhitama Setiadi

      Hi All,

       

      I'm stucked to perform standard deviation and variance for weighted case. This is the formula i get from wikipedia

      {\displaystyle {\begin{aligned}{\hat {\sigma }}^{2}\ &={\frac {\sum _{i=1}^{N}{\left(x_{i}-\mu \right)^{2}}}{N}}\\{\hat {\sigma }}_{\mathrm {w} }^{2}&={\frac {\sum _{i=1}^{N}w_{i}\left(x_{i}-\mu ^{*}\right)^{2}}{V_{1}}}\end{aligned}}}

      To calculate standard deviation, I create an calculated field like this:

       

      sum([Weight]*(([Variable]-[Mean Score - Variable])^2))

      /

      SUM([Weight])

       

      but it always come with "Cannot mix aggregrate and non-aggregrate" things..

       

      Is there's any other solution for this case?

       

      Thanks

       

      Randy