Write an r function

Assignment Help Basic Statistics
Reference no: EM133760774

Question: Suppose (|) is the posterior distribution for some parameter Θ , and that it follows a Beta distribution with parameters and ; we will refer to these as shape parameters 1 and 2, to avoid confusion with as the confidence level. Your task is to determine the High Posterior Density (HPD) Credible Interval. Write an R function, hpd(sh1, sh2, alpha), that takes as its first two arguments the shape parameters for the Beta distribution, and the third defines the 1- credible level; this function should return a vector of length 2, giving the lower and upper bounds of the credible interval, respectively. Recall that you must find >0 such that ∫(|)=1- , where the region is everywhere the posterior density exceeds : ={:(|)≥} . Once you've found , the upper and lower bounds of the region give the interval (,) . You will need to determine this interval, (,) , computationally. The general algorithm follows as: Given the shape parameters, get the density function for the Beta distribution Start with some , find the corresponding interval (,) , and calculate the area under the curve. If the area under the curve

Reference no: EM133760774

Questions Cloud

Calculate ballistics coefficient : To understand how projectiles behave under different weather conditions To calculate the dimensions of a standard bullet All answers are correct To calculate
Case study mr. black and ms. blue : Depending on the skill level it may take you less time or more time to complete - Case Study Mr. Black, Ms. Blue & Mr. White
What is the period 13 forecast using exponential smoothing : What is the period 13 forecast using exponential smoothing with a smoothing constant of 0.3 (rounded up to the nearest whole number)?
How do we determine the test statistic and p-value : How do we determine the test statistic and p-value and How do we determine the critical value and draw our conclusion
Write an r function : Write an R function, hpd(sh1, sh2, alpha), that takes as its first two arguments the shape parameters for the Beta distribution, and the third defines
Find the probability that a randomly selected student : The standard deviation is 10. The grade is bell-shaped. Find the probability that a randomly selected student has a grade of less than 80.
What is the probability that each die lands : What is the probability that each die lands on the month corresponding to the roller's birthday. (For example, a student born in March would correspond
What is the linear regression model : What is the linear regression model that you could use to assess statistically whether the relationship between respiratory function and abdominal obesity
Compare the mean number of cars per hour : Compare the mean number of cars per hour with the given value (60). * - you will need to use the exponential distribution to simulate the time between events

Reviews

Write a Review

Basic Statistics Questions & Answers

  Statistics-probability assignment

MATH1550H: Assignment:  Question:  A word is selected at random from the following poem of Persian poet and mathematician Omar Khayyam (1048-1131), translated by English poet Edward Fitzgerald (1808-1883). Find the expected value of the length of th..

  What is the least number

MATH1550H: Assignment:  Question:     what is the least number of applicants that should be interviewed so as to have at least 50% chance of finding one such secretary?

  Determine the value of k

MATH1550H: Assignment:  Question:     Experience shows that X, the number of customers entering a post office during any period of time t, is a random variable the probability mass function of which is of the form

  What is the probability

MATH1550H: Assignment:Questions: (Genetics) What is the probability that at most two of the offspring are aa?

  Binomial distributions

MATH1550H: Assignment:  Questions:  Let’s assume the department of Mathematics of Trent University has 11 faculty members. For i = 0; 1; 2; 3; find pi, the probability that i of them were born on Canada Day using the binomial distributions.

  Caselet on mcdonald’s vs. burger king - waiting time

Caselet on McDonald’s vs. Burger King - Waiting time

  Generate descriptive statistics

Generate descriptive statistics. Create a stem-and-leaf plot of the data and box plot of the data.

  Sampling variability and standard error

Problems on Sampling Variability and Standard Error and Confidence Intervals

  Estimate the population mean

Estimate the population mean

  Conduct a marketing experiment

Conduct a marketing experiment in which students are to taste one of two different brands of soft drink

  Find out the probability

Find out the probability

  Linear programming models

LINEAR PROGRAMMING MODELS

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