离群值 excel

()

An outlier is a value that is significantly higher or lower than most of the values in your data. When using Excel to analyze data, outliers can skew the results. For example, the mean average of a data set might truly reflect your values. Excel provides a few useful functions to help manage your outliers, so let’s take a look.

离群值是明显高于或低于数据中大多数值的值。 使用Excel分析数据时,离群值可能会使结果偏斜。 例如,数据集的平均平均值可能真正反映您的值。 Excel提供了一些有用的功能来帮助管理离群值,因此让我们来看一下。

一个简单的例子 (A Quick Example)

In the image below, the outliers are reasonably easy to spot—the value of two assigned to Eric and the value of 173 assigned to Ryan. In a data set like this, it’s easy enough to spot and deal with those outliers manually.

在下图中,离群值很容易被发现-将值2分配给Eric,将值173分配给Ryan。 在这样的数据集中,手动发现和处理这些异常值非常容易。

In a larger set of data, that will not be the case. Being able to identify the outliers and remove them from statistical calculations is important—and that’s what we’ll be looking at how to do in this article.

在更大的数据集中,事实并非如此。 能够识别异常值并将其从统计计算中删除非常重要-这就是我们将在本文中探讨的方法。

如何在数据中查找离群值 (How to Find Outliers in your Data)

To find the outliers in a data set, we use the following steps:

要查找数据集中的异常值,我们使用以下步骤:

  1. Calculate the 1st and 3rd quartiles (we’ll be talking about what those are in just a bit).计算第一四分位数和第三四分位数(我们稍后将讨论它们)。
  2. Evaluate the interquartile range (we’ll also be explaining these a bit further down).评估四分位间距(我们还将在更下方进行解释)。
  3. Return the upper and lower bounds of our data range.返回数据范围的上限和下限。
  4. Use these bounds to identify the outlying data points.使用这些界限来标识偏远的数据点。

The cell range on the right of the data set seen in the image below will be used to store these values.

在下图中看到的数据集右侧的单元格范围将用于存储这些值。

Let’s get started.

让我们开始吧。

第一步:计算四分位数 (Step One: Calculate the Quartiles)

If you divide your data into quarters, each of those sets is called a quartile. The lowest 25% of numbers in the range make up the 1st quartile, the next 25% the 2nd quartile, and so on. We take this step first because the most widely-used definition of an outlier is a data point that is more than 1.5 interquartile ranges (IQRs) below the 1st quartile, and 1.5 interquartile ranges above the 3rd quartile. To determine those values, we first have to figure out what the quartiles are.

如果将数据划分为四分之一,那么这些集合中的每一个都称为四分位数。 范围中数字的最低25%构成第一四分位数,接下来的25%构成第二四分位数,依此类推。 我们之所以采取这一步骤是因为,离群值最广泛的使用是一个数据点,该数据点比第一个四分位数低1.5个四分位数范围(IQR),高于第三个四分位数1.5个四分位数范围。 要确定这些值,我们首先必须弄清楚什么是四分位数。

Excel provides a QUARTILE function to calculate quartiles. It requires two pieces of information: the array and the quart.

Excel提供了QUARTILE函数来计算四分位数。 它需要两条信息:数组和夸脱。

=QUARTILE(array, quart)

The array is the range of values that you are evaluating. And the quart is a number that represents the quartile you wish to return (e.g., 1 for the 1st quartile, 2 for the 2nd quartile, and so on).

数组是您要评估的值的范围。 而夸脱是代表您希望返回的四分位数的数字(例如,第一个四分位数为1,第二个四分位数为2,依此类推)。

Note: In Excel 2010, Microsoft released the QUARTILE.INC and QUARTILE.EXC functions as improvements to the QUARTILE function. QUARTILE is more backward compatible when working across multiple versions of Excel.

注意:在Excel 2010中,Microsoft发布了QUARTILE.INC和QUARTILE.EXC函数作为对QUARTILE函数的改进。 在跨多个版本的Excel工作时,QUARTILE更加向后兼容。

Let’s return to our example table.

让我们回到示例表。

To calculate the 1st Quartile we can use the following formula in cell F2.

为了计算第1四分位,我们可以使用在小区F2以下公式。

=QUARTILE(B2:B14,1)

As you enter the formula, Excel provides a list of options for the quart argument.

输入公式时,Excel将为夸脱参数提供选项列表。

To calculate the 3rd quartile, we can enter a formula like the previous one in cell F3, but using a three instead of a one.

要计算第三个四分位数,我们可以在单元格F3中输入一个类似于前一个四分位数的公式,但是要使用三个而不是一个。

=QUARTILE(B2:B14,3)

Now, we’ve got the quartile data points displayed in the cells.

现在,我们在单元格中显示了四分位数数据点。

第二步:评估四分位间距 (Step Two: Evaluate the Interquartile Range)

The interquartile range (or IQR) is the middle 50% of values in your data. It is calculated as the difference between the 1st quartile value and the 3rd quartile value.

四分位数范围(或IQR)是数据中值的中间50%。 计算为第一四分位数和第三四分位数之间的差。

We’re going to use a simple formula into cell F4 that subtracts the 1st quartile from the 3rd quartile:

我们将用一个简单的公式单元格F4减去从第三四分位第1个四分位数:

=F3-F2

Now, we can see our interquartile range displayed.

现在,我们可以看到显示了四分位间距。

第三步:返回上下限 (Step Three: Return the Lower and Upper Bounds)

The lower and upper bounds are the smallest and largest values of the data range that we want to use. Any values smaller or larger than these bound values are the outliers.

上下限是我们要使用的数据范围的最小和最大值。 任何小于或大于这些边界值的值都是离群值。

We’ll calculate the lower bound limit in cell F5 by multiplying the IQR value by 1.5 and then subtracting it from the Q1 data point:

通过将IQR值乘以1.5,然后从Q1数据点中减去该值,我们将计算单元格F5中的下限:

=F2-(1.5*F4)

Note: The brackets in this formula are not necessary because the multiplication part will calculate before the subtraction part, but they do make the formula easier to read.

注意:此公式中的括号不是必需的,因为乘法部分会在减法部分之前计算,但是它们确实使公式更易于阅读。

To calculate the upper bound in cell F6, we’ll multiply the IQR by 1.5 again, but this time add it to the Q3 data point:

为了计算单元格F6中的上限,我们将IQR再次乘以1.5,但这一次添加到Q3数据点:

=F3+(1.5*F4)

第四步:找出异常值 (Step Four: Identify the Outliers)

Now that we’ve got all our underlying data set up, it’s time to identify our outlying data points—the ones that are lower than the lower bound value or higher than the upper bound value.

现在我们已经设置了所有基础数​​据,是时候确定离群数据点了-那些低于下限值或高于上限值的数据点。

We’ll use the OR function to perform this logical test and show the values that meet these criteria by entering the following formula into cell C2:

我们将使用OR函数执行此逻辑测试,并通过在单元格C2中输入以下公式来显示满足这些条件的值:

=OR(B2<$F$5,B2>$F$6)

We’ll then copy that value into our C3-C14 cells. A TRUE value indicates an outlier, and as you can see, we’ve got two in our data.

然后,我们将该值复制到C3-C14单元中。 TRUE值表示异常值,如您所见,我们的数据中有两个。

计算平均值时忽略异常值 (Ignoring the Outliers when Calculating the Mean Average)

Using the QUARTILE function let us calculate the IQR and work with the most widely used definition of an outlier. However, when calculating the mean average for a range of values and ignoring outliers, there is a quicker and easier function to use. This technique will not identify an outlier as before, but it will allow us to be flexible with what we might consider our outlier portion.

使用QUARTILE函数,我们可以计算IQR并使用最广泛使用的离群值定义。 但是,在计算一系列值的平均平均值而忽略离群值时,可以使用更快,更容易的函数。 这种技术不会像以前那样识别异常值,但是它将使我们能够灵活考虑可能要考虑的异常值部分。

The function we need is called TRIMMEAN, and you can see the syntax for it below:

我们需要的函数称为TRIMMEAN,您可以在下面看到其语法:

=TRIMMEAN(array, percent)

The array is the range of values you want to average. The percent is the percentage of data points to exclude from the top and bottom of the data set (you can enter it as a percentage or a decimal value).

数组是您要平均的值的范围。 百分比是要从数据集的顶部和底部排除的数据点的百分比(可以将其输入为百分比或十进制值)。

We entered the formula below into cell D3 in our example to calculate the average and exclude 20% of outliers.

在本例中,我们将以下公式输入到单元格D3中,以计算平均值并排除20%的异常值。

=TRIMMEAN(B2:B14, 20%)


There you have two different functions for handling outliers. Whether you want to identify them for some reporting needs or exclude them from calculations such as averages, Excel has a function to fit your needs.

那里有两个不同的功能可以处理异常值。 无论您是要为某些报告需求确定它们还是将它们从诸如平均值之类的计算中排除,Excel都可以满足您的需求。

翻译自: https://www.howtogeek.com/400211/how-and-why-to-use-the-outliers-function-in-excel/

离群值 excel

