4 Replies Latest reply on Aug 9, 2011 9:34 AM by DivyashPatel

    STDev - Standard Deviation



      STDev - Standard Deviation



      I would like to calcualte standard deviation for a field across 3 records. I would like to calculate based on the following:

      FieldA - number

      FieldB - Name

      FieldC - Stdev for FieldA in found set. Found set is by FieldB.


      Record 1 = FieldA = 10, FieldB = Sample1

      Record 2 = FieldA = 12, FieldB = Sample1

      Record 3 = FieldA = 14, FieldB = Sample1

      STDev should be for 3 records found by Sample1.

      Record 4 = FieldA = 10, FieldB = Sample2

      Record 5 = FieldA = 12, FieldB = Sample2

      Record 6 = FieldA = 14, FieldB = Sample2

      STDev should be for 3 records found by Sample2.

      I would like to get the Standard Deviation for FieldA across the 3 records based on FieldB data. Each set of records based on FieldB should have a STDev. How would I calculate this or create the appropriate fields?

      Thank you in advance.


        • 1. Re: STDev - Standard Deviation

          Open Manage | Database | fields, define a field of type summary and select standard deviation of Field A as the options for this summary field.

          • 2. Re: STDev - Standard Deviation

            That doesn't solve what I need. I need the Standard Deviation based on FieldA but the break field should be FieldB. Sort of like the getsummary calculation function: getsummary(fieldA;fieldB). The only thing I dont want to do is sort to get the STDev.

            Hope that makes sense.



            • 3. Re: STDev - Standard Deviation

              You indicated "found set is by field B"

              If the only records in your found set are for this group of records, then this does exactly what you want.

              Get Summary will work, but you have to group the records by Field B and this requires sorting. You can also put the summary field in a sub summary part "when sorted by Field B" and obviously, this also requires sorting.

              If you can't sort the records, you'll have to use a relationship. This can be from a different table with one record for each value in field B or in a self join by Field B to the same table. Either way, there's are aggregate functions StDEV and StDEVP that can be used to compute the standard deviation of the related records.

              • 4. Re: STDev - Standard Deviation

                Thanks, I completely spaced the relational part of it all. It worked. I appreciate the help.