Given W is a uniformly distributed random variable with mean 33 and variance 3. Using R programming, apply the suitable coding to identify answer in (a) and (b)
(a) probability density function for W
(b) cumulative distribution function for W
(a) probability density function for W
we define the function dnorm: which evaluates the normal probability density with a given mean or
standard deviation
The coding is as below
dnorm( x, mean = 33, sd = 31/2, log = FALSE )
(b) cumulative distribution function for W
we define the function pnorm: which evaluates the cumulative distribution function for a normal
distribution.
The coding is as below
pnorm( q, mean = 33, sd = 31/2, lower.tail =TRUE, log.p = FALSE )
Comments
Leave a comment