excel 重复方差分析

Recently, we looked at how to Perform a One-Way Analysis of Variance in Excel. In today’s article, we will take that a step further and a look at a Two-Factor ANOVA.

最近,我们研究了如何在Excel中执行方差的单向分析。 在今天的文章中,我们将更进一步,介绍两因素方差分析。

The Two-Way Analysis of Variance (ANOVA) is a statistical test to evaluate the difference between the means of more than two groups.

双向方差分析(ANOVA)是一种统计测试,用于评估两个以上组的均值之间的差异。

It is also known as a Factorial ANOVA with two factors. We use the model when we have one measurement variable and two nominal variables, also known as factors or main effects. To employ this analysis, we need to have measurements for all possible combinations of the nominal values.

它也被称为阶乘ANOVA,利用两架F演员。 当我们有一个测量变量和两个名义变量(也称为因子或主效应)时,便使用该模型。 要进行此分析,我们需要对标称值的所有可能组合进行测量。

The method estimates how the mean of quantitative variable changes in connection to the different levels (positions) of two categorical values. In other words, this form of ANOVA helps analyze how to independent variables combinedly influence a dependent variable from a statistical point of view. We can also employ the method to evaluate whether the two independent factors have a significant interaction effect.

该方法估计定量变量的平均值如何随两个分类值的不同级别(位置)而变化。 换句话说,这种ANOVA形式有助于从统计角度分析自变量如何联合影响因变量。 我们还可以采用该方法来评估两个独立因素是否具有显着的交互作用。

方差分析如何工作? (How Does ANOVA Work?)

To run the Two-Way ANOVA model, we need to collect data on the quantitative dependent variable at different combinations (levels) of two independent categorical variables.

要运行双向ANOVA模型,我们需要在两个独立类别变量的不同组合(级别)下,收集有关定量因变量的数据。

Each categorical value should have finite possible values or factor levels. They divide the dependent variable’s observations into groups for each combination of the categories.

每个分类值应具有有限的可能值或因子水平。 他们将因变量的观察结果按类别的每种组合分为几组。

The quantitative metric should be one for which we can take measures and calculate a mean (average). Observations need to be of sufficient quantity so that we can calculate an average for each combination of the levels in the categorical metrics.

定量指标应该是我们可以采取措施并计算平均值(平均值)的指标。 观测值必须足够,以便我们可以为分类指标中的每个级别组合计算平均值。

The Analysis of Variance model relies on an F-test to check statistical significance. The F-test is a comparison test, which compares the variance in each group’s mean value to the overall variance in the dependent variable.

方差分析模型依靠F检验来检查统计显着性。 F检验是一种比较检验,用于将每组平均值的方差与因变量的总体方差进行比较。

If the variance within the groups is smaller than the overall variance, the F-value will be higher, meaning the observed difference is most likely real, and not due to chance.

如果组内的方差小于整体方差,则F值将更高,这意味着观察到的差异很可能是真实的,而不是偶然的。

ANOVA is a test of hypotheses that we use to evaluate the differences between group means. The model uses sample data to infer the characteristics of the entire population.

方差分析是一种假设检验,可用于评估组均值之间的差异。 该模型使用样本数据来推断整个人口的特征。

复制与互动 (Replication and Interaction)

We usually run the Two-Way ANOVA model with replication, meaning that there is more than one observation for each combination of the independent variables. We can also perform the analysis without replication, where we only have a single measurement for each arrangement of the factors. However, this is less informative as we can’t test for Interaction, and often have to assume there is none.

我们通常运行带有复制的双向方差分析模型,这意味着自变量的每种组合都有多个观测值。 我们还可以执行分析而无需重复,因为对于每种因素排列,我们只有一个度量。 但是,由于我们无法测试交互作用,因此这方面的信息较少,并且常常不得不假设没有交互作用。

The interaction effect indicates that one factor impacts the relationship between the dependent variable and the other categorical variable.

