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.1.7.tar.gz (17.6 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.1.7-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: engstats-0.1.7.tar.gz
  • Upload date:
  • Size: 17.6 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.1.7.tar.gz
Algorithm Hash digest
SHA256 a87f3ee5a5b6fe807e11e00e1c84f9687118c49961ad38b1a87c6b3025a7fe59
MD5 19ac67a6ced22ab6e61d75ef6b92b044
BLAKE2b-256 1bb30631ccf3ea7d185ba7aa497bd1fdd4088f4632d9e6502a47b860c23294bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: engstats-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 26.2 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.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 cc1cc0e190639331fe88e7f8f9ca27bc0ed09382015bc6cfab9e1567cf1565e5
MD5 131a54c2f630652aca7c31e09169f9af
BLAKE2b-256 0625396fb52d56729c082a59a7c0d39d75e6871abf09358970a148f1e09b7f54

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