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 (25/11/2023)
- Filliben
- Ryan-Joiner
- Looney-Gulledge
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
from normtest import LooneyGulledge
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file normtest-0.0.3.tar.gz
.
File metadata
- Download URL: normtest-0.0.3.tar.gz
- Upload date:
- Size: 7.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95dc79f409b6a934044c9d7eb91c12275801aec62dd71f944cafabca81acc7ab |
|
MD5 | 2abd4fce971317205abd31d0e8dff1e5 |
|
BLAKE2b-256 | 4e00260ba8a6523465b12ed9d1a814bef6b847c287bb56e7ee0f258db62bf8bb |
File details
Details for the file normtest-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: normtest-0.0.3-py3-none-any.whl
- Upload date:
- Size: 45.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b09aaf72ccfca2c9e8939fc47ea39547a34db6a5f0703ce110573bd56e6fd46f |
|
MD5 | 98e19810ebc02373ce1b6d1f9411bd76 |
|
BLAKE2b-256 | 3d45c1d7afa6ee67cb3cfa01a29faf8206e1dbec90cbc11d3abdf55a3c00e9d7 |