Está en la página 1de 4

PREGUNTA 9.

EXAMEN CONCEPTOS BÁSICOS Y ANOVA


ALEXIS GUSTAVO ALATORRE ALBA

12 septiembre, 2019

Table of Contents
EXPLORAR LA BASE DE DATOS Y LAS VARIABLES BAJO INVESTIGACIÓN ........................ 1
GENERAR LA TABLA ANOVA ................................................................................................................. 3
INTERPRETAR ESTADÍSTICAMENTE Y REDACTAR LA RESPUESTA EN LENGUAJE
HUMANO, RESPALDANDO TUS CONCLUSIONES CON LOS NÚMEROS RELEVANTES
DEL MODELO ................................................................................................................................................ 3
DE SER NECESARIO APLICAR E INTERPRETAR PRUEBAS POST HOC .................................. 3

setwd("C:/Users/alato/Desktop")
load("frecuencias.RData")
p<-frecuencias

EXPLORAR LA BASE DE DATOS Y LAS VARIABLES BAJO


INVESTIGACIÓN
head(p)

continente pais poblacion una.vez satisfecha pib pib.capita


1 Oceanía Australia 20.70 60 42 724.36 34.993237
2 Europa Austria 8.28 70 43 323.54 39.074879
3 America Brazil 189.32 82 42 1072.12 5.663004
4 America Canada 32.65 59 48 1274.96 39.049311
5 Asia China 1311.02 78 42 2657.88 2.027337
6 Europa France 61.35 70 25 2267.54 36.960717

str(p)

'data.frame': 26 obs. of 7 variables:


$ continente: Factor w/ 5 levels "Africa","America",..: 5 4 2 2 3 4 4 4
4 3 ...
$ pais : Factor w/ 26 levels "Australia","Austria",..: 1 2 3 4 5 6
7 8 9 10 ...
$ poblacion : num 20.7 8.28 189.32 32.65 1311.02 ...
$ una.vez : int 60 70 82 59 78 70 68 87 63 62 ...
$ satisfecha: int 42 43 42 48 42 25 38 51 50 29 ...
$ pib : num 724 324 1072 1275 2658 ...
$ pib.capita: num 34.99 39.07 5.66 39.05 2.03 ...
summary(p$satisfecha)

Min. 1st Qu. Median Mean 3rd Qu. Max.


15.00 38.00 42.00 43.38 49.75 67.00

hist(p$satisfecha)

boxplot(p$satisfecha~p$continente)
GENERAR LA TABLA ANOVA
model<-aov(satisfecha~continente, data=p)
summary(model)

Df Sum Sq Mean Sq F value Pr(>F)


continente 4 963.9 241 2.253 0.0977 .
Residuals 21 2246.2 107
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

INTERPRETAR ESTADÍSTICAMENTE Y REDACTAR LA RESPUESTA EN


LENGUAJE HUMANO, RESPALDANDO TUS CONCLUSIONES CON
LOS NÚMEROS RELEVANTES DEL MODELO
De acuerdo al valor de F=2.253, se podría decir que sí hay diferencia entre la vida
sexual de las personas entre continentes, sin embargo nos da una P=0.0977, es decir la
propabilidad de ese resultado es 9.77 % que es superior a 5 %. Por lo que no es
concluyente, tendríamos que hacer una pureba post hoc.

DE SER NECESARIO APLICAR E INTERPRETAR PRUEBAS POST HOC


TukeyHSD(aov(satisfecha~continente, data=p))
Tukey multiple comparisons of means
95% family-wise confidence level

Fit: aov(formula = satisfecha ~ continente, data = p)

$continente
diff lwr upr p adj
America-Africa -8.250 -34.932318 18.432318 0.8855534
Asia-Africa -21.375 -45.732513 2.982513 0.1036594
Europa-Africa -15.700 -39.565391 8.165391 0.3187165
Oceanía -Africa -16.000 -46.810087 14.810087 0.5452026
Asia-America -13.125 -31.992248 5.742248 0.2683316
Europa-America -7.450 -25.677493 10.777493 0.7415146
Oceanía -America -7.750 -34.432318 18.932318 0.9063318
Europa-Asia 5.675 -8.939508 20.289508 0.7749251
Oceanía -Asia 5.375 -18.982513 29.732513 0.9632932
Oceanía -Europa -0.300 -24.165391 23.565391 0.9999995

plot(TukeyHSD(model))

La gráfica de la prueba Tukey nos indica que no hay una diferencia significativa entre
la vida sexual intercontinental porque todas las barras horizontales cruzan por 0. El
valor de F no es concluyente. No se puede decir que hay diferencia. Haría falta hacer
otras pruebas.

También podría gustarte