Search packages, repositories and app categories

Package detailsv3.0.0

stats

Calculate common statistical values for a set of numbers: max, min, mean, median, standard deviation, and standard error.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
7K
Likes
36
Pub points
160

Install package

flutter pub add stats

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The stats package provides a simple and efficient way to calculate common statistical measures for a collection of numbers, including max, min, mean, median, standard deviation, and standard error. Designed for developers working with numerical data, it offers accurate computations with minimal overhead. Ideal for analytics, data visualization, or any application requiring basic statistical analysis, the package is compatible across all major platforms. It is lightweight and easy to integrate into Flutter projects via pub.dev.

Use cases

  • Data analysis in apps
  • Real-time statistics calculation
  • Scientific computing
  • Performance metric tracking
  • Educational tools
  • Visualization data processing

Key features

  • Supports max, min, mean, median
  • Calculates standard deviation and standard error
  • Cross-platform compatibility
  • Simple API with minimal setup
  • High accuracy in computations
  • Lightweight and fast

Suitable for

  • Flutter developers needing math utilities
  • Apps handling numerical datasets
  • Educational or analytical applications
  • Data-driven UI components
  • Backend logic with client-side stats

Considerations

  • Not suitable for large-scale statistical modeling
  • Does not support advanced statistical tests
  • Limited to basic descriptive statistics
  • No built-in data persistence
  • Requires manual input of number lists

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

CI Pub Package package publisher

Supports:

  • Stats: Typical statistical values over a List or Stream of num: count, min, max, mean, sumOfSquares
  • ConfidenceInterval over Stats with a given confidence level.
import 'dart:convert';

import 'package:stats/stats.dart';

void main() {
  final input = [1, 2, 3, 4, 5, 6, 7, 8];
  print('Input: $input');
  final stats = Stats.fromData(input);
  final confidence = ConfidenceInterval.calculate(
    stats,
    ConfidenceLevel.percent95,
  );

  print(_toJson(confidence));
  // {
  //   "stats": {
  //     "count": 8,
  //     "min": 1,
  //     "max": 8,
  //     "mean": 4.5,
  //     "sumOfSquares": 42.0
  //   },
  //   "marginOfError": 2.0481500799501973,
  //   "tScore": 2.365,
  //   "confidenceLevel": "percent95"
  // }
}

String _toJson(Object? value) =>
    const JsonEncoder.withIndent('  ').convert(value);

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package