Skip to main content

Measurement Statistics

A statistical package for measurement and population statistics that incorporate measurement uncertainties and error propagation.

Installation:

pip install measurement_stats

Error Propagation

Say, for example, that we have measured a rectangle to be 11 +/- 0.4 centimeters wide and 8 +/- 0.3 centimeters long. We can then calculate the area with uncertainty as follows:

from measurement_stats import ValueUncertainty

width = ValueUncertainty(11, 0.4)
length = ValueUncertainty(8, 0.3)

area = length * width

print('AREA:', area.label)
# $ AREA: 88 +/- 5

For a more complicated example, consider the canonical physics 101 experiment of trying to calculate the acceleration due to gravity using a pendulum. If a student has setup a pendulum with a measured length of 92.95 centimeters and an uncertainty of 0.1 centimeters and measured a period of that pendulum to be 1.936 seconds with an uncertainty of 0.004 seconds, the acceleration due to gravity, with propagated uncertainty, can be determined as follows:

from measurement_stats import ValueUncertainty

l = ValueUncertainty(92.95, 0.1)
T = ValueUncertainty(1.936, 0.004)

g = 4.0 * (math.pi ** 2) * l / (T ** 2)

print('Acceleration Due To Gravity:', g.label)
# $ Acceleration Due To Gravity: 979 +/- 4

Metadata

Release files for measurement-stats 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for measurement-stats 0.3.0
File Size Uploaded
measurement_stats-0.3.0.tar.gz 18.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for measurement-stats 0.3.0
File Interpreter ABI Platform
measurement_stats-0.3.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 44.0 kB

Release files / measurement_stats-0.3.0.tar.gz

Download URL measurement_stats-0.3.0.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
96b1d231755a6ffd8cf3c48a3d10bd74a230b815f6fa77bd624209614c4a4237
BLAKE2b-256 checksum
How to use checksums
23c47885dc811a126d95360270990571d538a1fa847f12283c85033e8fb693ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / measurement_stats-0.3.0-py2.py3-none-any.whl

Download URL measurement_stats-0.3.0-py2.py3-none-any.whl
Size 25.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0a8119307f542660f929fef7af72a925c496e400b93f5f0b1e2cb287990a78e5
BLAKE2b-256 checksum
How to use checksums
21105bd2ae34ef87208b8e2c5301cae203a72ad3677c550253cde3b7e9a2e3fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page