課題

Animals.csv(Sourceを改変)のデータについて、次の問いに答えてください。

Source: P. J. Rousseeuw and A. M. Leroy (1987) Robust Regression and Outlier Detection. Wiley, p. 57.

1. Bodyの最大値とそれが何の動物か答えてください。

データの読み込みと確認

animals<-read.csv("https://raw.githubusercontent.com/aonoa68/Rdata/main/Animals.csv",header=T,row.names=1)
head(animals)
##                     body brain        order
## Mountain_beaver     1.35   8.1     Rodentia
## Cow               465.00 423.0 Artiodactyla
## Grey_wolf          36.33 119.5    Carnivora
## Goat               27.66 115.0 Artiodactyla
## Guinea_pig          1.04   5.5     Rodentia
## Dipliodocus     11700.00  50.0   Dinosauria
summary(animals)
##       body              brain            order          
##  Min.   :    0.02   Min.   :   0.40   Length:28         
##  1st Qu.:    3.10   1st Qu.:  22.23   Class :character  
##  Median :   53.83   Median : 137.00   Mode  :character  
##  Mean   : 4278.44   Mean   : 574.52                     
##  3rd Qu.:  479.00   3rd Qu.: 420.00                     
##  Max.   :87000.00   Max.   :5712.00

これでanimalsが28行3列のデータで、bodyの最大値は87000.00であることがわかる。

28行しかないので全てのデータを表示する。

animals
##                       body  brain          order
## Mountain_beaver      1.350    8.1       Rodentia
## Cow                465.000  423.0   Artiodactyla
## Grey_wolf           36.330  119.5      Carnivora
## Goat                27.660  115.0   Artiodactyla
## Guinea_pig           1.040    5.5       Rodentia
## Dipliodocus      11700.000   50.0     Dinosauria
## Asian_elephant    2547.000 4603.0    Proboscidea
## Donkey             187.100  419.0 Perissodactyla
## Horse              521.000  655.0 Perissodactyla
## Potar_monkey        10.000  115.0       Primates
## Cat                  3.300   25.6      Carnivora
## Giraffe            529.000  680.0 Perissodactyla
## Gorilla            207.000  406.0       Primates
## Human               62.000 1320.0       Primates
## African_elephant  6654.000 5712.0    Proboscidea
## Triceratops       9400.000   70.0     Dinosauria
## Rhesus_monkey        6.800  179.0       Primates
## Kangaroo            35.000   56.0  Diprotodontia
## Golden_hamster       0.120    1.0       Rodentia
## Mouse                0.023    0.4       Rodentia
## Rabbit               2.500   12.1       Rodentia
## Sheep               55.500  175.0   Artiodactyla
## Jaguar             100.000  157.0      Carnivora
## Chimpanzee          52.160  440.0       Primates
## Rat                  0.280    1.9       Rodentia
## Brachiosaurus    87000.000  154.5     Dinosauria
## Mole                 0.122    3.0   Eulipotyphla
## Pig                192.000  180.0   Artiodactyla

Brachiosaurusがbodyの最大値87000.000を取ることがわかる。

2. BodyとBrainの標準偏差ではどちらが大きいでしょうか?数値を求めた上で答えてください。

sd(animals$body)
## [1] 16480.49
sd(animals$brain)
## [1] 1334.929

Body16480.49, Brain1334.929のため、bodyの方が標準偏差が大きい。 (※ただし、標準偏差の大きさを比べる際は、変動係数を用いて比べること。)