交互作用表明一个因素影响因变量与另一类别变量之间的关系。

Based on that, there are two types of ANOVA tests we can run for the categorical variables — with and without Interaction.

基于此,我们可以针对分类变量运行两种类型的ANOVA测试-有和没有交互作用。

If we are analyzing a model without Interaction, we test the following two null hypotheses (H0):

如果我们要分析一个没有交互作用的模型,我们将测试以下两个零假设(H0):

  1. No difference in the group means at any level of the first independent variable;在第一个自变量的任何级别上,组中的均值均无差异;
  2. No difference in the group means at any level of the second independent variable.在第二个自变量的任何级别上,组中的均值均无差异。

In case you end up testing a model with Interaction, we add one additional null hypothesis:

万一您最终使用Interaction测试模型,我们会添加一个附加的空假设:

  1. The impact of one independent variable does not affect the impact of the other independent variable.一个自变量的影响不会影响另一自变量的影响。

If the interaction term in a Two-Way ANOVA model turns out to be significant, the most common analysis approach is to evaluate each of the two factors separately, with a One-Way ANOVA.

如果双向方差分析模型中的相互作用项非常重要,则最常见的分析方法是使用单向方差分析分别评估两个因素中的每一个。

It is crucial to remember that when we run the model without replication, we cannot test the Interaction. If we identify a significant difference in the means for one of the factors, there’s no way to tell if this difference is consistent for other values of the second factor.

重要的是要记住,当我们在没有复制的情况下运行模型时,我们无法测试交互。 如果我们发现其中一个因素的均值存在显着差异,则无法判断该差异与第二个因素的其他值是否一致。

假设条件 (Assumptions)

When we perform a Two-Way ANOVA analysis, our data should meet certain assumptions, typical for a parametric test of differences.

当我们进行双向方差分析时,我们的数据应满足某些假设,这通常是差异的参数测试。

Our data should exhibit homoscedasticity, or homogeneity of the variance. This means the variation around the mean value for each group has to be similar between groups. The observations also have to be independent and unique and have an equal standard deviation. The data for the dependent variable should follow a bell curve or be normally distributed.

我们的数据应显示出均方差或方差的均质性。 这意味着每组平均值之间的变化在各组之间必须相似。 观测值也必须独立且唯一,并且具有相等的标准偏差。 因变量的数据应遵循钟形曲线或呈正态分布。

Excel中的双向ANOVA (Two-Way ANOVA in Excel)

The Analysis of Variance is a well-known method within the fields of finance and valuation. As the most widely-available tool in these industries is Excel, we can find the model within the in-built Analysis Tool Pack within the software. However, keep in mind that the available model in Excel is not as robust as in specialized statistical software.

方差分析是财务和评估领域中的一种众所周知的方法。 由于这些行业中使用最广泛的工具是Excel,我们可以在软件的内置Analysis Tool Pack中找到模型。 但是,请记住,Excel中的可用模型不如专用统计软件中那样强大。

One of the most prominent limitations of Excel is that it can only take balanced designs meaning each group has the same number of observations. Running a Two-Way ANOVA with an unbalanced design is significantly more complex and challenging from a computational perspective, and you will need some statistics software to perform this.

Excel的最突出的局限之一是它只能采用平衡的设计,这意味着每个组具有相同数量的观察值。 从计算的角度来看,使用不平衡设计运行双向方差分析会变得更加复杂和具有挑战性,您将需要一些统计软件来执行此操作。

To perform a two-factor analysis of variance in Excel, first, we need to format our data properly. Let’s look at an example to understand the concept better. We are looking at the categorical values Gender and Industry, and the dependent variable Salary. We have obtained information on the annual Salary for ten people for each group made by all combinations of factor levels. We prepare our data as a matrix with one factor on the rows and one on the columns:

要在Excel中执行两因素方差分析,首先,我们需要正确格式化数据。 让我们看一个例子,以更好地理解该概念。 我们正在研究分类值Gender和Industry,以及因变量Salary。 我们已经获得了由因子水平的所有组合得出的每组十个人的年薪信息。 我们将数据准备为矩阵,在行上有一个因子,在列上有一个因子:

