Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

anova test in python

from scipy.stats import f_oneway
data1 = [0.873, 2.817, 0.121, -0.945, -0.055, -1.436, 0.360, -1.478, -1.637, -1.869]
data2 = [1.142, -0.432, -0.938, -0.729, -0.846, -0.157, 0.500, 1.183, -1.075, -0.169]
data3 = [-0.208, 0.696, 0.928, -1.148, -0.213, 0.229, 0.137, 0.269, -0.870, -1.204]
stat, p = f_oneway(data1, data2, data3)
print('stat=%.3f, p=%.3f' % (stat, p))
if p > 0.05:
	print('Probably the same distribution')
else:
	print('Probably different distributions')
Comment

PREVIOUS NEXT
Code Example
Python :: linking custom CSS in flask 
Python :: create a dataframe python 
Python :: replace character in string python 
Python :: python for loop counter 
Python :: time a line of code python 
Python :: np.array to list 
Python :: MovieWriter stderr: ffmpeg: error while loading shared libraries: libopenh264.so.5: cannot open shared object file: No such file or directory 
Python :: pylint import error 
Python :: difference between object and class in python 
Python :: replace value pandas df 
Python :: how to add an item to a list in python 
Python :: clean punctuation from string python 
Python :: python Program to check if a given year is leap year 
Python :: two sum python 
Python :: how to use the print function in python 
Python :: python convert string datetime into datetime 
Python :: cant install tensorflow pip python 3.6 
Python :: what is // in python 
Python :: check input in python 
Python :: np to tuple 
Python :: django secure variable 
Python :: python check string not exist in array 
Python :: change python3 as default for mac 
Python :: python get last element of iterator 
Python :: _getfullpathname: path should be string, bytes or os.PathLike, not list 
Python :: convert number from one range to another 
Python :: py declare type list 
Python :: program for factorial of a number in python 
Python :: check if path exists python 
Python :: odoo scaffold 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =