当前位置:网站首页>长得很怪的箱图
长得很怪的箱图
2022-07-31 15:20:00 【Nashomon】
翻折的箱图
下面这个箱图(boxplot)有的箱体两端翻转,看起来有点怪,是不是有问题?

用matlab的boxplot函数画的图,Notch参数设为on时中间凹进,用python画结果一样。
% 打开excel文件,读入数据,共7列
Tbl = readtable('data.xlsx');
% table转换为矩阵
Dat = table2array(Tbl);
handle = figure();
boxplot(Dat, "Notch","on");
把Notch设为off,就是常见的箱图了。
数据是这样,那画出的图也就没有问题。看着不太美观,其实更有内涵。这种图的凹进部分的高度不能改变,如果第1、3分位数低于或高于凹进区域的两端,就会出现翻叠。
SAS中的说明
SAS官方网站关于boxplot的文档中,有一个示意图边缘就是翻过来的。

凹进区域两端位置计算如下:
m e d i a n ± 1.58 ( I Q R ) n median\pm \frac{1.58(IQR)}{\sqrt{n}} median±n1.58(IQR)
其中 n n n 是样本(数据)个数。
关于这种情况,有一句说明:The medians (central lines) of the two boxes are significantly different at approximately the 0.05 level if the corresponding notches do not overlap.
边栏推荐
- 名创优品斥资6.95亿购买创始人叶国富所持办公楼股权
- Kubernetes常用命令
- ES6 类
- R语言ggstatsplot包ggbarstats函数可视化条形图、并添加假设检验结果(包含样本数、统计量、效应大小及其置信区间、显著性、组间两两比较、贝叶斯假设)、检验结果报告符合APA标准
- TRACE32——基于SNOOPer的变量记录
- R语言计算时间序列数据的移动平均值(滚动平均值、例如5日均线、10日均线等):使用zoo包中的rollmean函数计算k个周期移动平均值
- TRACE32 - C source code association
- 7、常见面试口语提问问题汇总
- Ubantu project 4: xshell, XFTP connected the virtual machine and set xshell copy and paste the shortcut
- C语言”三子棋“升级版(模式选择+AI下棋)
猜你喜欢
随机推荐
做事软件开发-法的重要性所在以及合理结论的认识
三、数组
思路迪医药冲刺港股:5个月亏2.9亿 泰格医药与先声药业是股东
R language test whether the sample conforms to normality (test whether the sample comes from a normally distributed population): shapiro.test function tests whether the sample conforms to the normal d
SIGABRT 报错时的注意事项和解决方法
ES6 类
vb中如何连接mysql_vb怎么连接数据库「建议收藏」
Vb how to connect mysql_vb how to connect to the database collection "advice"
自适应控制——仿真实验二 用Narendra方案设计模型参考自适应系统
435. 无重叠区间
763.划分字母区间——之打开新世界
公告
TRACE32——常用操作
Ubuntu Topic 5: Setting a Static IP Address
Ubantu专题5:设置静态ip地址
LeetCode二叉树系列——226.翻转二叉树
网银被盗?这篇文章告诉你如何安全使用网银
AVH部署实践 (一) | 在Arm虚拟硬件上部署飞桨模型
Use of radiobutton
Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)









