5. Statistical functions

5.1. avedev

avedev(value+)

Returns the average of the absolute deviation of a sample from the mean. Formula is: (Σ|x - average|)/n.

  • If an argument is an XML nodeset, each node in the nodeset is converted to a number and processed. Nodes which cannot converted to numbers are simply ignored.

  • If an argument is not a XML nodeset and cannot be successfully converted to a number, an error is reported.

French
10
12
09
15
08

Examples (the above XHTML table has attribute id="exams2"):

  • avedev("exams2"!$A:$A) = 2.16

  • avedev("exams2"!$A:$A, "French") = ERROR (String "French" is ignored in column $A but not when passed directly as an argument)

See also stdev, var.

5.2. stdev

stdev(value+)

Returns the standard deviation of its arguments. Formula is: √((Σ(x - average)²)/(n - 1)).

  • If an argument is an XML nodeset, each node in the nodeset is converted to a number and processed. Nodes which cannot converted to numbers are simply ignored.

  • If an argument is not a XML nodeset and cannot be successfully converted to a number, an error is reported.

French
10
12
09
15
08

Examples (the above XHTML table has attribute id="exams3"):

  • stdev("exams3"!$A:$A) = 2.774

  • stdev("exams3"!$A:$A, "French") = ERROR (String "French" is ignored in column $A but not when passed directly as an argument)

See also avedev, var.

5.3. var

var(value+)

Returns the variance of its arguments. Formula is: (Σ(x - average)²)/(n - 1).

  • If an argument is an XML nodeset, each node in the nodeset is converted to a number and processed. Nodes which cannot converted to numbers are simply ignored.

  • If an argument is not a XML nodeset and cannot be successfully converted to a number, an error is reported.

French
10
12
09
15
08

Examples (the above XHTML table has attribute id="exams4"):

  • var("exams4"!$A:$A) = 7.69999999

  • var("exams4"!$A:$A, "French") = ERROR (String "French" is ignored in column $A but not when passed directly as an argument)

See also avedev, stdev.

5.4. max

max(value+)

Returns the maximum of its arguments. Returns 0 if all its arguments cannot be converted to numbers.

  • If an argument is an XML nodeset, each node in the nodeset is converted to a number and processed. Nodes which cannot converted to numbers are simply ignored.

  • If an argument is not a XML nodeset and cannot be successfully converted to a number, an error is reported.

French
10
12
09
15
08

Examples (the above XHTML table has attribute id="exams5"):

  • max("exams5"!$A:$A) = 15

  • max("exams5"!$A:$A, "French") = ERROR (String "French" is ignored in column $A but not when passed directly as an argument)

5.5. min

min(value+)

Returns the minimum of its arguments. Returns 0 if all its arguments cannot be converted to numbers.

  • If an argument is an XML nodeset, each node in the nodeset is converted to a number and processed. Nodes which cannot converted to numbers are simply ignored.

  • If an argument is not a XML nodeset and cannot be successfully converted to a number, an error is reported.

French
10
12
09
15
08

Examples (the above XHTML table has attribute id="exams6"):

  • min("exams6"!$A:$A) = 8

  • min("exams6"!$A$1:$A$1) = 0

  • min("exams6"!$A:$A, "French") = ERROR (String "French" is ignored in column $A but not when passed directly as an argument)

5.6. average

average(value+)

Returns the arithmetic mean of its arguments.

  • If an argument is an XML nodeset, each node in the nodeset is converted to a number and processed. Nodes which cannot converted to numbers are simply ignored.

  • If an argument is not a XML nodeset and cannot be successfully converted to a number, an error is reported.

French
10
12
09
15
08

Examples (the above XHTML table has attribute id="exams7"):

  • average("exams7"!$A:$A) = 10.8

  • average("exams7"!$A:$A, "French") = ERROR (String "French" is ignored in column $A but not when passed directly as an argument)

5.7. count

count(value+)

Counts its arguments which can be converted to numbers.

  • If an argument is an XML nodeset, each node in the nodeset is converted to a number and processed. Nodes which cannot converted to numbers are simply ignored.

  • If an argument is not a XML nodeset and cannot be successfully converted to a number, an error is reported.

French
10
12
09
15
08

Examples (the above XHTML table has attribute id="exams8"):

  • count("exams8"!$A:$A, 0, 20) = 7

  • count("exams8"!$A:$A, "French") = ERROR (String "French" is ignored in column $A but not when passed directly as an argument)