当前位置:网站首页>ANOVA example
ANOVA example
2022-07-03 16:52:00 【Changsha has fat fish】
One way ANOVA
# Sipping, sipping, sipping 3 Different user ratings in different cities from scipy.stats import f_oneway a = [10,9,9,8,8,7,7,8,8,9] b = [10,8,9,8,7,7,7,8,9,9] c = [9,9,8,8,8,7,6,9,8,9] f,p = f_oneway(a,b,c) print (f)0.101503759398 0.903820890369among p The value is 0.903820890369
It cannot be considered that the factors tested have a significant impact on the observed value
Multivariate analysis of variance
# # Sipping, sipping, sipping 2 One factor : Environmental grade , Food grade from scipy import stats import pandas as pd import numpy as np from statsmodels.formula.api import ols from statsmodels.stats.anova import anova_lm environmental = [5,5,5,5,5,4,4,4,4,4,3,3,3,3,3,2,2,2,2,2,1,1,1,1,1] ingredients = [5,4,3,2,1,5,4,3,2,1,5,4,3,2,1,5,4,3,2,1,5,4,3,2,1] score = [5,5,4,3,2,5,4,4,3,2,4,4,3,3,2,4,3,2,2,2,3,3,3,2,1] data = {'E':environmental, 'I':ingredients, 'S':score} df = pd.DataFrame(data) df.head()
Symbolic meaning :
- (~) Isolate dependent and independent variables ( Left dependent variable , Right argument )
- (+) Separate the arguments
- (:) Indicates the interaction of two independent variables
formula = 'S~E+I+E:I' model = ols(formula,df).fit() results = anova_lm(model) print (results)df sum_sq mean_sq F PR(>F) E 1.0 7.22 7.220000 54.539568 2.896351e-07 I 1.0 18.00 18.000000 135.971223 1.233581e-10 E:I 1.0 0.64 0.640000 4.834532 3.924030e-02 Residual 21.0 2.78 0.132381 NaN NaNexplain : E Of F value 2.896351e-07,I Of F value 1.233581e-10 Very small ,E and I Have a significant impact on the results , There is no interaction
边栏推荐
- There are several APIs of airtest and poco that are easy to use wrong in "super". See if you have encountered them
- Mysql database DDL and DML
- Informatics Olympiad all in one YBT 1175: divide by 13 | openjudge noi 1.13 27: divide by 13
- 斑马识别成狗,AI犯错的原因被斯坦福找到了
- 【剑指 Offer】58 - I. 翻转单词顺序
- CC2530 common registers for ADC single channel conversion
- 【剑指 Offer】58 - II. 左旋转字符串
- NSQ source code installation and operation process
- PHP CI (CodeIgniter) log level setting
- 13mnnimo5-4 German standard steel plate 13MnNiMo54 boiler steel 13MnNiMo54 chemical properties
猜你喜欢

Netease UI automation test exploration: airtest+poco

爱可可AI前沿推介(7.3)
![[combinatorics] polynomial theorem (polynomial theorem | polynomial theorem proof | polynomial theorem inference 1 item number is the number of non negative integer solutions | polynomial theorem infe](/img/9d/6118b699c0d90810638f9b08d4f80a.jpg)
[combinatorics] polynomial theorem (polynomial theorem | polynomial theorem proof | polynomial theorem inference 1 item number is the number of non negative integer solutions | polynomial theorem infe

Thread pool executes scheduled tasks

静态程序分析(一)—— 大纲思维导图与内容介绍

2022.02.14_ Daily question leetcode five hundred and forty

Processing strategy of message queue message loss and repeated message sending

于文文、胡夏等明星带你玩转派对 皮皮APP点燃你的夏日

What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr

ucore概述
随机推荐
How to set up SVN server on this machine
PHP production website active push (website)
Informatics Olympiad all in one YBT 1175: divide by 13 | openjudge noi 1.13 27: divide by 13
Hands on in-depth learning notes (XIV) 3.7 Simple implementation of softmax regression
function overloading
Difference between JSON and bson
Thread pool executes scheduled tasks
Static program analysis (I) -- Outline mind map and content introduction
On Lagrange interpolation and its application
Using optimistic lock and pessimistic lock in MySQL to realize distributed lock
MySQL user management
[JDBC] API parsing
【剑指 Offer 】64. 求1+2+…+n
[combinatorics] recursive equation (constant coefficient linear homogeneous recursive equation | constant coefficient, linear, homogeneous concept description | constant coefficient linear homogeneous
RF analyze demo build step by step
What is the material of 13mnnimor? 13mnnimor steel plate for medium and low temperature pressure vessels
Bcvp developer community 2022 exclusive peripheral first bullet
MySQL single table field duplicate data takes the latest SQL statement
匯編實例解析--實模式下屏幕顯示
2022爱分析· 国央企数字化厂商全景报告
