Uploaded image for project: 'OASIS Open Document Format for Office Applications (OpenDocument) TC'
  1. OASIS Open Document Format for Office Applications (OpenDocument) TC
  2. OFFICE-3856

Missing zero population size error cases in some OpenFormula statistical function definitions

    Details

    • Proposal:
      Hide

      Add a constraint to each of the affected functions, reading:

      STDEVP exchange "Constraints: None." with "Constraints: COUNT(N) >= 1."
      STDEVPA exchange "Constraints: None." with "Constraints: COUNTA(sample) >= 1."
      VARPA exchange "Constraints: None." with "Constraints: COUNTA(sample) >= 1."

      Show
      Add a constraint to each of the affected functions, reading: STDEVP exchange "Constraints: None." with "Constraints: COUNT(N) >= 1." STDEVPA exchange "Constraints: None." with "Constraints: COUNTA(sample) >= 1." VARPA exchange "Constraints: None." with "Constraints: COUNTA(sample) >= 1."

      Description

      I've been doing some research on missing spreadsheet function constraints, and I noticed that, in a couple of the OpenFormula statistical functions, there should be a constraint requiring population size to be greater than zero. All the existing implementations I tested already return an error in this instance, but it probably ought to be added to OpenFormula.

      The functions affected are:

      STDEVP (ODF 1.2 Part 2, 6.18.74)
      STDEVPA (6.18.75)
      VARPA (6.18.85)

        Attachments

          Activity

          Hide
          regina.henschel Regina Henschel added a comment -

          I agree with Chris to add a constrain.

          STDEVA has constrain "COUNTA(sample) > 1"
          VARP has constrain "COUNT(N)>=1"
          STDEV and VAR have constrain "At least two numbers shall be included. Returns an Error if less than two Numbers are provided."
          VARA has constrain "The sequence shall contain two numbers at least."

          I suggest to write it analogous.
          STDEVP exchange "Constraints: None." with "Constraints: COUNT(N) >= 1."
          STDEVPA exchange "Constraints: None." with "Constraints: COUNTA(sample) >= 1."
          VARPA exchange "Constraints: None." with "Constraints: COUNTA(sample) >= 1."

          The word "sample" in Chris' proposal "Constraints: Used sample size must be greater than zero." does not fit in case of STDEVP because it is a population and the argument identifier is N. In case of STDEVPA and VARPA it is possible, because it refers the argument identifier directly.

          I think the corresponding D*** functions, e.g. DSTDEV, do not need constrains, because they are defined by reference to e.g. STDEV.

          Show
          regina.henschel Regina Henschel added a comment - I agree with Chris to add a constrain. STDEVA has constrain "COUNTA(sample) > 1" VARP has constrain "COUNT(N)>=1" STDEV and VAR have constrain "At least two numbers shall be included. Returns an Error if less than two Numbers are provided." VARA has constrain "The sequence shall contain two numbers at least." I suggest to write it analogous. STDEVP exchange "Constraints: None." with "Constraints: COUNT(N) >= 1." STDEVPA exchange "Constraints: None." with "Constraints: COUNTA(sample) >= 1." VARPA exchange "Constraints: None." with "Constraints: COUNTA(sample) >= 1." The word "sample" in Chris' proposal "Constraints: Used sample size must be greater than zero." does not fit in case of STDEVP because it is a population and the argument identifier is N. In case of STDEVPA and VARPA it is possible, because it refers the argument identifier directly. I think the corresponding D*** functions, e.g. DSTDEV, do not need constrains, because they are defined by reference to e.g. STDEV.
          Hide
          rcweir Robert Weir (Inactive) added a comment -

          Discussed on TC call of 2014-04-28, agreed to fix for ODF 1.2 Errata and for ODF 1.3.

          Show
          rcweir Robert Weir (Inactive) added a comment - Discussed on TC call of 2014-04-28, agreed to fix for ODF 1.2 Errata and for ODF 1.3.
          Hide
          chris.rae Chris Rae (Inactive) added a comment -

          I definitely agree with Regina's edits - thank you very much for taking a look at this!

          Show
          chris.rae Chris Rae (Inactive) added a comment - I definitely agree with Regina's edits - thank you very much for taking a look at this!
          Hide
          patrick Patrick Durusau added a comment -

          Applied in OpenDocument-v1.3-wd03-part4-openformula.odt

          Show
          patrick Patrick Durusau added a comment - Applied in OpenDocument-v1.3-wd03-part4-openformula.odt
          Hide
          patrick Patrick Durusau added a comment -
          Show
          patrick Patrick Durusau added a comment - Clone of https://issues.oasis-open.org/browse/OFFICE-3982 ODF 1.2 Errata 01

            People

            • Assignee:
              Unassigned
              Reporter:
              chris.rae Chris Rae (Inactive)
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: