rcn | R Documentation |
Generate a random sample from a contaminated normal distribution.
rcn(n, eps, sigmac)
rcn_5_5(n)
n |
sample size |
eps |
proportion of proportion of contamination |
sigmac |
standard devation of contaiminated component |
With probability (1-eps) a deviates are drawn from a standard normal distribution. With probability eps deviates are drawn from a normal distribution with mean 0 and standard devation sigmac rcn_5_5 is a special case where eps=0.05 and sigma=5.
n x 1 numeric vector containing the random deviates.
John Kloke, Joseph McKean
Hogg, R. McKean, J, Craig, A (2013) Introduction to Mathematical Statistics, 7th Ed. Boston: Pearson.
rnorm
qqnorm(rcn(100,.25,10))
set.seed(101); rcn(10,0.05,5)
set.seed(101); rcn_5_5(10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.