Compare the histograms with the density functions


Solve the following problem:

Truncated normal generator is based on the R function

rtnorm=function(n=1,mu=0,Inf,up=Inf){qnorm(runif(n,min=pnorm(lo,mean=mu,sd=sigma),
max=pnorm(up,mean=mu,sd=sigma)),
mean-mu,sd=sigma)}

where mu and sigma are the mean and standard deviation of the normal, lo is the lower truncation point, up is the upper truncation point, and n is the number of random variables desired. For Z ∼ N (0, 1) with truncation (i) -1 3, generate 1000 random variables and compare the histograms with the density functions.

 

 

Request for Solution File

Ask an Expert for Answer!!
Engineering Mathematics: Compare the histograms with the density functions
Reference No:- TGS02044722

Expected delivery within 24 Hours