Professional Documents
Culture Documents
Lucrarea de Laborator nr.2 La Disciplina Analiza Statistica A Datelor
Lucrarea de Laborator nr.2 La Disciplina Analiza Statistica A Datelor
2
la disciplina Analiza statistica a datelor
1.
x=rbinom(100,25,0.6)
par(bg = "yellow")
split.screen(c(2,1))
split.screen(c(1,2), screen = 1)
screen(3)
hist(x,col="gray")
screen(4)
hist(x,breaks=5:25,freq=F, density=6:26,angle=45,col="red")
split.screen(c(1,2), screen = 2)
screen(5)
hist(x,breaks=25,col=1:26,border="green",xlim=c(0,25),
ylim=c(0,30),labels=T)
screen(6)
hist(x,breaks=25,freq=F, col=1:26,border="green",xlim=c(0,25),
ylim=c(0,0.4),labels=T)
close.screen(all = TRUE)
set.seed(0)
par(mfrow=c(1,2))
boxplot(x,range=0,col="green",horiz=F)
set.seed(0)
par(mfrow=c(2,2))
qqnorm(x)
qqline(x)
2.
x=rpois(100,3)
par(bg = "yellow")
split.screen(c(2,1))
split.screen(c(1,2), screen = 1)
screen(3)
hist(x,col="gray")
screen(4)
split.screen(c(1,2), screen = 2)
screen(5)
ylim=c(0,40),labels=T)
screen(6)
ylim=c(0,0.7),labels=T)
close.screen(all = TRUE)
set.seed(0)
par(mfrow=c(1,2))
boxplot(x,width=2,col="blue")
boxplot(x,range=0,col="green",horiz=F)
set.seed(0)
par(mfrow=c(2,2))
qqnorm(x)
qqline(x)
3.
x=runif(100,-20,20)
par(bg = "yellow")
split.screen(c(2,1))
split.screen(c(1,2), screen = 1)
screen(3)
hist(x,col="gray")
screen(4)
split.screen(c(1,2), screen = 2)
screen(5)
ylim=c(0,15),labels=T)
screen(6)
ylim=c(0,0.1),labels=T)
close.screen(all = TRUE)
set.seed(0)
par(mfrow=c(1,2))
boxplot(x,width=2,col="blue")
boxplot(x,range=0,col="green",horiz=F)
set.seed(0)
par(mfrow=c(2,2))
qqnorm(x)
qqline(x)
4.
x=rnorm(100, 2, 3)
par(bg = "yellow")
split.screen(c(2,1))
split.screen(c(1,2), screen = 1)
screen(3)
hist(x,col="gray")
screen(4)
split.screen(c(1,2), screen = 2)
screen(5)
ylim=c(0,15),labels=T)
screen(6)
ylim=c(0,0.2),labels=T)
close.screen(all = TRUE)
set.seed(0)
par(mfrow=c(1,2))
boxplot(x,width=2,col="blue")
boxplot(x,range=0,col="green",horiz=F)
set.seed(0)
par(mfrow=c(2,2))
qqnorm(x)
qqline(x)
Анализ с qqplot
set.seed(0)
x1=rbinom(100,25,0.6)
x2=rpois(100,3)
x3=runif(100,-20,20)
x4=rnorm(100,2,3)
par(mfrow=c(3,3))
qqplot(x1,x2)
qqplot(x1,x3)
qqplot(x1,x4)
qqplot(x2,x3)
qqplot(x2,x4)
qqplot(x3,x4)