
R Program
## B.
nsim=10^4
x=rnorm(nsim,0,1)
pr=exp(-(x-2)^2/2-(x-4)^2/2)
mean(pr)
sd(pr)
OUTPUT
value=0.01049353
SD= 0.03898224
SD=
## C.
nsim=10^4
x=runif(nsim,-6,-1)
pr1=5*exp(-x^2/2-(x-2)^2/2-(x-4)^2/2)/sqrt(2*pi)
mean(pr1)
sd(pr1)
OUTPUT
value= 1.016398e-09
SD=5.040679e-09
Exercise 3 For the computation of the expectation Ef[h(x)] when f is the normal pdf and h(x) - ex...
Basic Computation: Confidence Interval for My – M2 Consider two inde- pendent normal distributions. A random sample of size n = 20 from the fire distribution showed x = 12 and a random sample of size n2 = 25 from the second distribution showed X2 = 14. We were unable to transcribe this image(a) Check Requirements If o, and on are known, what distribution does 1 - X, follow? Explain. (b) Given o = 3 and 0 2 = 4,...
A random sample of size n -8 is drawn from uniform pdf f(x,θ)- , 0-XS θ for the purpose of testing Ho : θ-2 against H, : θ < 2 at α : 0.10 level of significance. Suppose the decision rule is to be based on Xmax, the largest order statistic. What would be the probability of committing a Type II error when θ 1.7.
A random sample of size n -8 is drawn from uniform pdf f(x,θ)- , 0-XS...
Solve d,e and f please using R code
Part I: qqplots This part deals with qqplots of all kinds. Let's do some easy expe riments, first. Let's take a sample from a normal distribution with mu-2, sigma 3, and then look at the hist and the qqplot of that data: set.seed(3) n 100 # Sample size x norm(n,2,3) # Sample from N(mu-2, sigma-3) hist(x) # Looks normal. But that depends on breaks. qqnorm(x) # This doesn't depend on binsize, and...
Given X, and x, distributions that are normal or approximately normal with unknown o, and on, the value of t corresponding to X, - X, has a distribution that is approximated by a Student's t distribution. We use the convention that the degrees of freedom is approximately the smaller of n - 1 and n, - 1. However, a more accurate estimate for the appropriate degrees of freedom is given by Satterthwaite's formula: 2 2 xn2 522 +$22) d.f. z...