Last active
June 3, 2021 20:59
-
-
Save mhoehle/dc298f7d750a318e0e38c10375c40dd2 to your computer and use it in GitHub Desktop.
Teste den Schnelltester
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #' Statistischer Test, ob Anteil positiver Test bei einem | |
| #' Testanbieter kleiner ist als 1-Spez. | |
| #' | |
| #' Test von H_0: \pi >= 1-spez vs. H_1 \pi < 1-Spez | |
| #' zum \alpha=0.025 Niveau. | |
| ist_auffaellig <- function(pos_test, total_test, spez=0.997) { | |
| t <- binomSamSize::binom.midp(pos_test, total_test, conf.level=0.95) | |
| return( as.logical(t["upper"] < 1-spez)) | |
| } | |
| # Beispiel aus https://zerforschung.org/posts/testzentrum-die-dritte/ | |
| ist_auffaellig(pos_test=190, total_test=80000, spez=0.997) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment