Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Applied Statistics Expert

Question 1 -

Consider a set of data relating two score tests, LSAT and GPA, at a sample of 15 American law schools. Of interest is the correlation θ = cor(lsat, gpa) between these measurements and the variance ratio ψ = var(lsat)/var(gpa).

list(lsat = c(576, 635, 558, 578, 666, 580, 555, 661, 651, 605, 653, 575, 545, 572, 594),

gpa = c(3.39, 3.30, 2.81, 3.03, 3.55, 3.07, 3.00, 3.43, 3.36, 3.13, 3.12, 2.74, 2.76, 2.88, 2.96),

n = 15)

1. Write a function in R called CI.cor that returns 95% bootstrap confidence intervals for the correlation parameter θ using the basic bootstrap interval method and the percentile interval method. Your answer should contain the R function CI.var.cor.

2. Write a function in R called CI.var.ratio. that returns 95% bootstrap confidence intervals for the variance ratio ψ using the basic bootstrap interval method and the percentile interval method.

Your answer should contain the R function CI.var.ratio.

Question 3 -

Consider the following dataset

list(t = c(94.3, 15.7, 62.9, 126, 5.24, 31.4, 1.05, 1.05, 2.1, 10.5),

x = c(5, 1, 5, 14, 3, 19, 1, 1, 4, 22),

n = 10)

on observed failures xi of n = 10 power plant pumps. Here ti denotes the length of operation time of the pump (in 1000s of hours). The number of failures Xi is assumed to follow a Poisson distribution Xi| θi ∼ Poisson(θiti). Consider the hierarchical model

θi| α, β ∼ Gamma(α, β)

where

α ∼ Exp(λ), β ∼ Gamma(γ, δ), λ = 1 and γ = δ = 0.01.

1. What are the conditional posterior distributions of

- θi| θ-i, α, β, x;

- β | θ, α, x;

- α | θ, β, x?

Write your answer in a section called Question 3 (a) of the file.

2. Write a function in R called mcmc.pumps that implements a general McMC algorithm with components θ, β, α where θ and β are updated from the posterior conditional distribution and log α is updated via a random walk Metropolis step with normal increments. The function should return samples from the posterior distribution of θ, β and α as well as an estimate of the probability of accepting α.

Your answer must contain the code of the function mcmc.pumps.

3. Write a function in R called predictive.pumps that returns estimates of the predictive distribution of failures for the i-th pump for a given length of operation time ti, using Monte Carlo integration.

Your answer must contain the code of the function predictive.pumps.

Question 4 -

Let x1, . . . , xn be a sample of independent and identically distributed observations assumed to have been generated from a t-distribution with ν degrees of freedom located at µ, i.e.,

f(x | µ) ∝ {1 + 1/ν(x - µ)2}-(ν+1)/2                                                 x ∈ R.                     (1)

Assume ν = 10 and suppose µ ∼ N(0, 1).

1. Write down, up to proportionality constant, the posterior µ | x. Is this a recognisable density? Write a function in R called mcmc.t that implements an McMC algorithm for evaluating the posterior distribution of µ where the updating is done using random walk Metropolis with a normal candidate generator.

Your answer should contain the posterior density of µ | x in a section called Question 4 (1) of the =matriculationA2math= file and the function mcmc.t separately in and scriptA2.R

2. Using the fact that the t-distribution is a scale mixture of normals, the sampling model in (1) can alternatively be represented as

xi| µ, zi ∼ N(µ, 1/zi)

where zi are a priori independent of µ and

f(zi) ∝ zi(ν/2)-1 exp{-(ν/2) zi}.

Using this representation together with the prior distribution µ ∼ N(0, 1), write down, up to proportionality constant, the conditional posterior densities of µ and of each zi , i = 1, . . . , n and identify the distributions corresponding to each of these densities. Write a function in R called mcmc.gibbs that implements a Gibbs sampling algorithm for computing the posterior distribution of µ.

Your answer should contain the conditional posterior densities of µ and each of the zis in the file in a section called Question 4 (2) of the =matriculationA2math= file and the function mcmc.gibbs separately in and scriptA2.R

3. Let x denote a future observable. Write a function in R called predictive.t that returns estimates of the predictive distribution x| x using Monte Carlo integration. Your answer must contain the code of the function predictive.t.

4. Write a function in R called predictive.quantile that estimates the pth quantile of the predictive distribution

xp : Pr (x ≤ xp | x) = p

and use it to construct a 95% predictive interval.

Your answer must contain the code of the function predictive.quantile as well the code used to obtain the 95% predictive interval.

I Need help with questions 1, 3, 4.

Attachment:- Assignment File.rar

Applied Statistics, Statistics

  • Category:- Applied Statistics
  • Reference No.:- M92542793

Have any Question?


Related Questions in Applied Statistics

Business data analysis facts from figures assignment

BUSINESS DATA ANALYSIS: FACTS FROM FIGURES Assignment - Question 1 - Private capital expenditure for 12 successive quarters are presented in the following table: Quarter Millions 1 31,920 2 25,120 3 30,350 4 24,650 5 30, ...

Assignment -in this assignment ms excel must be used to

Assignment - In this assignment MS Excel must be used to perform any calculations/graphical presentations as required in this assignment. Question 1 - Below you are given the examination scores of 20 students (data set a ...

Assessment - analytical reportobjectives - this assessment

Assessment - Analytical Report Objectives - This assessment addresses Unit Learning Outcomes: Discriminate the most appropriate descriptive and inferential statistics to use in a given health context, Analyse health data ...

Using minitab statistics to calculate the various

Using Minitab Statistics to calculate the various T-Tests The steps required for completing the deliverables for this assignment (screen shots that correspond to these instructions can be found immediately following them ...

As the him member of your research team you are preparing

As the HIM member of your research team, you are preparing for a clinical trial study involving human subjects. The research would track two possible mutually exclusive outcomes, such as survive/did not survive, yes/no, ...

Linear project instructions -curve-fitting project - linear

Linear Project instructions - Curve-fitting Project - Linear Model For this assignment, collect data exhibiting a relatively linear trend, find the line of best fit plot the data and the line, interpret the slope, and us ...

Statistics for business decisions assignment assignment 1

Statistics for Business Decisions Assignment Assignment 1 - QUESTION 1 - Time Series Regression The table below presents the number of students attending Statistics lectures in weeks 1 to 10. Week Number of students 1 90 ...

Assignment - research topicpurpose the purpose of this task

Assignment - Research topic Purpose: The purpose of this task is to ensure you are progressing satisfactorily with your research project, and that you have clean, useable data to analyse for your final project report. Ta ...

Quantitative methods in health statistical analysis report

Quantitative Methods in Health Statistical Analysis Report - Question 1 - Are you a Lark or an Owl? Studies indicate that about 10% of us are morning people (Larks) while 20% are evening people (Owls) and the rest are no ...

Enhancing patient safety through organizational learningare

Enhancing Patient Safety through Organizational Learning: Are Patient Safety Indicators a Step in the Right Direction? by Peter E. Rivard, Amy K. Rosen, and John S. Carroll. Take a professional position, from the HIM per ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As