You are on page 1of 3

TALLER3 G1

De La Hoz-M

2023-10-03
library(readxl)
Porter <-
read_excel("C:/Users/Javier_de_la_Hoz/Desktop/DATOS_TALLER3.xlsx")

library(readxl)
Stout <-
read_excel("C:/Users/Javier_de_la_Hoz/Desktop/DATOS_TALLER3.xlsx",
sheet = "Stout")

Alcohol
shapiro.test(Stout$Grado_Alcoholico)

##
## Shapiro-Wilk normality test
##
## data: Stout$Grado_Alcoholico
## W = 0.96472, p-value = 0.4702

shapiro.test(Porter$Grado_Alcoholico)

##
## Shapiro-Wilk normality test
##
## data: Porter$Grado_Alcoholico
## W = 0.98985, p-value = 0.9935

var.test(Stout$Grado_Alcoholico,Porter$Grado_Alcoholico,ratio = 1,
alternative = "two.sided")

##
## F test to compare two variances
##
## data: Stout$Grado_Alcoholico and Porter$Grado_Alcoholico
## F = 0.20634, num df = 26, denom df = 26, p-value = 0.0001418
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.09403232 0.45276365
## sample estimates:
## ratio of variances
## 0.2063357
t.test(Stout$Grado_Alcoholico,Porter$Grado_Alcoholico, mu = 0,
alternative = "two.sided", var.equal = FALSE)

##
## Welch Two Sample t-test
##
## data: Stout$Grado_Alcoholico and Porter$Grado_Alcoholico
## t = 1.0956, df = 36.291, p-value = 0.2805
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.4706038 1.5771964
## sample estimates:
## mean of x mean of y
## 5.963963 5.410667

Color
shapiro.test(Stout$Color)

##
## Shapiro-Wilk normality test
##
## data: Stout$Color
## W = 0.71369, p-value = 6.047e-06

shapiro.test(Porter$Color)

##
## Shapiro-Wilk normality test
##
## data: Porter$Color
## W = 0.92527, p-value = 0.05295

wilcox.test(Stout$Color,Porter$Color, mu = 0, alternative = "two.sided")

## Warning in wilcox.test.default(Stout$Color, Porter$Color, mu = 0,


alternative =
## "two.sided"): cannot compute exact p-value with ties

##
## Wilcoxon rank sum test with continuity correction
##
## data: Stout$Color and Porter$Color
## W = 560.5, p-value = 0.0006054
## alternative hypothesis: true location shift is not equal to 0

Amargor
shapiro.test(Stout$Amargor)
##
## Shapiro-Wilk normality test
##
## data: Stout$Amargor
## W = 0.95513, p-value = 0.2847

shapiro.test(Porter$Amargor)

##
## Shapiro-Wilk normality test
##
## data: Porter$Amargor
## W = 0.70082, p-value = 3.981e-06

wilcox.test(Stout$Amargor,Porter$Amargor, mu = 0, alternative =
"two.sided")

## Warning in wilcox.test.default(Stout$Amargor, Porter$Amargor, mu = 0,


## alternative = "two.sided"): cannot compute exact p-value with ties

##
## Wilcoxon rank sum test with continuity correction
##
## data: Stout$Amargor and Porter$Amargor
## W = 530, p-value = 0.00431
## alternative hypothesis: true location shift is not equal to 0

You might also like