当前位置:网站首页>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
边栏推荐
- Informatics Olympiad all in one YBT 1175: divide by 13 | openjudge noi 1.13 27: divide by 13
- UCORE overview
- 8 cool visual charts to quickly write the visual analysis report that the boss likes to see
- 斑马识别成狗,AI犯错的原因被斯坦福找到了
- LeetCode 1656. Design ordered flow
- 浅谈拉格朗日插值及其应用
- ucore概述
- Bcvp developer community 2022 exclusive peripheral first bullet
- [combinatorial mathematics] recursive equation (example of recursive equation 2 Hanoi Tower | example of recursive equation 3 insertion sequencing)
- 什么是质押池,如何进行质押呢?
猜你喜欢

What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material

There are several APIs of airtest and poco that are easy to use wrong in "super". See if you have encountered them

Mysql 单表字段重复数据取最新一条sql语句

CC2530 common registers for ADC single channel conversion

Explore Netease's large-scale automated testing solutions see here see here

2022.02.14_ Daily question leetcode five hundred and forty

关于学习Qt编程的好书精品推荐

IDEA-配置插件
![[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

Google Earth engine (GEE) - daymet v4: daily surface weather data set (1000m resolution) including data acquisition methods for each day
随机推荐
What kind of material is 14Cr1MoR? Analysis of chemical composition and mechanical properties of 14Cr1MoR
Learn from me about the enterprise flutter project: simplified framework demo reference
How to allow remote connection to MySQL server on Linux system?
PHP CI (CodeIgniter) log level setting
IDEA-配置插件
[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
Zebras are recognized as dogs, and Stanford found the reason why AI made mistakes
Mysql database DDL and DML
CC2530 common registers for crystal oscillator settings
On Lagrange interpolation and its application
浅谈拉格朗日插值及其应用
Difference between JSON and bson
【剑指 Offer】58 - I. 翻转单词顺序
mysql用户管理
面试之 top k问题
MySQL converts comma separated attribute field data from column to row
Preventing/catching “IllegalArgumentException: parameter must be a descendant of this view” error
How to set up SVN server on this machine
What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
关于视觉SLAM的最先进技术的调查-A survey of state-of-the-art on visual SLAM
