Statystyka/zajecia13/zadania.R

21 lines
665 B
R
Raw Normal View History

2021-06-14 18:01:34 +02:00
# ZAD1
head(mtcars)
plot(mtcars$mpg, mtcars$wt, xlab = "mpg", ylab = "wt", pch = 16)
shapiro.test(mtcars$mpg)$p.value
qqnorm(mtcars$mpg)
qqline(mtcars$mpg, col = "red")
shapiro.test(mtcars$wt)$p.value
qqnorm(mtcars$wt)
qqline(mtcars$wt, col = "red")
cor.test(mtcars$mpg, mtcars$wt, method = "pearson")$p.value
cor.test(mtcars$mpg, mtcars$wt, method = "pearson")$est
cor.test(mtcars$mpg, mtcars$wt, method = "pearson")$conf.int
cor.test(mtcars$mpg, mtcars$wt, method = "kendall")$p.value
cor.test(mtcars$mpg, mtcars$wt, method = "kendall")$est
cor.test(mtcars$mpg, mtcars$wt, method = "spearman")$p.value
cor.test(mtcars$mpg, mtcars$wt, method = "spearman")$est