is asking for the R code to set up things for 4b. There is no output...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
is asking for the R code to set up things for 4b. There is no output as such for (a). Here is an outline to set up the function. MCsim<-function(nsim, lambda) { cov1<-cov2<-rep(NA,nsim) # create empty matrices to store data for (i in 1:nsim) { x=rpois (...) # The question says Poisson xbar=............... #find mean of x Xsd=..... ..# find sd of x C11<-use the formula for conf interval for mean given in the question C12<-use the formula for conf interval for variance given in the question cov1 [i]<-(C11[1]<lambda) & (lambda<C11[2]) cov2[i]<-Do similarly using C12 } print (paste("When lambda=", lambda, ": coverage for first Cl is", mean(cov1), ", coverage for second Cl is", mean(cov2), ".")) # Just to keep your output presentable } Now use the function from 4(a) with your values of nsim and lambda and get the outputs. Remember the question is asking for 3 values of lambda. For example if you do MCsim(nsim=1000, lambda=0.5), you will get the output for lambda=0.5 and so on. For a random sample of 50 observations from Poisson we have two ways to construct a 90% CI for the parameter 2. distribution, (1) Since the Poisson mean is λ, we can use the interval for the sample mean . (2) Since the Poisson variance is also λ, we can use the interval for the sample variance directly: . (a) Write a R-script to conduct a Monte Carlo study for the coverage probabilities of the two CIs. That is, to generate nsim=1000 such data sets from the Poisson distribution. Check the proportion of the CIs that contains the true parameter 2. (b) Run the Monte Carlo simulation for nsim-1000 runs, at three different parameter values: λ=0.1, λ=1 and λ=10. Report the coverage probabilities of these two CIs at each of the three parameter values. (c) Considering your result in part (b), which one of these two CI formulas should you use in practice? Can you explain the pattern observed in (b)? is asking for the R code to set up things for 4b. There is no output as such for (a). Here is an outline to set up the function. MCsim<-function(nsim, lambda) { cov1<-cov2<-rep(NA,nsim) # create empty matrices to store data for (i in 1:nsim) { x=rpois (...) # The question says Poisson xbar=............... #find mean of x Xsd=..... ..# find sd of x C11<-use the formula for conf interval for mean given in the question C12<-use the formula for conf interval for variance given in the question cov1 [i]<-(C11[1]<lambda) & (lambda<C11[2]) cov2[i]<-Do similarly using C12 } print (paste("When lambda=", lambda, ": coverage for first Cl is", mean(cov1), ", coverage for second Cl is", mean(cov2), ".")) # Just to keep your output presentable } Now use the function from 4(a) with your values of nsim and lambda and get the outputs. Remember the question is asking for 3 values of lambda. For example if you do MCsim(nsim=1000, lambda=0.5), you will get the output for lambda=0.5 and so on. For a random sample of 50 observations from Poisson we have two ways to construct a 90% CI for the parameter 2. distribution, (1) Since the Poisson mean is λ, we can use the interval for the sample mean . (2) Since the Poisson variance is also λ, we can use the interval for the sample variance directly: . (a) Write a R-script to conduct a Monte Carlo study for the coverage probabilities of the two CIs. That is, to generate nsim=1000 such data sets from the Poisson distribution. Check the proportion of the CIs that contains the true parameter 2. (b) Run the Monte Carlo simulation for nsim-1000 runs, at three different parameter values: λ=0.1, λ=1 and λ=10. Report the coverage probabilities of these two CIs at each of the three parameter values. (c) Considering your result in part (b), which one of these two CI formulas should you use in practice? Can you explain the pattern observed in (b)?
Expert Answer:
Related Book For
Statistics for Business and Economics
ISBN: 978-0132930192
8th edition
Authors: Paul Newbold, William Carlson, Betty Thorne
Posted Date:
Students also viewed these accounting questions
-
A random sample of 50 observations on the waiting time (in seconds) of customers before speaking to a representative at a call center is as follows: (a) Construct a histogram and comment on the...
-
A random sample of 50 observations was made on the diameter of spot welds and the corresponding weld shear strength. (a) Given that r = 0.62, test the hypothesis that p = 0, using a = 0.01. What is...
-
A simple random sample of 50 items from a population with 6 resulted in a sample mean of 32. a. Provide a 90% confidence interval for the population mean. b. Provide a 95% confidence interval for...
-
As the traffic manager for ABC Electronics, you have been charged with the task of reducing shipping costs for a fast selling cable product that is sold by the pound. You have a very satisfactory...
-
Because the cost of debt is lower than the cost of equity, firms must increase their use of debt as much as possible to increase the firm's value. What is your answer to this argument? From the...
-
Alanda Murray owns Alandas SCUBA Shop of Bathurst. (In the Excel templates in MyAccountingLab, balances as of April 1 are provided for the accounts receivable and general ledger accounts.) In Alandas...
-
The following is the distribution of the daily number of power failures reported in a western city on 300 days: Test at the 0.05 level of significance whether the daily number of power failures in...
-
Jackie Wilson, manager of Expert Building Company, is a valued and trusted employee. She has been with the company from its start two years ago. Because of the demands of her job, she has not taken a...
-
Carla Vista manufactures mountain bikes. Its sales mix and contribution margin information per unit are as follows: Sales Mix Contribution Margin Destroyer 14% $130 Voyager 62% 62 Rebel 24% 48 It has...
-
Draw a decision tree for the problem of deciding whether to move forward at a road intersection, given that the light has just turned green.
-
show full working out and solutions Question 3 Use the personal income tax rates in this unit to calculate (a) dependant rebates and (b) net tax payable for the following tax payers in respect of the...
-
A good service should not need any promotion - reputation built on service quality should be sufficient to sell the service. Critically discuss this statement in the context of a service sector of...
-
The cantilever beam in Figure P14.9 is connected to a bar at joint 2 by a pin. Compute all reactions. Given: \(E=30,000 \mathrm{kips} / \mathrm{in}\). \(^{2}\). Ignore axial deformation of the beam....
-
List four macro-segmentation variables and explain their value in business markets.
-
The ways in which people from different countries buy cups of tea or coffee have been steeped in tradition. The English tearoom has been quintessentially English, usually providing homely...
-
What is the standard of care used to judge health care professionals?
-
Write a program using Java based on the following scenario/instructions: 1. Create object class Student comprises of Name (String), Matric No. (String), INARSIS (String), hand phone number (String),...
-
Is the modified 5-question approach to ethical decision making superior to the modified moral standards or modified Past in approach?
-
Should large retailers offer banking services? Small community banks may be concerned about their future if more retailers enter the world of banking. Suppose that a market research company conducted...
-
A company that receives shipments of batteries tests a random sample of nine of them before agreeing to take a shipment. The company is concerned that the true mean lifetime for all batteries in the...
-
A company services copiers. A review of its records shows that the time taken for a service call can be represented by a normal random variable with a mean of 75 minutes and a standard deviation of...
-
A 50 -W incandescent light bulb emits about \(5.0 \mathrm{~W}\) of visible light. (The rest is converted to thermal energy.) If a circular aperture \(5.0 \mathrm{~mm}\) in diameter is placed \(1.0...
-
Consider the diffraction pattern shown actual size in Figure 34.40. If the pattern was formed by light from a \(623-\mathrm{nm}\) (red) laser passing through a single narrow slit and the screen on...
-
Eyeglass lenses made of crown glass \((n=1.52)\) are given a thin coating of magnesium fluoride \((n=1.38)\) to minimize reflection of light from the lens surface. What is the minimum coating...
Study smarter with the SolutionInn App