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.2.tar.gz (18.1 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.2-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: engstats-0.2.2.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.2.tar.gz
Algorithm Hash digest
SHA256 62549b248886d2cbf2beda2a6daa94cdba51b9247dff2d2cf5ab39a173818e80
MD5 d1efac51a520a9a9fc62865cc8985ae8
BLAKE2b-256 2ffc9c9e88939befbfba972527d40593102d78ddad687c3cb8981cdb60b87afa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: engstats-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1efdd862bbb5c87a5e4439dd34dc4f83b461fe272a755498b955b5ccd62e9163
MD5 b7fb0590abe2bbe4ed37b5f0576e4047
BLAKE2b-256 cdc7f630190dd29ab79899b8153ffd66f88ad024ef12248c2a4026afc34c206d

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