Discrete Distributions
The aim of this lecture is to drawn random population from different discrete distributions. (Error or Omission id Expected). Please provide your comments for the further improvement in the preparation of codes.
###################################################
library(sampling)
library(MASS)
Bernoulli Distribution
rbinom(N, 1, p),
For example
rbinom(10,1, 0.4)
Binomial Distribution
rbinom(N, n, p)
For example
rbinom(10, 4, 0.4)
Poisson Distribution
rpois(N, m)
For example
rpois(10, 3)
Negative Binomial Distribution
rbinom(N, r, p)
For example
rnbinom(10, 3, 0.5)
Hypergeomatric Distribution
rbinom(N, r, b, n)
For example
rhyper(10,3,4,5)
################################################################
For simulation please click on the following links
Simulation of the Ratio and Regression Estimator
Thanks for following
Please provide your suggestions
Comments
Post a Comment