Onderzoekshypothese = H1
Testtype Toetsgrootheid Kritieke waarde berekening Verwerp H0 Verwerp H0 Tweezijdig verwerp H0
links rechts
Chi-kwadraat chi2 chi2_obs <- sum((observed - Y_crit = qchisq(1-α, df) Y_obs > Y_crit
expected)^2 / expected)
T-toets t_crit = qt(α, df) t_obs < t_crit t_obs > t_crit t_obs < t_critL of
t_obs <- (avg - mu0) / (std / sqrt(nobs)) t_obs > t_critR
Z-toets Z.obs <- (p^ - p0) / sqrt(p0 * (1 - p0) / z_crit = qnorm(α) z_obs < z_crit z_obs > z_crit z_obs < z_critL of
nobs)
z_obs > z_critR
Testen op gelijkheid Fvar<-function(S1,S2,H0){ F_critL = qf(alpha / 2, df1, df2)
#Als je gelijkheid van varianties wilt
van varianties toetsen, vul voor H0 de waarde 1 in. F_critR = qf( 1- alpha / 2, df1,
Fvar<-S1^2/(S2^2*H0) df2) Fobs outside the region of FcritL and FcritR
return(Fvar)
}
Pearson’s statistische χ²_crit = qchisq(1-α, df) Y_obs < Y_crit Y_obs > Y_crit
test Pearson_test <- function(O, E) {
return(sum((O - E)^2 / E))
}
Hypothese testen t.sigL <- 1-pt(t.obs, nobs-1) Z < Za/2 Z > Za/2 Z < Za/2
over populatie T.obs <- (avg-mu0)/(std/sqrt(nobs)) t.sigR <- pt(T.obs, nobs-1) T.obs < t.crit T.obs > t.crit Or Z > Za/2
T.obs < -t.crit or T.obs >
gemiddelde t.crit
Hypothese over Z.sigL <- 1 - pnorm(Zobs) z_obs < z_crit z_obs > z_crit z_obs < -Zcrit of
populatie proportie Z.obs <- (p^-p0)/sqrt(p0*(1-p0)/nobs) Z.sigR <- pnorm(Zobs) z_obs > Zcrit
Pearson Correlatie tcor<-function(r,n){ t_critL = qt(alpha, df = nobs - 2) t_obs < t_crit t_obs > t_crit t.obs > t.critR of
r1<-r/(sqrt((1-r^2)/(n-2)))
Coëfficiënt (t-waarde) return(r1) t_critR = qt(1-alpha, df = nobs - t.obs < t.critL?
} 2)
Fisher’s Transformed z_obs <- function(r_obs, nobs, rho = 0){ z_critL = qnorm(alpha) z_obs < z_crit z_obs > z_crit z.Obs < z.CritL of
return(sqrt(nobs - 3) * (0.5 * log((1 +
Correlation r_obs) / (1 - r_obs)) - 0.5 * log((1 + z_critR = qnorm(1-alpha) z.obs > z.CritR?
Coefficient (z-waarde) rho) / (1 - rho))))
}
Hypothesen testen Fvar<-function(S1,S2,H0){ F_crit = qf(1-alpha, df1, df2) F_obs < F_crit F_obs > F_crit F_obs Buiten