Skip to main content

Check that your data follows, at least approximately, the Normal distribution.

Project description

normtest

This package has a series of tests used to check whether a set of sample data follows, at least approximately, the Normal distribution.

Available tests (17/11/2023)

  • Filliben
  • Ryan-Joiner

Install

pip install normtest

Usage

Each test has its own class and can be imported as follows:

from normtest import RyanJoiner
from normtest import Filliben

To perform the test, just instantiate the class and apply the fit method, passing the data set as a NumpyArray. For example:

import numpy as np
test = RyanJoiner()
x_data = np.array([6, 1, -4, 8, -2, 5, 0])
test.fit(x_data)

After the fit method is applied, the test object now has a series of attributes with the test results. The main attribute is test.normality, which contains the summarized results:

print(test.normality)
RyanJoiner(statistic=0.9844829186140105, critical=0.8977794003662074, p_value='p > 0.100', conclusion='Fail to reject H₀')

The test object also has methods for graphical visualization of results, such as the line_up method. See the documentation for details.

Each test has its individual module, and functions can be accessed through the modules. To import the module that contains all the RyanJoiner test functions, for example, use:

from normtest import ryan_joiner

This way, it is possible to generate graphs and obtain intermediate values from the test calculations. For example:

size = 7
pi = ryan_joiner._order_statistic(size)
print(pi)
[0.0862069  0.22413793 0.36206897 0.5        0.63793103 0.77586207
 0.9137931 ]

License

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

normtest-0.0.2.tar.gz (4.5 MB view details)

Uploaded Source

Built Distribution

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

normtest-0.0.2-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file normtest-0.0.2.tar.gz.

File metadata

  • Download URL: normtest-0.0.2.tar.gz
  • Upload date:
  • Size: 4.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for normtest-0.0.2.tar.gz
Algorithm Hash digest
SHA256 950b74193525903f7cb66b0ca79b4045d1a69b533f5fe9c82d3a160a5e5bc87c
MD5 74bb0f7b2ce3f1099dbc5c08bc0e4e02
BLAKE2b-256 e1b87b41b6d784760daea261e8efd7c3740da53f77f0d82222e583b93d5ac3ff

See more details on using hashes here.

File details

Details for the file normtest-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: normtest-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for normtest-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 db808c8731f0df3d580142f4524bd5a595e90b8c8cc62e45fdf0a6888187ee9f
MD5 9cd3c58fc5c1766f01722543f0a6be0f
BLAKE2b-256 05d9e09c65c880199d029c1657614b135d25d328819e28aed7071ba99d02b7ac

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