Commit 5625c301 authored by Holger Brandl's avatar Holger Brandl

updated docs

parent b70ba816
# rnblight
Update markdown result chunks in markdown documents
cd /Users/brandl/Dropbox/projects/datautils/R/rnblight
#cp /Users/brandl/Dropbox/documents/datascience/ rerender/
#cp -r /Users/brandl/Dropbox/documents/datascience/.chi2_images rerender/
#git init
#git add
#git commit -m "initial commit"
mdBase=$(basename $mdInput .md)
mv $mdInput ${mdBase}.Rmd
Rscript - <<EOF
knitr::knit('${mdBase}.Rmd', '${mdBase}.md')
idea .
\ No newline at end of file
Frequency tests
* Example: Prop of dieting woman higher than for men?
Proportion Tests
prop.test(x=333, n=1022, conf.level=0.98)
prop.test(x=333, n=1022)
The sample size is 34, of which 19 are females and 15 are males. Therefore, the difference in proportions is 0.1176471.
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 intro with t-statistc
Confidence around proportions
> 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
prop.test(x=333, n=1022, conf.level=0.98)
prop.test(x=333, n=1022)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment