Analizando datos

  1. Definir fuente - Copiar
  2. Importar datos
  3. Explorar datos
  4. Definir Modelo
    • Definir Hipótesis de investigación (Ha)
  5. Definir tipos de variables
  6. Gráfico
  7. Prueba

Definir fuente - Copiar

Bases de datos, para este ejercicio se encuentran en G-Drive

Importar Datos

datos <- read.table("clipboard", h=T,
           stringsAsFactors = TRUE)

Explorar datos

names(datos)
## [1] "growth" "coat"
head(datos); tail(datos)
## # A tibble: 6 x 2
##   growth coat 
##    <dbl> <fct>
## 1    8.3 dark 
## 2    8.7 dark 
## 3    8.1 dark 
## 4    8.5 dark 
## 5    9.1 dark 
## 6    9   dark
## # A tibble: 6 x 2
##   growth coat 
##    <dbl> <fct>
## 1    6.6 light
## 2    7.2 light
## 3    6.9 light
## 4    8.3 light
## 5    7.9 light
## 6    9.2 light
summary(datos)
##      growth         coat  
##  Min.   :6.600   dark :6  
##  1st Qu.:7.725   light:6  
##  Median :8.300            
##  Mean   :8.150            
##  3rd Qu.:8.775            
##  Max.   :9.200

Definir modelo

  • Variable respuesta ?
    • “growth”
  • Variable predictora ?
    • “coat”
datos$growth ~ datos$coat
Ha: 𝛍1 > 𝛍2

Gráfico

plot(datos$growth ~ datos$coat, pch=20)

Prueba estadística

  • Ha: 𝛍1 > 𝛍2
t.test(datos$growth ~ datos$coat, alternative="greater")
## 
##  Welch Two Sample t-test
## 
## data:  datos$growth by datos$coat
## t = 2.1765, df = 6.5768, p-value = 0.03423
## alternative hypothesis: true difference in means is greater than 0
## 95 percent confidence interval:
##  0.112961      Inf
## sample estimates:
##  mean in group dark mean in group light 
##            8.616667            7.683333