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.0.tar.gz (18.0 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.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: engstats-0.2.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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.0.tar.gz
Algorithm Hash digest
SHA256 a584531e43141a08f49a9d769a7c78bb4ba22077bf863d71c7c8e1fcaa768b93
MD5 7169d3eda8935e07b82a4bee8b571785
BLAKE2b-256 d684941f47951192168ea4014aeff5668cdabd9276b7d7554d2d15c4bc42227b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: engstats-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3826888813234b8f5c353128a16ffa3986d630cdbbe2679eb6eae544b0c4c4d2
MD5 4cdf66bc810c181a21aad83a0224060c
BLAKE2b-256 9e794577ecdb60b8b85b6aa88a9a5ca38706523095026a918b49b49ecdcba975

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