###Task1
hair<-read.delim("clipboard")
summary(hair)
plot(hair.length~faculty, data=hair)
plot(hair.length~faculty, data=hair,
     log='y')
plot(hair.length~faculty, data=hair)

t.test(log(hair.length)~faculty, data=hair)

##task2
sar<-read.delim("clipboard")
summary(sar)

plot(sp~area, data=sar)
plot(sp~area, data=sar, log='xy')
lines(
  seq(5, 180964, 1),
  211.4*seq(5, 180964, 1)^0.233
)

lm.sar<-lm(log(sp)~log(area), data=sar)
summary(lm.sar)
plot(lm.sar)

exp(5.353)

###task 3 
football<-read.delim("clipboard")
summary(football)
cor.test(football$league,
         football$aggressiveness,
         method="spear")
library(coin)
?spearman_test
spearman_test(football$league~
         football$aggressiveness,
         distribution=approximate(B=999))
##task 4
pizza<-read.delim("clipboard")
summary(pizza)

wilcox.test(score~cook, data=pizza)

wilcox_test(score~cook, data=pizza,
            distribution=approximate(B=999))
tapply(pizza$score, pizza$cook, mean)

### task 5
tennis<-read.delim("clipboard")
summary(tennis)

wilcox.test(tennis$left, tennis$right, 
            paired=T)