Once our data is formatted in this way, and we have ensured to include an equal quantity of observations for each combination of the two categories, we can run the ANOVA model.

一旦我们的数据以这种方式格式化,并且确保为两个类别的每种组合包括相等数量的观察值,就可以运行ANOVA模型。

Go to the Data tab and open Data Analysis.

转到数据标签,然后打开数据分析。

Note, if you don’t see it there, go into the Add-Ins options and enable Analysis ToolPak.

请注意,如果在此处看不到它,请进入“加载项”选项并启用“分析工具库”。

From the Data Analysis menu, we will select Anova: Two-Factor With Replication.

从“数据分析”菜单中,我们将选择“ Anova:带复制的两要素”。

The following screen asks us to input some details. First, select the input range. Then remember to properly include the Rows per sample number, which is the number of observations within each combination of factors. For our data, this is ten. You can leave the Alpha at 0.05, which is usually the value we use in financial analysis and modeling.

以下屏幕要求我们输入一些详细信息。 首先,选择输入范围。 然后,请记住正确地包括每个样本数的行数,即每个因子组合中的观察数。 对于我们的数据,这是十。 您可以将Alpha设置为0.05,这通常是我们在财务分析和建模中使用的值。

Hit OK, and Excel will generate a new worksheet containing all the relevant statistical information for the Two-Way ANOVA model.

单击确定,Excel将生成一个新的工作表,其中包含双向ANOVA模型的所有相关统计信息。

Let’s start by evaluating whether the Industry independent variable has a statistically significant effect on the Salary dependent variable.

让我们首先评估行业自变量对薪资因变量是否具有统计上显着的影响。

The P-value is 0.19939. As this exceeds the 0.05 Alpha level, the result has no statistical significance. In other words, we can conclude that the Industry has no significant impact on the Salary.

P值为0.19939。 由于该值超过0.05 Alpha水平,因此结果没有统计学意义。 换句话说,我们可以得出结论,该行业对工资没有重大影响。

Next, let us look at Gender and assess whether it has a notable impact.

接下来,让我们看一下性别,并评估它是否具有显着影响。

The P-value for this factor is less than 0.05. Because of that, we consider Gender to be statistically significant. In other words, we can note a substantial difference in Salary between Females and Males.

该因子的P值小于0.05。 因此,我们认为性别具有统计学意义。 换句话说,我们可以注意到男性和女性之间的薪资差异很大。

The last F-test we will look at is the one for Interaction.

我们要看的最后一个F检验是用于交互的。

The P-value is 0.09547, which means the result is not statistically significant. There is no significant interaction between Industry and Gender.

P值为0.09547,这意味着结果在统计上不显着。 工业与性别之间没有显着的相互作用。

In conclusion, we know that Industry doesn’t influence Salary materially, while Gender has a substantial impact on the Salary variable. Therefore, we expect the Female and Male groups to differ from each other.

总而言之,我们知道行业不会对薪资产生重大影响,而性别对薪资变量具有重大影响。 因此,我们希望女性和男性群体互不相同。

Looking at the mean for each group, we see that the average Salary in the Female group is €100 thousand, while for the Male group it is almost 20% more, sitting at €118 thousand. This comparison is not enough to assess whether the difference is statistically significant, but it’s an excellent way to get a general idea about the data.

从每个组的平均值来看,我们发现女性组的平均工资为10万欧元,而男性组的平均工资高出近20%,为11.8万欧元。 这种比较不足以评估差异是否在统计上显着,但是,这是获得有关数据的总体思路的绝佳方法。

You can download the example model in Excel in the original article.

您可以在原始文章中的Excel中下载示例模型。

结论 (Conclusion)

In the end, the Two-Way ANOVA model identifies the impact of two categorical variables on a dependent variable. It is a powerful analytical tool that we can run in Excel and any specialized statistics software. However, it is essential to remember it’s underlying assumptions and the limitations that they create.

