Seguem algumas funções que normalmente utilizo nos meus artigos.
O R pode ser obtido de http://cran.r-project.org/.
Ler arquivo
f = read.table(file="C:\\Downloads\\resultado.txt",sep=";",header=TRUE)
separador enter coluna o ";"
separador decimal o "."
Mostrar informações estatísticas
> summary(f)
CPU ON AMAZON
Min. :0.05239 Min. :0.005996 Min. :0.05323
1st Qu.:0.12850 1st Qu.:0.132863 1st Qu.:0.13046
Median :0.14586 Median :0.150601 Median :0.15615
Mean :0.22330 Mean :0.323834 Mean :0.61537
3rd Qu.:0.18229 3rd Qu.:0.186492 3rd Qu.:0.27418
Max. :6.74142 Max. :6.567323 Max. :6.49501
Desvio padrão
> sd(f)
CPU ON AMAZON
0.4042940 0.7079139 1.1460376
Erro padrão médio
> 100*sd(f)/mean(f)
CPU ON AMAZON
181.0572 218.6043 186.2357
Gráficos
> boxplot(f)
> hist(f$CPU)
> hist(f$ON)
> hist(f$AMAZON)
> plot(f$CPU)
> plot(f$ON)
> plot(f$AMAZON)
> matplot(f, type = 'l')
par(mfrow=c(1,3))
par(ps=18)
plot(f$CPU, col=2, xlab="CPU", ylab="Segundos")
plot(f$ON, col=3, xlab="MV Privada", ylab="Segundos")
plot(f$AMAZON, col=4, xlab="MV Pública", ylab="Segundos")
par(mfrow=c(1,3))
par(ps=18)
boxplot(f$CPU, col=2, xlab="CPU", ylab="Segundos")
boxplot(f$ON, col=3, xlab="MV Privada", ylab="Segundos")
boxplot(f$AMAZON, col=4, xlab="MV Pública", ylab="Segundos")
par(mfrow=c(1,3))
par(ps=18)
hist(f$CPU, col=2, xlab="CPU", ylab="Segundos")
hist(f$ON, col=3, xlab="MV Privada", ylab="Segundos")
hist(f$AMAZON, col=4, xlab="MV Pública", ylab="Segundos")
par(mfrow=c(1,3))
par(ps=18)
matplot(f$CPU, type="l", col=2, xlab="CPU", ylab="Segundos")
matplot(f$ON, type="l", col=3, xlab="MV Privada", ylab="Segundos")
matplot(f$AMAZON, type="l", col=4, xlab="MV Pública", ylab="Segundos")
Intervalo de confiança
> t.test(f$CPU)
One Sample t-test
data: f$CPU
t = 38.1655, df = 4774, p-value < 2.2e-16
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
0.2118261 0.2347664
sample estimates:
mean of x
0.2232962
> t.test(f$ON)
One Sample t-test
data: f$ON
t = 31.6103, df = 4774, p-value < 2.2e-16
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
0.3037495 0.3439176
sample estimates:
mean of x
0.3238335
> t.test(f$AMAZON)
One Sample t-test
data: f$AMAZON
t = 37.1043, df = 4774, p-value < 2.2e-16
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
0.5828555 0.6478835
sample estimates:
mean of x
0.6153695
Nenhum comentário:
Postar um comentário