0

我使用了命令:

boxplot(V15~Class,data=trainData, main="V15 value depending on Class", xlab="Class", ylab="V15")

我想了解矩形中点的百分比是多少?

在此处输入图像描述

我的意思是:如果我在主矩形内取所有样本,它将占样本总数的百分比是多少?

我找到了文档,但无法弄清楚这个答案。

4

1 回答 1

2

您所指的 boxplot的帮助文本建议您“另请参阅进行计算的 boxplot.stats ”。从“详细信息”部分:

The two ‘hinges’ are versions of the first and third quartile, i.e., close to quantile(x, c(1,3)/4).
The hinges equal the quartiles for odd n (where n <- length(x)) and differ for even n.
Whereas the quartiles only equal observations for n %% 4 == 1 (n = 1 mod 4),
the hinges do so additionally for n %% 4 == 2 (n = 2 mod 4), and are in the middle of two observations otherwise. 

所以是的,基本上中间 50% 的值落在盒子内,但计算的细节取决于数据的性质。

于 2013-10-09T11:01:50.487 回答