Professional Documents
Culture Documents
Ejercicios Estadistica
Ejercicios Estadistica
choose(),sep = ";")
table(datos$Type)
barplot(table(datos$Type),ylab="Frecuencia")
#Moda
table(datos$Page.total)
tapply(datos$Total.Interactions,datos$Paid,"mean")
tapply(datos$Total.Interactions,datos$Paid,"median")
tapply(datos$Total.Interactions,datos$Paid,"sd")
RIC= function(x){diff(quantile(x,prob=c(0.25,0.75),type=2))}
tapply(datos$Total.Interactions,datos$Paid,"RIC")
c = ceiling(diff(range(datos$Total.Interactions)/10))
b=seq(min(datos$Total.Interactions),max(datos$Total.Interactions)+c,by = c)
helect=hist(datos$Total.Interactions,breaks=b)
n_j = helect$counts
f_j = (n_j)/length(datos$Total.Interactions)
F_j = cumsum(f_j)
p_j = f_j*100
P_j = cumsum(p_j)
htable = cbind(helect$breaks[-1],helect$mids,helect$counts,f_j,F_j,p_j,P_j)
htable
#Polgono y ojiva
install.packages ("agricolae")
library(agricolae)
Total.Interactions = datos$Total.Interactions
polygon.freq(hist(Total.Interactions))
bb=helect$breaks
P = c(0,P_j)
plot(bb,P,xlab="Total.Interactions",ylab="Porcentaje acumulado")
lines(bb,P,col="red")
#Coeficiente de Asimetria
A = 3*(mean(datos$Lifetime.Post.Consumptions)-
median(datos$Lifetime.Post.Consumptions))/sd(datos$Lifetime.Post.Consumpti
ons)
boxplot(datos$Lifetime.Post.Consumptions~datos$Category)
boxplot(datos$Lifetime.Post.Consumptions~datos$Type)
boxplot(Total.Interactions~datos$Category)
boxplot(Total.Interactions~datos$Type)
#ConclusionesJ
by(Total.Interactions,datos$Category,FUN=mean)
by(Total.Interactions,datos$Category,FUN=sd)
by(Total.Interactions,datos$Type,FUN=mean)
by(Total.Interactions,datos$Type,FUN=sd)
by(datos$Lifetime.Post.Consumptions,datos$Category,FUN=mean)
by(datos$Lifetime.Post.Consumptions,datos$Category,FUN=sd)
by(datos$Lifetime.Post.Consumptions,datos$Type,FUN=mean)
by(datos$Lifetime.Post.Consumptions,datos$Type,FUN=sd)