diff --git a/tools/rnblight/Foo.kt b/tools/rnblight/Foo.kt new file mode 100644 index 0000000000000000000000000000000000000000..06798a1e4dd0eb67b2c62f844e3fc7bcb5925e6c --- /dev/null +++ b/tools/rnblight/Foo.kt @@ -0,0 +1,5 @@ +/** + * @author Holger Brandl + */ + +class Foo \ No newline at end of file diff --git a/tools/rnblight/example.Rmd b/tools/rnblight/example.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..49d2fd29e0517445d42d72d5a50b54761b22280e --- /dev/null +++ b/tools/rnblight/example.Rmd @@ -0,0 +1,58 @@ +Frequency tests +================ + +* Example: Prop of dieting woman higher than for men? + +![](.example_images/fisher_example.png) + +``` +?fisher.test +``` + + +Proportion Tests +================ + +```{r} +prop.test(x=333, n=1022, conf.level=0.98) + +prop.test(x=333, n=1022) +``` + +From +http://stats.stackexchange.com/questions/60073/confidence-interval-for-difference-between-proportions + +The sample size is 34, of which 19 are females and 15 are males. Therefore, the difference in proportions is 0.1176471. + +```{r} +19/34 - 15/34 +prop.test(x=c(19,15), n=c(34,34), correct=FALSE) + +## also works for single proportion +#prop.test(x=c(19), n=c(34), correct=FALSE) +#prop.test(x=c(19,15,20), n=c(34,34,34), correct=FALSE) + +``` +Also see + +Nice math introhttps://onlinecourses.science.psu.edu/statprogram/node/164 with t-statistc + + + +Confidence around proportions +----------------------------- + +Formula: + > If the samples size n and population proportion p satisfy the condition that np ≥ 5 and n(1 − p) ≥ 5, than the end points of the interval estimate at (1 − α) confidence level is defined in terms of the sample proportion as follows. + ![](.example_images/prop_ci.png) + +CI math is detailed out under http://www.statisticslectures.com/topics/ciproportions/ + +```{r} +prop.test(x=333, n=1022, conf.level=0.98) +plot(1:10) +plot(1:10) +prop.test(x=333, n=1022) +plot(1:10) +``` + diff --git a/tools/rnblight/example_filt.md b/tools/rnblight/example_filt.md new file mode 100644 index 0000000000000000000000000000000000000000..de5210d5600c4cbde41c8c6e97de7286e94d5eb2 --- /dev/null +++ b/tools/rnblight/example_filt.md @@ -0,0 +1,81 @@ +Frequency tests +================ + +* Example: Prop of dieting woman higher than for men? + +![](.example_images/fisher_example.png) + +``` +?fisher.test +``` + + +Proportion Tests +================ + + +```r +prop.test(x=333, n=1022, conf.level=0.98) +``` + + +```r +prop.test(x=333, n=1022) +``` + + +From +http://stats.stackexchange.com/questions/60073/confidence-interval-for-difference-between-proportions + +The sample size is 34, of which 19 are females and 15 are males. Therefore, the difference in proportions is 0.1176471. + + +```r +19/34 - 15/34 +``` + + +```r +prop.test(x=c(19,15), n=c(34,34), correct=FALSE) +``` + + +```r +## also works for single proportion +#prop.test(x=c(19), n=c(34), correct=FALSE) +#prop.test(x=c(19,15,20), n=c(34,34,34), correct=FALSE) +``` +Also see + +Nice math introhttps://onlinecourses.science.psu.edu/statprogram/node/164 with t-statistc + + + +Confidence around proportions +----------------------------- + +Formula: + > If the samples size n and population proportion p satisfy the condition that np ≥ 5 and n(1 − p) ≥ 5, than the end points of the interval estimate at (1 − α) confidence level is defined in terms of the sample proportion as follows. + +CI math is detailed out under http://www.statisticslectures.com/topics/ciproportions/ + + +```r +prop.test(x=333, n=1022, conf.level=0.98) +``` + + +```r +plot(1:10) +plot(1:10) +``` + + +```r +prop.test(x=333, n=1022) +``` + + +```r +plot(1:10) +``` diff --git a/tools/rnblight/figure/unnamed-chunk-3-1.png b/tools/rnblight/figure/unnamed-chunk-3-1.png new file mode 100644 index 0000000000000000000000000000000000000000..327310c78af0f29ddd8f92f76668c78edfd53ee0 Binary files /dev/null and b/tools/rnblight/figure/unnamed-chunk-3-1.png differ