I am trying to write a C++ program for parameter estimation(with Confidence Interval information) of an Exponentially distributed data set. I understand that lambda barX ∼ Γ(n,n). To come up with numeric values of lower/higher confidence intervals for a specified alpha, I need to be able to compute Inverse Gamma. Could you please point me to some algorithms?

spremani0r 2022-09-11 Answered
I am trying to write a C++ program for parameter estimation(with Confidence Interval information) of an Exponentially distributed data set. I understand that λ X ¯ Γ ( n , n ). To come up with numeric values of lower/higher confidence intervals for a specified α, I need to be able to compute Inverse Gamma. Could you please point me to some algorithms?
You can still ask an expert for help

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

Solve your problem for the price of one coffee

  • Available 24/7
  • Math expert for every subject
  • Pay only if we can solve it
Ask Question

Answers (1)

Isaiah Haynes
Answered 2022-09-12 Author has 16 answers
Step 1
Either I misunderstand the problem, or you are making it more difficult than necessary.
Let L and U cut probability α / 2 from the lower and upper tails of G a m m a ( s h a p e = n , r a t e = n ) ,, Then a 1 α confidence interval for λ is found as follows:
P ( L < λ X ¯ < U ) = P ( L / X ¯ < λ < U / X ¯ ) = 1 α ,,
so the desired CI is ( L / X ¯ , U / X ¯ ).
It is not difficult to program numerical integration to find U and L because the PDF of Gamma(n,n) can be evaluated. Alternatively, I'm sure there must be a compiled FORTRAN program in the IMSL library of statistical algorithms that can be called from C++.
In particular, if X 1 , X 2 , , X 25 is a random sample from E x p ( r a t e = .2 ) ,, we might have the following sample (rounded to 3 places):
1.515 0.187 6.270 3.291 3.597 10.680 1.572 22.555 4.924 0.063 0.214 0.465 19.042 2.467 4.663 2.101 7.597 10.053 0.017 5.627 12.124 7.579 0.735 11.290 4.153
The sample mean is X ¯ = 5.711.. The cut-off points for a 95% CI from R are
qgamma(c(.025,.975), 25, 25)
## 0.6471473 1.4284039
so that the 95% CI is
qgamma(c(.025,.975), 25, 25)/mean(x)
## 0.1133112 0.2501040
Step 2
The (slightly biased) maximum likelihood estimator of of λ in this example is λ ^ = 1 / X ¯ = 0.175 ,, which is contained in the CI, but not exactly at the center of it, owing to the skewness of the distributions involved.

We have step-by-step solutions for your answer!

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

You might be interested in

asked 2021-08-04
A random sample of 100 automobile owners in the state of Virginia shows that an automobile is driven on average 23,500 kilometers per year with a standard deviation of 3900 kilometers.
Assume the distribution of measurements to be approximately normal.
a) Construct a 99% confidence interval for the average number of kilometers an automobile is driven annually in Virginia.
b) What can we assert with 99% confidence about the possible size of our error if we estimate the average number of kilometers driven by car owners in Virginia to be 23,500 kilometers per year?
asked 2021-03-09

In a study of the accuracy of fast food​ drive-through orders, Restaurant A had 298 accurate orders and 51 that were not accurate. a. Construct a 90​% confidence interval estimate of the percentage of orders that are not accurate. b. Compare the results from part​ (a) to this 90​% confidence interval for the percentage of orders that are not accurate at Restaurant​ B: 0.127<p<0.191. What do you​ conclude? a. Construct a 90​% confidence interval. Express the percentages in decimal form. ___

asked 2020-12-27
Consider the next 1000 98% Cis for mu that a statistical consultant will obtain for various clients. Suppose the data sets on which the intervals are based are selected independently of one another. How many of these 1000 intervals do you expect to capture the corresponding value of μ?
What isthe probability that between 970 and 990 of these intervals conta the corresponding value of ? (Hint: Let
Round your answer to four decimal places.)
‘the number among the 1000 intervals that contain What king of random variable s 2) (Use the normal approximation to the binomial distribution
asked 2021-08-03
A simple random sample of 60 items resulted in a sample mean of 80. The population standard deviation is σ=15
a) Compute the 95% confidence interval for the population mean. Round your answers to one decimal place.
b) Assume that the same sample mean was obtained from a sample of 120 items. Provide a 95% confidence interval for the population mean. Round your answers to two decimal places.
c) What is the effect of a larger sample size on the interval estimate?
Larger sample provides a-Select your answer-largersmallerItem 5 margin of error.
asked 2021-09-19
Determine intervals in which solutions are sure to exist. y(4)+4y'''+3y=t
asked 2022-02-13
We wish to estimate what percent of adult residents in a certain county are parents. Out of 200 adult residents sampled, 176 had kids. Based on this, construct a 99% confidence interval for the proportion, p, of adult residents who are parents in this county.
asked 2021-08-01

How do you solve?
A healthcare provider monitors the number of CAT scans performed each month in each of its clinics. The most recent year of data for a particular clinics follows (the reported variable is the number of CAT scans each month expressed as the number of CAT scans per thousand members of the health plan):
2.31,2.09,2.36,1.95,1.98,2.25,2.16,2.07,1.88,1.94,1.97,2.02.
Find a two-sided 95% confidence interval for the standard deviation. What should you do to address any reservations about this confidence interval?
Round your answers to two decimal places (e.g. 98.76).
σ

New questions