sampling
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
sampling [2017/03/16 08:24] – hkimscil | sampling [2018/03/13 16:49] – [Sample statistics] hkimscil | ||
---|---|---|---|
Line 42: | Line 42: | ||
==== 종류 ==== | ==== 종류 ==== | ||
- Systematic sampling: | - Systematic sampling: | ||
- | | + | * $ \displaystyle k = \frac {N}{n} $ where n = sample size, N = population size |
+ | | ||
- Multistage cluster sampling: | - Multistage cluster sampling: | ||
- Stratified in multistage cluster sampling: | - Stratified in multistage cluster sampling: | ||
Line 61: | Line 62: | ||
{{IQRandomSample02.jpg}} | {{IQRandomSample02.jpg}} | ||
caption=" | caption=" | ||
- | + | ||
+ | < | ||
+ | |||
+ | var_ <- new.env() | ||
+ | n< | ||
+ | p_mean< | ||
+ | p_sd< | ||
+ | N< | ||
+ | |||
+ | pdf(' | ||
+ | |||
+ | for(i in 1:N) ## do the experiment N times | ||
+ | { | ||
+ | smp< | ||
+ | |||
+ | var_$x_bar< | ||
+ | |||
+ | hist(var_$x_bar, | ||
+ | # Plot a histogram of x_bar values | ||
+ | |||
+ | points(mean(smp), | ||
+ | curve(dnorm(x, | ||
+ | |||
+ | text(2.5, | ||
+ | text(2.5, | ||
+ | |||
+ | curve(dnorm(x, | ||
+ | ## Plot the sample | ||
+ | |||
+ | text(2.5, | ||
+ | text(2.5, | ||
+ | points(smp, | ||
+ | abline(v= mean(smp), | ||
+ | |||
+ | legend(" | ||
+ | lty=c(0, | ||
+ | |||
+ | print(paste(i," | ||
+ | } | ||
+ | dev.off() | ||
+ | </ | ||
+ | {{SE.pdf}} | ||
* Variation See, [[: | * Variation See, [[: |
sampling.txt · Last modified: 2020/12/04 22:37 by hkimscil