最后,双向方差分析模型确定了两个类别变量对因变量的影响。 这是一个功能强大的分析工具,我们可以在Excel和任何专用统计软件中运行。 但是,必须记住它的基本假设及其所产生的限制。

Please, show your support by sharing the article with colleagues and friends. Also, don’t forget to subscribe to our newsletter (no spam, ever!).

请通过与同事和朋友分享文章来表达对您的支持。 另外,别忘了订阅我们的新闻通讯(永远没有垃圾邮件!)。

Disclaimer: The information in this article is for educational purposes only and should not be treated as professional advice.

免责声明:本文中的信息仅用于教育目的,不应视为专业建议。

Originally posted on https://magnimetrics.com/ on 11 September 2020.

最初于2020年9月11日发布在https://magnimetrics.com/上。

翻译自: https://medium.com/magnimetrics/how-to-run-a-two-way-analysis-of-variance-anova-in-excel-a4a6f4aa106c

excel 重复方差分析


http://www.taodudu.cc/news/show-2951612.html

相关文章:

  • excel 置信区间 计算_如何用excel计算 95%的置信区间
  • excel求方差和标准差的函数_Excel如何计算方差与均方差
  • excel方差分析
  • 利用excel计算方差分析多重比较中q值表和SSR表
  • python excel计算_怎么用python导入excel计算方差
  • 极客时间 自我提升第二天 数据结构与算法之美 应该掌握 / 趣谈网络原理 / 深入浅出计算机组成原理 思维导图
  • 网络分层的真实含义是什么
  • 2 理解网络协议的工作模式
  • 网络技术摘抄(入门需知)
  • 02-网络为什么要分层
  • 校招基本告一段落,总结一下
  • Java面试-001
  • QtVtk-001-编译
  • SDN初体验·理论篇(零):SDN与传统网络不得不说的那些事
  • Hacking 开心网(虚拟朋友) with Mechanize
  • [Python从零到壹] 四.网络爬虫之入门基础及正则表达式抓取博客案例
  • 网络为什么要分层—程序如何工作
  • 网络分层的真实含义是什么?
  • 60-网络分层的真实含义是什么?
  • 《网络协议》笔记-网络分层
  • 网络协议 2
  • 【网络协议趣谈】网络分层的含义
  • 云图雅集—优美的文章段落
  • CSDN添加页内跳转和页外指定段落跳转
  • 某男孩PYTHON29期解压版
  • 老男孩python 2018最新_2018最新老男孩全栈python第3期视频教程 完整版 附源码与笔记 | 52download...
  • python 老男孩全套教程-老男孩全栈python视频教程104天【百度网盘】
  • 老男孩每日一题(一)
  • 老男孩51CTO博客博文列表整理版20170620更新
  • 老男孩教育100道面试题

