FLORIDA ENG

ATLANTIC QI

Prueba de normalidad:

Distribución de los datos

Prueba de normalidad

#Ho = La variable sigue una distribución normal #Ha = La variable no sigue una distribución normal #Si el p Valor es < al nivel de significancia se rechaza la hipótesis nula.

## 
##  Lilliefors (Kolmogorov-Smirnov) normality test
## 
## data:  AHTXDIAFLO$AHT
## D = 0.15949, p-value = 3.316e-16
## Warning in data(AHTXDIAFLO, package = "gapminder"): data set 'AHTXDIAFLO' not
## found
## Warning: Ignoring unknown aesthetics: frame, ids
## # A tibble: 8 × 8
##   dia       MeanAht    Sd     N    se LimInf LimSup    Cov
##   <fct>       <dbl> <dbl> <int> <dbl>  <dbl>  <dbl>  <dbl>
## 1 lunes        429.  19.8    30  3.62   425.   432. 0.0462
## 2 martes       429.  17.8    34  3.05   425.   432. 0.0416
## 3 miércoles    425.  18.3    34  3.14   422.   428. 0.0430
## 4 jueves       424.  15.1    34  2.59   421.   426. 0.0357
## 5 viernes      423.  22.2    34  3.81   420.   427. 0.0524
## 6 sábado       401.  37.2    34  6.39   395.   408. 0.0928
## 7 domingo      328.  36.2    34  6.20   322.   334. 0.110 
## 8 festivo      397.  54.3     5 24.3    373.   421. 0.137
## Warning: Ignoring unknown aesthetics: desv, CoefVar

Teorema del límite central:

#Que una distribución sea normal es importante porque esto nos permite hacer inferencia sobre la media poblacional por medio de la media muestral.

#con la distribución normal se pueden realizar contrastes de hipótesis y construcción de intervalos de confianza.

prueba de normalidad

## 
##  Shapiro-Wilk normality test
## 
## data:  Lunes$AHT
## W = 0.89209, p-value = 0.00541

## 
##  Shapiro-Wilk normality test
## 
## data:  Martes$AHT
## W = 0.98252, p-value = 0.8481

## 
##  Shapiro-Wilk normality test
## 
## data:  Miercoles$AHT
## W = 0.97799, p-value = 0.7084

## 
##  Shapiro-Wilk normality test
## 
## data:  Jueves$AHT
## W = 0.97258, p-value = 0.5362

## 
##  Shapiro-Wilk normality test
## 
## data:  Viernes$AHT
## W = 0.97125, p-value = 0.4968

## 
##  Shapiro-Wilk normality test
## 
## data:  Sabado$AHT
## W = 0.97156, p-value = 0.5058

## 
##  Shapiro-Wilk normality test
## 
## data:  Domingo$AHT
## W = 0.96828, p-value = 0.4156

#Para las muestras de martes a domingo, podemos decir que se acepta la hipótesis nula, donde la distribución de las muestras es normal con un nivel de significancia del 95%

Hipótesis para la diferencia de medias, entre martes y miércoles

## 
## 
## Inferential Procedures for the Difference of Two Means mu1-mu2:
##  Results from summary data.
## 
## 
## Descriptive Results:
## 
## group   mean      sd        n          
## Group 1 428.512   17.809    34         
## Group 2 424.988   18.282    34         
## 
## 
## Inferential Results:
## 
## Estimate of mu1-mu2:  3.524 
## SE(x1.bar - x2.bar):  4.377 
## 
## 95% Confidence Interval for mu1-mu2:
## 
##           lower.bound         upper.bound          
##           -5.215082           12.263255            
## 
## Test of Significance:
## 
##  H_0:  mu1-mu2 = 0 
##  H_a:  mu1-mu2 != 0 
## 
##  Test Statistic:     t = 0.8051 
##  Degrees of Freedom:   66 
##  P-value:        P = 0.4236

#con un 95% de nivel de confianza podemos decir que no hay mucha diferencia de medias entre martes y miércoles siendo dos días con una participación significativa en el tráfico.

Intervalo de confianza e hipótesis

Ho = 425 Ha =! 425

Sí el p valor < nivel de significancia (0.05) se acepta la hipótesis nula.

## 
##  One Sample t-test
## 
## data:  Martes$AHT
## t = 1.15, df = 33, p-value = 0.2584
## alternative hypothesis: true mean is not equal to 425
## 95 percent confidence interval:
##  422.2984 434.7263
## sample estimates:
## mean of x 
##  428.5124

#Se estima que la media poblacional esta entre 422 y 434 segundos con un nivel de confianza del 95%.

## 
##  One Sample t-test
## 
## data:  Miercoles$AHT
## t = -0.0037421, df = 33, p-value = 0.997
## alternative hypothesis: true mean is not equal to 425
## 95 percent confidence interval:
##  418.6093 431.3672
## sample estimates:
## mean of x 
##  424.9883
## 
##  One Sample t-test
## 
## data:  Jueves$AHT
## t = -0.55924, df = 33, p-value = 0.5798
## alternative hypothesis: true mean is not equal to 425
## 95 percent confidence interval:
##  418.2806 428.8219
## sample estimates:
## mean of x 
##  423.5512
## 
##  One Sample t-test
## 
## data:  Viernes$AHT
## t = -0.42877, df = 33, p-value = 0.6709
## alternative hypothesis: true mean is not equal to 425
## 95 percent confidence interval:
##  415.6251 431.1112
## sample estimates:
## mean of x 
##  423.3682