> ## Documentation Index
> Fetch the complete documentation index at: https://takeprofit.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Package statistics

> Reference guide for Indie’s statistics package. Includes mean, fmean, and median functions for numerical data analysis and aggregation in Indie.

export const Anchor = ({id}) => {
  return <div id={id} style={{
    scrollMarginTop: "var(--scroll-mt)"
  }}></div>;
};

export const Field = ({id, name, type, required, defaultVal, children}) => {
  return <div id={id} style={{
    scrollMarginTop: "var(--scroll-mt)"
  }} className="mt-4">
      <div className="pt-2.5 pb-5 my-2.5 border-gray-50 dark:border-gray-800/50 border-b">
        <div className="flex font-mono text-sm group/param-head param-head">
          <div className="flex-1 flex content-start py-0.5 mr-5">
            <div className="flex items-center flex-wrap gap-2">
              {id && <div className="absolute">
                  <a href={`#${id}`} className="-ml-10 flex items-center opacity-0 border-0 group-hover/param-head:opacity-100 py-2" aria-label={`Navigate to ${id}`}>
                    <div className="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20">
                      <svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512">
                        <path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path>
                      </svg>
                    </div>
                  </a>
                </div>}
              <div className="font-semibold text-primary dark:text-primary-light">
                {name}
              </div>
              <div className="flex items-center space-x-2 text-xs font-medium">
                <div className="flex items-center px-2 py-0.5 rounded-md bg-gray-100/50 dark:bg-white/5 text-gray-600 dark:text-gray-200 font-medium">
                  {type}
                </div>
                {required && <span className="px-2 py-0.5 rounded-md bg-red-100/50 dark:bg-red-400/10 text-red-600 dark:text-red-300 font-medium">
                    required
                  </span>}
                {defaultVal && <div className="flex items-center px-2 py-0.5 rounded-md bg-gray-100/50 dark:bg-white/5 text-gray-600 dark:text-gray-200 font-medium">
                    <span class="text-gray-400 dark:text-gray-500">default:</span>
                    {defaultVal}
                  </div>}
              </div>
            </div>
          </div>
        </div>
        <div className="mt-4 prose-sm prose-gray dark:prose-invert">
          {children}
        </div>
      </div>
    </div>;
};

Statistics package.

<Note>See description in the [official Python docs](https://docs.python.org/3.10/library/statistics.html).</Note>

***

## Functions

<Anchor id="func_fmean" />

### `fmean()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="fmean" type="(data) -> float">
      Standard statistics function.

      <Expandable title="parameters info">
        <Field name="data" type="list[float]" required>
          List on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_mean" />

### `mean()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="mean" type="(data) -> float">
      Standard statistics function.

      <Expandable title="parameters info">
        <Field name="data" type="list[float]" required>
          List on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>

    <Field name="mean" type="(data) -> float">
      Standard statistics function.

      <Expandable title="parameters info">
        <Field name="data" type="list[int]" required>
          List on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_median" />

### `median()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="median" type="(data) -> float">
      Standard statistics function.

      <Expandable title="parameters info">
        <Field name="data" type="list[float]" required>
          List on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_mode" />

### `mode()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="mode" type="(data) -> float">
      Standard statistics function.

      <Expandable title="parameters info">
        <Field name="data" type="list[float]" required>
          List on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_pstdev" />

### `pstdev()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="pstdev" type="(data) -> float">
      Standard statistics function.

      <Expandable title="parameters info">
        <Field name="data" type="list[float]" required>
          List on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***

<Anchor id="func_stdev" />

### `stdev()`

*function*

<Steps>
  <Step title="Overloads" icon="pencil">
    <Field name="stdev" type="(data) -> float">
      Standard statistics function.

      <Expandable title="parameters info">
        <Field name="data" type="list[float]" required>
          List on which the function will be calculated.
        </Field>
      </Expandable>
    </Field>
  </Step>
</Steps>

***
