Skip to main content

Measurement statistics with uncertainties and error propagation

Project description

# Measurement Statistics

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

## 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 value

width = value.ValueUncertainty(11, 0.4)
length = value.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:

l = value.ValueUncertainty(92.95, 0.1)
T = value.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

Project details


Download files

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

Source Distributions

measurement_stats-0.1.tar.gz (7.6 kB view details)

Uploaded Source

measurement_stats-0.1.macosx-10.6-intel.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

measurement_stats-0.1-py2.py3-none-any.whl (10.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file measurement_stats-0.1.tar.gz.

File metadata

File hashes

Hashes for measurement_stats-0.1.tar.gz
Algorithm Hash digest
SHA256 ddc33519854f0ec90ac0543b2bcd1d052ac8014b308153c0c96016ac72003483
MD5 bd15055c5f0d44041f39502a1f609316
BLAKE2b-256 da8cb16bbbe2d06f56a2437c79caa158b5fa7ec97b708848ca85ff5ff9bfafa6

See more details on using hashes here.

File details

Details for the file measurement_stats-0.1.macosx-10.6-intel.tar.gz.

File metadata

File hashes

Hashes for measurement_stats-0.1.macosx-10.6-intel.tar.gz
Algorithm Hash digest
SHA256 f77e6bc119380916ac9d8e736331b1eed0863c9f770fe080ccfd8f62a4c59f0e
MD5 b01a65b839f7b0165ded776f60f525af
BLAKE2b-256 5911dd59c61fe3e3919862db4df91c8c5fd66192c8c488f6ef428402c1bc9b6e

See more details on using hashes here.

File details

Details for the file measurement_stats-0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for measurement_stats-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5d1cc45488e8504f7208b78209ad320c05063a5c501052fc3ababe8551ee07c7
MD5 58a5fc5be7ae15f91f056cd204a45cf9
BLAKE2b-256 5f8da12c8e0a5a56a9f10013092c14a28acfb95a86949c2ab53472c818147097

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