4 Replies Latest reply on Mar 17, 2011 5:09 AM by Vas Itappsupport

    Weighted Standard Deviation

    Vas Itappsupport

      Is it possible to calculate weighted standard deviation in tableau? Ultimately we’d like to be able to display weighted average and weight SD on a scatter plot to better represent the dispersion of data points of different weight.

       

      Using a data set that has two dimensions (Region, Name) and two measures (Amount, Cheap Points), we want to calculate the weighted SD of the cheap points, with points with larger amounts having a greater weighting in the calculation:

      (See formula in attached Formula.JPG)

       

      We can correctly calculate weighted mean (Mu*) for the population and subsets (Region):

      •    sum([Amount ]*[Cheap Points])/sum([Amount ])

       

      The challenge now is to make Tableau use the appropriate Mu*, and count the relevant number of points for the weighted SD calculation. Please see the attached excel file with a sample dataset (columns a, b, c, d) that also include expected results, including weighted mean and weighted standard deviation (for total set, Region A and Region B).

       

      Many Thanks.