\[ H_0: X \sim f \]
\[ H_a: X \not\sim f \]
set.seed(123)
z<-runif(50)
max(z)
## [1] 0.9942698
max(z)
## [1] 0.9942698
ks.test(z,"pbeta",max(z),max(z))
##
## Exact one-sample Kolmogorov-Smirnov test
##
## data: z
## D = 0.082205, p-value = 0.8605
## alternative hypothesis: two-sided
\[ H_0: X \sim Beta \]
\[ H_a: X \not\sim Beta \] No se rachza \(H_0\), luego se cumple el supuesto de distribu Beta
#install.packages("lawstat")
library(lawstat)
## Warning: package 'lawstat' was built under R version 4.4.3
symmetry.test(z)
##
## m-out-of-n bootstrap symmetry test by Miao, Gel, and Gastwirth (2006)
##
## data: z
## Test statistic = 0.5055, p-value = 0.758
## alternative hypothesis: the distribution is asymmetric.
## sample estimates:
## bootstrap optimal m
## 44
\[ H_0: f_X(x-\theta)=f_X(\theta-x) \]
\[ H_0: f_X(x-\theta)\neq f_X(\theta-x) \]
wilcox.test(z,mu=1/2)
##
## Wilcoxon signed rank test with continuity correction
##
## data: z
## V = 691, p-value = 0.6089
## alternative hypothesis: true location is not equal to 0.5
\[ H_0: \theta = 0.5 \]
\[ H_a: \theta \neq 0.5 \]