Punto 1

Punto 2

ncol(Base)#
## [1] 19
nrow(Base)#
## [1] 4406

Punto 3

str(Base)  #
## 'data.frame':    4406 obs. of  19 variables:
##  $ ofp     : int  5 1 13 16 3 17 9 3 1 0 ...
##  $ ofnp    : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ opp     : int  0 2 0 5 0 0 0 0 0 0 ...
##  $ opnp    : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ emr     : int  0 2 3 1 0 0 0 0 0 0 ...
##  $ hosp    : int  1 0 3 1 0 0 0 0 0 0 ...
##  $ numchron: int  2 2 4 2 2 5 0 0 0 0 ...
##  $ adldiff : int  0 0 1 1 1 1 0 0 0 0 ...
##  $ age     : num  6.9 7.4 6.6 7.6 7.9 6.6 7.5 8.7 7.3 7.8 ...
##  $ black   : chr  "yes" "no" "yes" "no" ...
##  $ sex     : chr  "male" "female" "female" "male" ...
##  $ maried  : chr  "yes" "yes" "no" "yes" ...
##  $ school  : int  6 10 10 3 6 7 8 8 8 8 ...
##  $ faminc  : chr  "2.881" "27.478" "0.6532" "0.6588" ...
##  $ employed: chr  "yes" "no" "no" "no" ...
##  $ privins : chr  "yes" "yes" "no" "yes" ...
##  $ medicaid: chr  "no" "no" "yes" "no" ...
##  $ region  : chr  "other" "other" "other" "other" ...
##  $ hlth    : chr  "other" "other" "poor" "poor" ...

El total de variables categoricas es: 9

Punto 4

El total de variables númerica es: 10

Punto 5

attach(Base)
barplot(table(region))

En la gráfica se observa que le valor más alto se ve en la categoría “other” con 1614 registros, seguido por la categoría “midwest” con 1157 registros, finalmente la más baja es “west” con 798 registros.

Punto 6

pie(table(sex))

Según el grafica observamos que la mayoria de registros correponde a mujeres con el 59,6% y el restante corresponde a hombres.

Punto 7

Programas <- c( "CSI", "Friends", "CSI", "CSI", "CSI", "CSI", "CSI", "Raymond", "ER", "ER", "Friends", "CSI", "ER", "Friends", "CSI", "ER", "ER", "Friends", "CSI", "Raymond", "CSI", "Friends", "CSI", "CSI", "Friends", 
"ER", "ER", "ER", "Friends", "Raymond", "CSI", "Friends", "Friends", "CSI", "Raymond", "Friends", "Friends", "Raymond", "Friends", "CSI", "Raymond", "Friends", "ER", "Friends", "CSI", "CSI", "ER", "CSI", "Friends", "ER" )
  1. Los datos son cualitativos

Programa<- table(Programas)
Programa
## Programas
##     CSI      ER Friends Raymond 
##      18      11      15       6
barplot(table(Programas)) #

pie(table(Programas))

El programa con mayor audiencia es CSI con 18 registros y le sigue Friends con 15 registros.

Muchas gracias