Sei sulla pagina 1di 6

## FACULTAD DE EDUCACIN Y CIENCIAS

DEPARTAMENTO DE MATEMTICAS Y FSICA
LICENCIATURA EN MATEMTICAS
Mg. MELVA BERTEL MORISON
LAURIS DE LOS REYES FLREZ/CDIGO: 1021-1102865111
ALEXANDER SOLAR RIVERO/CDIGO: 1021- 1102866434
ANDREW ALMARIO CORTS/CDIGO: 1021-1005573701

>
> #suscripcin al periodico () barplot(table(suscp),main=c("Susc
> suscp<- ripcin al
c("S","N","N","N","S","S","N","N" periodico"),col=c("orange","yello
,"S","N","N","N","S","N","N","N", w"))
"S");suscp
[1] "S" "N" "N" "N" "S" "S" "N"
"N" "S" "N" "N" "N" "S" "N" "N"
"N" "S"
> sort(suscp)
[1] "N" "N" "N" "N" "N" "N" "N"
"N" "N" "N" "N" "S" "S" "S" "S"
"S" "S"
> t.suscp<-table(suscp);t.suscp
suscp
N S
11 6
>
pie(c(6,11),c("Si","No"),main=c("
Suscripcin al
periodico"),col=c("yellow","orang
e")) > #Numero de personas por familia
> npf<-
c(2,3,3,5,4,7,2,4,2,5,3,6,4,4,2,5
,3);npf
[1] 2 3 3 5 4 7 2 4 2 5 3 6 4 4
2 5 3
> sort(npf) [1] 64
[1] 2 2 2 2 3 3 3 3 4 4 4 4 5 5 > prod(npf)
5 6 7 [1] 1741824000
> t.npf<-table(npf);t.npf > max(npf)
npf [1] 7
2 3 4 5 6 7 > min(npf)
4 4 4 3 1 1 [1] 2
> > range(npf)
boxplot(npf,horizontal=TRUE,col=" [1] 2 7
violet") > length(npf)
[1] 17
> mean(npf)
[1] 3.764706
> median(npf)
[1] 4
> var(npf)
[1] 2.191176
> sd(npf)
[1] 1.480262
> sd(npf)/mean(npf)
[1] 0.3931947
> IQR(npf)
[1] 2
> g<-((sum(npf-mean(npf))^3)/
(length(npf)-1))/(sd(npf)^3);g
[1] 1.350096e-47
> pie(table(npf),main=c("Nmero > k<-((sum(npf-mean(npf))^4)/
de personas por (length(npf)-1))/(sd(npf)^4);k
familia"),col=rainbow(5)) [1] 8.100768e-63
> #Ingreso
> stem(npf) > Ingreso<-
c(26.2,18.4,19.3,14.5,26.2,30.1,2
4.2,26.2,22.1,20.6,24.2,20.3,18.6
,15.2,17.9,19.4,28.2);Ingreso
[1] 26.2 18.4 19.3 14.5 26.2
30.1 24.2 26.2 22.1 20.6 24.2
20.3 18.6 15.2 17.9
[16] 19.4 28.2
> sort(Ingreso)
[1] 14.5 15.2 17.9 18.4 18.6
19.3 19.4 20.3 20.6 22.1 24.2
24.2 26.2 26.2 26.2
[16] 28.2 30.1
> t.Ingreso<-
table(Ingreso);t.Ingreso
Ingreso
14.5 15.2 17.9 18.4 18.6 19.3
19.4 20.3 20.6 22.1 24.2 26.2
28.2 30.1
The decimal point is at the | 1 1 1 1 1 1
1 1 1 1 2 3 1
2 | 00000000 1
4 | 0000000
6 | 00

> sum(npf)
>boxplot(Ingreso,col=c("cyan"),ma > min(Ingreso)
in=c("Ingreso"),horizontal=TRUE) [1] 14.5
> range(Ingreso)
[1] 14.5 30.1
> length(Ingreso)
[1] 17
> mean(Ingreso)
[1] 21.85882
> median(Ingreso)
[1] 20.6
> var(Ingreso)
[1] 20.56507
> sd(Ingreso)
[1] 4.534873
> sd(Ingreso)/mean(Ingreso)
[1] 0.2074619
> IQR(Ingreso)
[1] 7.6
> g<-((sum(Ingreso-
mean(Ingreso))^3)/
> (length(Ingreso)-1))/
pie(table(Ingreso),main=c("Ingres (sd(Ingreso)^3);g
o"),col=rainbow(10)) [1] -8.113888e-46
> #Activar paquete agricolae
> library(agricolae)
> #tabla de frecuencias
> classes<-
sturges.freq(Ingreso);classes;
\$maximum
[1] 30.1

\$minimum
[1] 14.5

\$amplitude
[1] 17

\$classes
[1] 5

## > stem(Ingreso) \$interval

[1] 3.4
The decimal point is 1 digit(s)
to the right of the | \$breaks
[1] 14.0 17.4 20.8 24.2 27.6 31.0
1 | > #Poligono de frecuencias
1 | 5588999 > h1<-
2 | 01244 hist(Ingreso,border=FALSE,xlim=c(
2 | 6668 40,56))
3 | 0 >
polygon.freq(h1,frequency=1,col="
> sum(Ingreso) green")
[1] 371.6 > par(mfrow=c(1,2),cex=0.8)
> prod(Ingreso) > h1<-
[1] 4.176959e+22 graph.freq(Ingreso,col="orange",f
> max(Ingreso) requency=1,las=2,xlab="h1")
[1] 30.1
> h2<- graph.freq (Ingreso, > Costo<-
frequency =2, axes= c(8.2,9.6,10.1,7.6,12.2,11.3,10.4
FALSE,las=2,xlab="h2") ,12.3,10.2,10.2,11.3,8.4,7.6,7.8,
> polygon.freq(h2, col="blue", 7.9,8.3,11.4);Costo
lwd=2, frequency =2) [1] 8.2 9.6 10.1 7.6 12.2
> TIC<- h2\$breaks[2]- 11.3 10.4 12.3 10.2 10.2 11.3
h2\$breaks[1] 8.4 7.6 7.8 7.9
> axis(1,c(h2\$mids[1]-TIC, [16] 8.3 11.4
h2\$mids, > sort(Costo)
h2\$mids[6]+TIC ),cex=0.6) [1] 7.6 7.6 7.8 7.9 8.2
8.3 8.4 9.6 10.1 10.2 10.2 10.4
11.3 11.3 11.4
[16] 12.2 12.3
> t.Costo<-table(Costo);t.Costo
Costo
7.6 7.8 7.9 8.2 8.3 8.4
9.6 10.1 10.2 10.4 11.3 11.4 12.2
12.3
2 1 1 1 1 1
1 1 2 1 2 1 1
1
>
boxplot(Costo,col=c("pink"),main=
c("Costo"),horizontal=TRUE)

#Ojiva
h<-graph.freq(Ingreso,plot=F)
points<-
ojiva.freq(h,type="l",col="red",f
rame=FALSE,
xlab="Limit of class",
ylab="Accumulated relative
frequency", main="ojiva")
grid(col="black")

pie(table(Costo),main=c("Costo"),
col=rainbow(9))

> #Costo
> k<-((sum(Costo-mean(Costo))^4)/
(length(Costo)-1))/
(sd(Costo)^4);k
[1] 1.485764e-58
barplot(table(Costo),main=c("Cost
o"),col=rainbow(14))

> stem(Costo)

## The decimal point is at the |

7 | 6689
8 | 234
9 | 6
10 | 1224
> #Activar paquete agricolae
11 | 334
> library(agricolae)
12 | 23
> #tabla de frecuencias
> classes<-
> sum(Costo)
sturges.freq(Costo);classes;
[1] 164.8
\$maximum
> prod(Costo)
[1] 12.3
[1] 4.663082e+16
> max(Costo)
\$minimum
[1] 12.3
[1] 7.6
> min(Costo)
[1] 7.6
\$amplitude
> range(Costo)
[1] 6
[1] 7.6 12.3
> length(Costo)
\$classes
[1] 17
[1] 5
> mean(Costo)
[1] 9.694118
\$interval
> median(Costo)
[1] 1.2
[1] 10.1
> var(Costo)
\$breaks
[1] 2.734338
[1] 7.0 8.2 9.4 10.6 11.8 13.0
> sd(Costo)
> breaks<-classes\$breaks;breaks
[1] 1.653583
[1] 7.0 8.2 9.4 10.6 11.8 13.0
> sd(Costo)/mean(Costo)
> h2<-hist(Costo,breaks
[1] 0.170576
=classes\$breaks,plot=FALSE)
> IQR(Costo)
> table.freq(h2)
[1] 3.1
Lower Upper Main freq relative
> g<-((sum(Costo-mean(Costo))^3)/
CF RCF
(length(Costo)-1))/
7.0 8.2 7.6 5 0.2941176
(sd(Costo)^3);g
5 0.2941176
[1] 2.127808e-44
8.2 9.4 8.8 2 0.1176471
7 0.4117647
9.4 10.6 10.0 5 0.2941176
12 0.7058824
10.6 11.8 11.2 3 0.1764706
15 0.8823529
11.8 13.0 12.4 2 0.1176471
17 1.0000000
> #Poligono de frecuencias
> windows()
> h1<-
hist(Ingreso,border=FALSE,xlim=c(
40,56))
>
polygon.freq(h1,frequency=1,col="
violet")
> par(mfrow=c(1,2),cex=0.8)
> h1<-
graph.freq(Costo,col="orange",fre
quency=1,las=2,xlab="h1") #Ojiva
> h2<- graph.freq (Costo, windows()
frequency =2, axes= h<-graph.freq(costo,plot=F)
FALSE,las=2,xlab="h2") points<-
> polygon.freq(h2, col="green", ojiva.freq(h,type="l",col="red",f
lwd=2, frequency =2) rame=FALSE,
> TIC<- h2\$breaks[2]- xlab="Limit of class",
h2\$breaks[1] ylab="Accumulated relative
> axis(1,c(h2\$mids[1]-TIC, frequency", main="ojiva")
h2\$mids, grid(col="black")
h2\$mids[6]+TIC ),cex=0.6)