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

# Column average

> Learn how to use the column average test

## Definition

The column average test allows you to assert that the mean of a column is within a certain range.

## Taxonomy

* **Task types**: LLM, tabular classification, tabular regression, text classification.
* **Availability**: development (Continuously evaluate your models and datasets as you iterate on their versions.)
  and monitoring (Monitor a model in production, measure its health, check for drifts and set up alerts.).

## Why it matters

* If you are tracking quantities such as latency or cost (e.g. per LLM request), you can use the column average test to assert these quantities are within the expected range.
* Some features may have a known average value, and you can use the column average test to assert that it is within the expected range.

## Test configuration examples

If you are writing a `tests.json`, here are a few valid configurations for the character length test:

```json Development theme={null}
[
  {
    "name": "Average of column 'Age' is greater than 20",
    "description": "Asserts that the average value of the numeric column 'Age' is greater than 20",
    "type": "integrity",
    "subtype": "columnAverage",
    "thresholds": [
      {
        "insightName": "columnAverage",
        "insightParameters": [{ "name": "column_name", "value": "Age" }],
        "measurement": "columnAverage",
        "operator": ">",
        "value": 20.0
      }
    ],
    "subpopulationFilters": null,
    "mode": "development",
    "usesValidationDataset": true,
    "usesTrainingDataset": false,
    "usesMlModel": false,
    "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689"
  }
]
```

```json Monitoring theme={null}
[
  {
    "name": "Average of column 'Age' is greater than 20",
    "description": "Asserts that the average value of the numeric column 'Age' is greater than 20",
    "type": "integrity",
    "subtype": "columnAverage",
    "thresholds": [
      {
        "insightName": "columnAverage",
        "insightParameters": [{ "name": "column_name", "value": "Age" }],
        "measurement": "columnAverage",
        "operator": ">",
        "value": 20.0
      }
    ],
    "subpopulationFilters": null,
    "mode": "monitoring",
    "usesProductionData": true,
    "evaluationWindow": 3600,
    "delayWindow": 0,
    "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689"
  }
]
```

## Related

* [Great Expectations test](https://docs.openlayer.com/tests/integrity/great-expectations) with expectations such as
  `expect_column_mean_to_be_between`, `expect_column_median_to_be_between`, etc.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.