You are on page 1of 1

Lección 3 U 2

Paola Morocho

2022-11-15

Pruebas de bondad

Cos<-c(32,24,35,29)
Cos

## [1] 32 24 35 29

shapiro.test(Cos)

##
## Shapiro-Wilk normality test
##
## data: Cos
## W = 0.98403, p-value = 0.9252

Prueba de bondad de ajuste frecuencias esperadas iguales


Prueba de Ji cuadrado

chisq.test(Cos)

##
## Chi-squared test for given probabilities
##
## data: Cos
## X-squared = 2.2, df = 3, p-value = 0.5319

Frecuencia esperada no es igual

x<-matrix(c(55,60,50,45,32,30,13,15),nrow = 2,ncol = 4)
x

## [,1] [,2] [,3] [,4]


## [1,] 55 50 32 13
## [2,] 60 45 30 15

chisq.test(x)

##
## Pearson’s Chi-squared test
##
## data: x
## X-squared = 0.68792, df = 3, p-value = 0.876

You might also like