Документ взят из кэша поисковой машины. Адрес оригинального документа : http://herba.msu.ru/shipunov/school/biol_240/20160321.r
Дата изменения: Mon Mar 21 21:24:31 2016
Дата индексирования: Sun Apr 10 07:29:01 2016
Кодировка:
options(scipen=100)
salary <- c(21,19, 27,11, 102, 25, 21)
t.test(salary, mu=mean(salary))
wilcox.test(salary, mu=median(salary), conf.int=TRUE)

Normality <- function(x, p=.05)
{
ifelse(shapiro.test(x)$p.value > p,"NORMAL", "NOT NORMAL")
}

Normality(salary)
Normality(rnorm(1000))

sapply(trees, Normality)
sapply(log(trees+1), Normality)

binom.test(x=356, n=476, p=0.7, alternative="two.sided")
prop.test(x=356, n=476, p=0.7, alternative="two.sided")
prop.test(x=136, n=262, p=.5, alt="greater")

ph <- read.table("http://ashipunov.info/data/phaseolus.txt", h=T)
str(ph)
with(ph, EXPER.2 - EXPER.1)
with(ph, CONTROL.2 - CONTROL.1)
sapply(ph, Normality)
with(ph, t.test(EXPER.2 - EXPER.1, CONTROL.2 - CONTROL.1, alt="less"))
with(ph, t.test(EXPER.2 - EXPER.1, CONTROL.2 - CONTROL.1, alt="less"))

rnorm(100)
rnorm(100)+5
t.test(rnorm(100), rnorm(100)+5)
t.test(rnorm(100), rnorm(100))