Skip to main content

A companion package for probability and statistics for engineers

Project description

Companion package engstats

A companion Python package for GEN_ENG 231 (IEMS 201) introductory engineering statistics class.

The package engstats provides a companion package to handle making visualizations for an introductory engineering statistics class.

A user manual is currently under construction.


Installation

pip install -U engstats

Or from source:

git clone https://github.com/prof-mc/engstats
cd engstats
pip install -e ".[dev]"

Quick Start

import engstats as es

# Load a bundled dataset
df = es.load_dataset("concrete")
df.head()

# Descriptive statistics
es.five_number_summary(df["strength_mpa"])
es.summary_stats(df["strength_mpa"])

# Simple linear regression
model = es.simple_linear_regression(df, x="water_cement", y="strength_mpa")
model.summary()

# Diagnostic plots
es.plot_scatter_regression(df, x="water_cement", y="strength_mpa")
es.plot_residuals(model)
es.plot_qq(model)

# Hypothesis testing
group_a = df[df["age_days"] <= 14]["strength_mpa"]
group_b = df[df["age_days"] >= 28]["strength_mpa"]
result = es.two_sample_ttest(group_a, group_b)
print(result)

# Probability
p = es.normal_prob(1.96)          # P(Z ≤ 1.96) ≈ 0.975
es.plot_normal_curve(mean=70, std=5, shade_above=80)

Example Datasets

Name Description
concrete Compressive strength vs. water-cement ratio + age
bridges Load capacity vs. span length, by material
circuits Resistor tolerance measurements across batches
es.load_dataset("list")   # print all available datasets

Running Tests

pytest tests/ -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

engstats-0.2.1.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

engstats-0.2.1-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file engstats-0.2.1.tar.gz.

File metadata

  • Download URL: engstats-0.2.1.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for engstats-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a87775680cf393ec85000ff0b5f8620fe9ceeb59128195d7fa0943cd5cb4cfb5
MD5 8053296c67f1f86d37840762798f9169
BLAKE2b-256 383c1ad175db6db28b7df36aebd5e03be604093b796970de5a725ea43af0c186

See more details on using hashes here.

File details

Details for the file engstats-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: engstats-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for engstats-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad41056622e3634f27e9e9ddf443897008f1f68eddb51c32752fc443361263a6
MD5 393f12f78a93ff3e70b9425f4933f2d5
BLAKE2b-256 3984ac23bbbd20e22917d2afeb19415672c05828eb6da40961736d050ac0b30a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page