Rで学ぶ異常検知入門
Alastair Rushworth
Data Scientist
boxplot(temperature, ylab = "Celsius")

hist(temperature, breaks = 6)

左右対称でベル型ですか?
grubbs.test() 関数を使用します:
grubbs.test(temperature)
Grubbs test for one outlier
data: temp
G = 3.07610, U = 0.41065, p-value = 0.001796
alternative hypothesis: highest value 30 is an outlier
grubbs.test(temperature)
Grubbs test for one outlier
data: temperature
G = 3.07610, U = 0.41065, p-value = 0.001796
alternative hypothesis: highest value 30 is an outlier
p-value
最大値の位置
which.max(weights)
5
最小値の位置
which.min(temperature)
12
Rで学ぶ異常検知入門