<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/math.percentile.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>math.percentile</api:function-name><api:suggest>math.percentile</api:suggest><api:suggest>math</api:suggest><api:suggest>percentile</api:suggest><api:function-link mode="xquery" fullname="math:percentile">/apidoc/8.0/math:percentile.xml</api:function-link><api:function mode="javascript" name="percentile" type="builtin" lib="math" category="MathBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="math" namespace="http://marklogic.com/xdmp/math" fullname="math.percentile"><api:summary>
  Returns a sequence of percentile(s) given a sequence of percentage(s).
  The function returns the empty sequence if either <code xmlns="http://www.w3.org/1999/xhtml">$arg</code> or 
  <code xmlns="http://www.w3.org/1999/xhtml">$p</code> is the
  empty sequence.
</api:summary><api:params><api:param name="arg" type="xs:double*"><api:param-description>
  The sequence of values to calculate the percentile(s) on.
  </api:param-description><api:param-name>arg</api:param-name><api:param-type>Number[]</api:param-type></api:param><api:param name="p" type="xs:double*"><api:param-description>
  The sequence of percentage(s).
  </api:param-description><api:param-name>p</api:param-name><api:param-type>Number[]</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
  math.percentile([2, 3, 1, 1.1, 2.2, 4],[0.25,0.75])

  =&gt; 1.05 3.5
</pre></api:example></api:function></api:function-page>