Inferencial Stadistics library
Project description
Instpy - Inferencial Stadistics Python
What is Instpy?
instpy is a stadistic library which permit you analyze measures obtaining main stadistical results like
Histograms
Qqplots
Levene
testShapiro-Wilk
testParametric
orNon parametric
test.
With this library you can test multiple or single measures, check if data verify normality condition or not and test measures against stadistic tests. Instpy has class where you can instance an object with following attributes:
#Creating an InferencialStats object
InferencialStats(measures,alpha,is_paired,mean)
measures: list lists of data (int or float)
alpha (Optional): Significance level (float) E.g: 0.05 or 0.01
is_paired (Optional) : bool flag to declare your measures as paired or non paired data
mean (Optional): Scalar value to test against single measure
Methods
The main method of this library.
inferencial_statistics()
It executes an study about its attributes following next workflow
- ¿Single or multiple measures?
- Obtain
[Histogram , Qqplot , Shapiro-Wilk test results]
of every measure - Perform
Levene Test
- Perform
Parametric
orNon-parametric
test depending on whether measures follow
normal distribution or non normal distribution
If you want to get some additional features about your analysis you can try with these methods
crit_diff
Display a graphical analisys comapring critical differences from each measures
InferencialStats.crit_diff()
show_hists
Plot a plotly.graph_object.Figure
with all measure histograms
InferencialStats.show_hists();
show_qqplots
Plot a plotly.graph_object.Figure
with all measure qqplots
InferencialStats.show_qqplots();
get_swtests
Return Pana.DataFrame
with Shapiro-Wilk test results confirming if they follow or not a normal distribution
InferencialStats.get_swtests();
One method that is not vinculate with an InferencialStats object but library Instpy
get_ranks
Get ranks of input measures
InferencialStats.get_ranks(measures);
Installation
#With pip
pip install instpy
Example
import instpy
#Lets create some measures such as normal or uniform data distribution
x = np.random.normal(size=100).tolist()
y = np.random.normal(size=100).tolist()
t = np.random.normal(size=100).tolist()
z = np.random.normal(size=100).tolist()
#---------------------------------------------------------------------
xx = np.random.normal(size=100).tolist()
yx = np.random.normal(size=104).tolist()
tx = np.random.normal(size=110).tolist()
zx = np.random.normal(size=108).tolist()
#---------------------------------------------------------------------
Single measure case
#Create measure parameter
## Single data -------------
single_measure=[x]
res=InferecialStats(single_measure,is_paired=True,mean=80)
#Now lets analyze measure
res.inferencial_statistics()
#In this case it will only one plot
res.show_hists()
res.show_qqplots()
print(res.get_swtests())
print(res.get_t_res())
Multiple measure case
Normal measures
## Multiple data
data_measure=[x,y,z,t]
res=InferecialStats(data_measure,is_paired=True,alpha=0.05)
res.inferencial_statistics()
#-------Results-------
# [x]-->Histograms
# [x]-->Qqplot
# [x]-->Shapiro-Wilk test
# [x]-->Levene Test
# [x]-->Normality Condition
# [x]-->Parametric Test
# |
# |- One - Way ANOVA Repeated Measures
# [ ]-->Non Parametric Test
Non normal measures and unpaired
## Multiple data
data_measure=[xx,yx,zx,tx]
res=InferecialStats(data_measure,is_paired=False,alpha=0.05)
res.inferencial_statistics()
#-------Results-------
# [x]-->Histograms
# [x]-->Qqplot
# [x]-->Shapiro-Wilk test
# [x]-->Levene Test
# [ ]-->Normality Condition
# [ ]-->Parametric Test
# [x]-->Non Parametric Test
# |
# |- Kruskal
Author - Contact
Carlos Enrique - calollikito12000@gmail.com
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 instpy-0.0.1.tar.gz
.
File metadata
- Download URL: instpy-0.0.1.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9df8c241beb72cec6d61534dce0eeed39e3078e275756bef108e13a3e742cef |
|
MD5 | cb6e26391e2552fd5ec8862483626565 |
|
BLAKE2b-256 | 335f0080f58ba7c69899fc146cb1bbc5d8334cfde65b44c09898d61ed490725b |
File details
Details for the file instpy-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: instpy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 254b88c457ac34ea28eba6cf0109a4f42937e8f5a591abb7187ce0854d7ce68c |
|
MD5 | 8b9c5b7c016815b6c4a2acb33f6c52ac |
|
BLAKE2b-256 | 5345aac99481e2798d47b991e05e9e19502b19f68175b883f1a81b0ae2a2c0a1 |