Draw a histogram of predictions

Assignment Help Engineering Mathematics
Reference no: EM131281585

Question 1. Let Xi, i = 1, ... ,50 be independent random variables with Xi having exponential distribution with mean (0.9)i.

(a) Calculate the mean and variance of X¯.

(b) Use simulation to estimate p(X¯ > 0.5) with 2 decimals precision.

(c) Does X¯ have approximately normal distribution? Justify your answer by simulating X¯ and drawing a histogram.

2. Let (Xi, Yi), i = 1,...., n be a random sample from a bivariate standard normal distribution with correlation coefficient p. Let S denote the sample covariance matrix and let Al and A2 denote the eigenvalues of S.

For n = 30, 40, 50 and ρ = 0.2, 0.5, 0.8 find the following:
(a) The marginal distribution of the λ1 and λ2.
(b) The means, variances and covariances of the eigenvalues of S
(c) Find the distribution of the max(λ1, λ2).

3. Let Y1.....Yn be a set on independent Poison random variables with the mean

λi = eβo + β1x1i + β2x2i

(a) Based on the following observations, write a function to find the maximum likelihood estimations for β0, β1 and β2.

Y X1 X2 Y X1 X2
0 3 1 0 3 5
2 5 5 0 3 3
2 2 4 0 3 2
1 2 4 2 5 4
2 2 3 0 3 5
0 3 3 2 5 3
1 4 2 1 4 4
3 5 3 1 2 2
3 1 4 1 4 3
0 3 4 3 5 2
0 3 I 0 3 1
2 5 3 2 5 4
1 2 3 0 3 1
0 3 1 2 2 3
2 2 1 0 3 2

(b) Assume that β0 = 0.1, β1 = 0.2 and β2 = 0.3 and matrix X is generated by R code: set . seed (890)

x < - cbind(sample(1:5,30,replace,-.T,c(.05,.2,.35,.25,15))

sample(1:5,30,replace=T.c(.15,.2,.3,.2,15)))

Write a function to generate independent Poison random variables Yi, i = 1,......30, 10000 times and returns a matrix of the maximum likelihood estimators of βi's.

(c) Using the function obtained in (a) find the means and variances of the βi's estimations.

(d) draw the empirical distributions for βi's estimations.

(e) Create a vector of predictions of Y when x1 = 3 and x2 = 5 using the rows of the matrix obtained in (a), then find the mean and the variances of the predictions.

(f) Draw a histogram of predictions.

4. Write a function that takes as input a vector x, then returns as output the vector (m,lb,ub), where m is the mean and (lb, ub) is a 95% confidence interval for it. That is m = x¯ - 1.96s/√n, lb = x¯ + 1.96s/√n, where s is standard deviation of the sample.

Then, write a program that applies your function to the following sample
11, 52. 87, 45, 39. 95, 42, 38, 10, 03, 48, 56.

To four decimal places you should be getting

(43.83333, 27.9526, 59.7140)

5. Here is some code for simulating a random variable. Write down the cdf of the random variable being simulated. Check your answer by plotting an empirical cdf from the simulated data, then plotting the actual cdf on the top.

sim < - function () {
U < - runif(1)

if ( U < 0.5 )

{ return(0)
} else {
return(- log((1 - U)/20))
}

}

Reference no: EM131281585

Questions Cloud

Discuss about current mirrors : The project should be a design problems, a review or summary of literatures. The topic can be related to your own research, or it can be based on published papers in microelectronics circuits.
What is the flaw in the court of appeals reasoning : Explain the court of appeals' reasoning that Section 1985(2) did not provide a remedy for Haddle.- What is the flaw in the court of appeals' reasoning that Section 1985(2) did not provide a remedy for Haddle?
What happened to brown professionally : What happened to Brown professionally and medically after she initiated the internal complaint that company vice president Owen had misused funds?
Estimate the time required to completely melt the frost : The frost may be assumed to have a mass density of 700 kg/m3 and a latent heat of fusion of 334 kJ/kg.
Draw a histogram of predictions : Find the means and variances of the βi's estimations and draw the empirical distributions for βi's estimations.
Is it unreasonably restrictive on mccarthy : Review the wording of the noncompete agreement as to duration and territory. Is it unreasonably restrictive on McCarthy?
Independent contractors to reduce or eliminate costs : Did Nettie's control or have the right to control Ferry at the time of the collision?- Give your opinion on the ethics of businesses converting employees to independent contractors to reduce or eliminate costs.
Banking industry from a global and ethical posture : Analyze the banking industry from a global and ethical posture. Be sure to be specific as to which ethical posture you are taking.
Same amount of real purchasing power : In 1991, the Barenaked Ladies released their hit song "If I had a Million Dollars." How much money would the group need in 2012 to have the same amount of real purchasing power in 2012? Note that the consumer price index in 1991 was 136.2 and in 2..

Reviews

len1281585

11/18/2016 6:37:21 AM

answer the question using R programming. and provide R codes with the solutions.Using the function obtained in (a) find the means and variances of the ßi's estimations - (d) draw the empirical distributions for ßi's estimations.

Write a Review

Engineering Mathematics Questions & Answers

  Prime number theorem

Dirichlet series

  Proof of bolzano-weierstrass to prove the intermediate value

Every convergent sequence contains either an increasing, or a decreasing subsequence.

  Antisymmetric relations

How many relations on A are both symmetric and antisymmetric?

  Distributed random variables

Daily Airlines fies from Amsterdam to London every day. The price of a ticket for this extremely popular flight route is $75. The aircraft has a passenger capacity of 150.

  Prepare a system of equations

How much money will Dave and Jane raise for charity

  Managing ashland multicomm services

This question is asking you to compare the likelihood of your getting 4 or more subscribers in a sample of 50 when the probability of a subscription has risen from 0.02 to 0.06.]  Talk about the comparison of probabilities in your explanation.

  Skew-symmetric matrices

Skew-symmetric matrices

  Type of taxes and rates in spokane wa

Describe the different type of taxes and their rates in Spokane WA.

  Stratified random sample

Suppose that in the four player game, the person who rolls the smallest number pays $5.00 to the person who rolls the largest number. Calculate each player's expected gain after one round.

  Find the probability density function

Find the probability density function.

  Develop a new linear programming for an aggregate production

Linear programming applied to Aggregate Production Planning of Flat Screen Monitor

  Discrete-time model for an economy

Discrete-time model for an economy

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd