---
title: AverageStatistics
framework: metrickit
role: symbol
role_heading: Structure
path: metrickit/averagestatistics
---

# AverageStatistics

A value that encapsulates an average measurement with supporting statistical data.

## Declaration

```swift
struct AverageStatistics<DimensionType> where DimensionType : Dimension
```

## Mentioned in

Analyzing app performance with MetricKit

## Discussion

Discussion AverageStatistics provides the average value alongside a sample count and standard deviation. When statistical data is unavailable, count is 0 and standardDeviation is negative. You encounter AverageStatistics as the type of certain metric properties, such as value and averageMemory: let statistics = metric.value // AverageStatistics<UnitInformationStorage> print(statistics.average)           // Measurement<UnitInformationStorage> print(statistics.count)             // Int — number of samples print(statistics.standardDeviation) // Double — negative if unavailable This type replaces MXAverage.

## Topics

### Statistics

- [average](metrickit/averagestatistics/average.md)
- [count](metrickit/averagestatistics/count.md)
- [standardDeviation](metrickit/averagestatistics/standarddeviation.md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Supporting types

- [Histogram](metrickit/histogram.md)
- [SignalBars](metrickit/signalbars.md)
- [OSVersion](metrickit/osversion.md)