离群值 excel_如何(以及为什么)在Excel中使用离群值函数相关推荐

  1. excel中使用CORREL函数计算两个时间序列数据列之间的滚动相关性(Rolling correlations)、例如,计算两种商品销售额之间的3个月的滚动相关性

    excel中使用CORREL函数计算两个时间序列数据列之间的滚动相关性(Rolling correlations).例如,计算两种商品销售额之间的3个月的滚动相关性 目录

  2. excel中的vlookup函数

    excel中的Vlookup函数多种查询 精确查询 反向查询 模糊查询 近似查询 跨表查询

  3. 减一天 日期函数_一文掌握excel中的日期函数

    在excel中,因为日期的特殊性,大部分关于日期的运算都要用到特有的函数.对于大多数小伙伴们可能没有专门去学习过日期函数都有哪些?如何运用?可以实现什么样的功能?今天小编就为大家整理出来并详细介绍一下 ...

  4. python vlookup 模糊_如何用python写excel中的vlookup函数?

    1.背景 Vlookup 函数,可以算是一个数据专员必须要会使用的基本函数了,确实很好用.但是你可能会注意到,Excel 一旦数据量过大,打开都费劲了,何况打开后,你还要输入公式计算,就更费劲了,此时 ...

  5. excel vlookup用法_Python中也可以写Excel中的“Vlookup”函数?太牛逼了吧!

    Vlookup函数,可以算是一个数据专员必须要会使用的基本函数了,确实很好用.但是你可能会注意到,Excel一旦数据量过大,打开都费劲了,何况打开后,你还要输入公式计算,就更费劲了,此时你有没有想到过 ...

  6. 计算机函数left的用法,excel中的left函数怎么使用呢?

    工作中我没有时会需要,提取单元格中的部分字符,今天来分享下一个从左边提的字符的函数Left,Left函数的作用是用来从左边取字串,下面小编就为大家详细介绍一下,来看看吧! 步骤 1.我打开需要操作的工 ...

  7. python中execute函数_在excel中调用python函数

    效果: 通过excel引用在py文件中写好的load_settle()函数,可以快捷的获取对应的历史结算价. 使用方法: 1.首先安装office,我用的是2016版本. 2.安装python,推荐使 ...

  8. C# CSharp计算标准偏差 重复精度 和Excel中的STDEV函数相同

    /// /// 计算标准偏差 重复精度 /// C# 计算标准偏差相当于Excel中的STDEV函数 /// Excel中的STDEV函数 /// /// /// public static floa ...

  9. 通过EXCEL中的FILTERXML函数实现批量翻译

    通过EXCEL中的FILTERXML函数实现批量翻译 使用FILTERXML函数和在线翻译实现EXCEL批量翻译 FILTERXML语法 WEBSERVE语法 举例说明 使用步骤 1.确定网址,这边使 ...

  10. 计算机二级考试中Excel函数如何应用,计算机二级考试excle常用函数【计算机二级ms office中excel中必考函数有哪些?】...

    计算机二级excel主要函数的用法 AVERAGE 求出所有参数的术平均值. 数据计算 COLUMN 显示所引用单元格的列标号值. 显示位置 CONCATENATE 将多个字符文本或单元格中的数据连接 ...

最新文章

  1. [简单题]Counting Duplicates( Python 实现)
  2. Asp.net 关于错误提示 类型“XXX1”在未被引用的程序集中定义,必须添加对程序集XXX2的引用...
  3. 机器学习入门资源--汇总
  4. stepinto stepout stepover的区别
  5. (56)zabbix Screens视图配置
  6. consul通过web接口的kv存储操作
  7. 利用一维数组输出杨辉三角
  8. Spring Cloud源码分析(二)Ribbon
  9. 菜单 optionmenu
  10. Spring课程 Spring入门篇 总结
  11. skynet源码阅读4--定时器实现
  12. 兄弟们,请求支援,怎么实现互通,全部都互通的
  13. Android通过Alpha实现渐变效果的几个方法
  14. 京东方班单片机和c语言,pic单片机c语言程序设计14.pdf
  15. XML案例——Jsoup网页爬虫 XML配置参数
  16. matlab vav终端控制器编程,基于TRNSYS与VAV控制系统与仿真.pdf
  17. metasploit、msfvenom生成木马入侵电脑及手机
  18. 人脸识别活体检测技术讨论:基于背景人脸相对运动的活体判断方法
  19. linux 磁盘格式化xfs,大磁盘分区格式化XFS文件系统
  20. 哥德巴赫猜想 php,C++_c++验证哥德巴赫猜想,哥德巴赫猜想是世界近代三大 - phpStudy...

热门文章

  1. Jarvis OJ BASIC部分题目writeup
  2. 招生难、管理难!教育如何实现零流失、高增长?教育行业如何玩转“私域流量”?...
  3. ArcGIS 图像合并至新栅格图层(Mosaic To New Raster和Mosaic)
  4. 商务谈判中有哪些谈判技巧?
  5. MATLAB笔记之wordcloud文字云(lib)的基本使用
  6. 速领电商:怎么制作视频短片
  7. Linux、网络、计算机基础知识
  8. 个人安装RHEL7需要做的事情
  9. MySQL 三个排序方法 row_number()、rank()、dense_rank()
  10. 社群公会GangSDK:程序员入行AI领域需要哪些技能?