excel 重复方差分析_如何在Excel中运行方差方差分析的两种方法相关推荐

  1. 如何在Jupyter中运行R语言(两种解决方案)

    Python用Jupyter写分析记录比较舒服,学了R也想在Jupyter上运行. 复杂方案 安装R语言.Jupyter程序 在R Console中安装1 install.packages(c('re ...

  2. VB中FSO的调用的两种方法

    方法一:   Dim   objFso      Set   objFso   =   CreateObject("Scripting.FileSystemObject")    ...

  3. Java中的string定义的两种方法和区别

    java中的String定义的两种方法和区别 第一种:new方式 String s1 = new String("hello world"); String s2 = new St ...

  4. 多元统计分析matlab,MATLAB的统计工具箱中的多元统计分析中提供了聚类分析的两种方法...

    MATLAB的统计工具箱中的多元统计分析中提供了聚类分析的两种方法: 1.层次聚类hierarchical clustering 2.k-means聚类 这里用最简单的实例说明以下层次聚类原理和应用发 ...

  5. WPF中在XAML中实现数据类型转换的两种方法

    WPF中在XAML中实现数据类型转换的两种方法 原文:WPF中在XAML中实现数据类型转换的两种方法 熟悉数据绑定的朋友都知道,当我们在Model中获取一个对象的数据,常常需要对其进行数据转换后显示在 ...

  6. python怎么清屏_python实现清屏的方法 Python Shell中清屏一般有两种方法。

    Python Shell 怎样清屏? Python Shell中清屏一般有两种方法. 奈何一个人随着年龄增长,梦想便不复轻盈:他开始用双手掂量生活,更看重果实而非花朵.--叶芝<凯尔特的搏暮&g ...

  7. Revit插件教学丨Revit中绘制斜楼板的两种方法?

    Revit插件教学丨Revit中绘制斜楼板的两种方法? 我们经常遇到一些斜楼板,很多朋友不知道如何画好楼板,经常在公众号留言说怎么画好楼板,怎么快速高效.但我相信很多玩Revit的玩家都很熟悉,今天和 ...

  8. 将uni-app打包的H5放在 Android程序中在 webview 显示的两种方法

    将uni-app打包的H5放在 Android程序中在 webview 显示的两种方法 前言 Hash History 完事 前言 之前有个项目要同时做小程序和APP,本着节省时间的想法,研究了下un ...

  9. 计算机word降序排列怎么做,word中怎么进行排序的两种方法

    word文档中表格除了作为我们的编辑和展示功能之外,还可以进行排序功能,十分方便,那么下面就由学习啦小编给大家分享下word中进行排序的技巧,希望能帮助到您. word中进行排序方法一: 步骤一:将光 ...

  10. Linux中增加软路由的两种方法

    Linux中增加软路由的两种方法 第一种: route add -net 172.16.6.0 netmask 255.255.255.0 gw 172.16.2.254 dev eth0 /* 增加 ...

最新文章

  1. 0011_练习题d1
  2. [转]《JAVA与模式》之责任链模式
  3. 简单的成绩录入系统程序及分析以及思考
  4. python创建打开文件-python打开文件方式
  5. 使用SQL DTS功能实现从DB/2向SQL Server传输数据
  6. javaWeb_JSP 动态指令 forward 的程序
  7. ReactiveNative学习之Diff算法
  8. JEECG 树列表操作总刷新列表,需要重新展开问题 【官方补丁,适用所有版本】
  9. HDU2476:String painter(区间dp)
  10. Hive:用Java代码通过JDBC连接Hiveserver
  11. paip.c++ 指针跟引用的区别.
  12. 充电器input与output_变频器input和output的区别?
  13. DDD原著 -- 第一章 知识消化
  14. 熊出没之奇幻空间里面的机器人图片_《熊出没之奇幻空间》小铁COCO智能机器人玩具...
  15. workerman创建wss服务
  16. [网络安全自学篇] 九十一.阿里云搭建LNMP环境及实现PHP自定义网站IP访问 (1)
  17. jQuery如何向HTML添加指定的内容
  18. 农家女靠养花赚钱,年收入几十万
  19. 深入浅出XDL(二):embedding
  20. 【D3.js数据可视化系列教程】(三十四)-- sankey图

热门文章

  1. 刷脸支付服务商促进数字化时代来临
  2. qt助手服务器超时,hfs网络文件服务器
  3. 咸鱼的 GitHub 情报 | 20200111 期
  4. 火狐浏览器的全屏兼容问题 allowfullscreen=true
  5. 个人博客系统源码 溯雪Sxlog轻博客源码 PHP开源 简洁干净轻博客源码
  6. 机器学习:从决策树到xgboost
  7. pve rust 能拆家吗_文明重启有哪些游戏模式应该怎么玩
  8. 常见的POS打印机分类
  9. 圣诞节用代码写一颗圣诞树【html5写的3D逼真圣诞树外加python无延迟的豪华圣诞树】
  10. 和异性合租是什么样的体验?