Question

I need a function in R or just code in R that will solve this. (Thanks in advance)

1. The probability density function for Exponentiated Weibull distribution is and its corresponding cdf is given by F(x) 1-exp(x) This distribution is a popular distribution in analyzing lifetime data. a) b) Find the mean and variance when-10, α 2 and β-4 Compute the probability when the random variable X is between two standard deviation of the sample mean, where λ-10, α-2 and β-4

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) The R code for finding the mean and variance of the given distribution is given below.

lamda <- 10
alpha <- 2
beta <- 4

integrand1 <- function (x)
{
return(x*alpha*beta*lamda^beta*x^(beta-1)*(1-exp(-(lamda*x)^beta))^(alpha-1)*exp(-(lamda*x)^beta))
}
integrand2 <- function (x)
{
return(x^2*alpha*beta*lamda^beta*x^(beta-1)*(1-exp(-(lamda*x)^beta))^(alpha-1)*exp(-(lamda*x)^beta))
}

meanX <- integrate(integrand1, lower = 0, upper = Inf)$value
meanX
varX <- integrate(integrand2, lower = 0, upper = Inf)$value- meanX ^2
stdX <- sqrt(varX)
stdX

The computed mean is μ 0.1051 and standard deviation is  σ-0.0205

b) The required probabilty

P (μ-20 < X < μ +2 0.9549
R code below.

lamda <- 10
alpha <- 2
beta <- 4
integrand3 <- function (x)
{
return(alpha*beta*lamda^beta*x^(beta-1)*(1-exp(-(lamda*x)^beta))^(alpha-1)*exp(-(lamda*x)^beta))
}
pr <- integrate(integrand3, lower = meanX - 2*stdX, upper = meanX + 2*stdX)$value
pr

Add a comment
Know the answer?
Add Answer to:
I need a function in R or just code in R that will solve this. (Thanks...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Really short question! Please help me to solve part(b), also need the R code, thank you!...

    Really short question! Please help me to solve part(b), also need the R code, thank you! Problem 4 [26 points] (Section 2.4): Consider a one-sample z-test (known variance) with hypotheses: Ho: μ lo vs H, μ μο. a/2 where φ(.)Is the CDF of N(0,1), d-layo, and δ is the difference between the true mean and the mean under Ho (a) [10 points] Based on the fact that φ(x) [pdf of N(0,1)] is a decreasing function in x when x> 0,...

  • Really short question! Please help me to solve ONLY part(b) with R code. Thank you! Problem...

    Really short question! Please help me to solve ONLY part(b) with R code. Thank you! Problem 4 [26 points] (Section 2.4): Consider a one-sample z-test (known variance) with hypotheses: Ho: μ lo vs H, μ *Ho. The probability of Type II error can be written in the form |ß D(%2_Jnd)-0(-%2_Jnd) where Φ㈠ is the CDF of N(0,1), d Isyo, and δ is the difference between the true mean and the mean under Ho (a) [10 points] Based on the fact...

  • How to get the cdf when y>x>0? Thanks 6. The joint probability density function (pdf) of...

    How to get the cdf when y>x>0? Thanks 6. The joint probability density function (pdf) of (X, Y) is given by 0y<oo, elsewhere. fxr, y) (a) Find the cumulative distribution function of (X, Y) (b) Evaluate P(Y < X2) (c) Derive the pdf of X and then compute the mean and variance of X (d) Find the pdf of Y and compute the mean and variance of Y (e) Calculate the conditional pdf of Y given X (f) Compute the...

  • (15 points) A manufacturer is studying the length of time required by a maintenance team to...

    (15 points) A manufacturer is studying the length of time required by a maintenance team to respond to reported failure of a specific machine in the plant. The plant manager wants to know the percentage of repair calls answered within 10 minutes. 2. The response time, X, measured in minutes is known to have an exponential distribution. For the exponential distribution, as λ increases what happens to the mean and variance of the distribution? 4 points) Draw a sketch of...

  • The distance X between trees in a given forest has a probability density function given f...

    The distance X between trees in a given forest has a probability density function given f (x) cex/10, x >0, and zero otherwise with measurement in feet i) Find the value of c that makes this function a valid probability density function. [4 marks] ii) Find the cumulative distribution function (CDF) of X. 5 marks What is the probability that the distance from a randomly selected tree to its nearest neighbour is at least 15 feet. iii) 4 marks) iv)...

  • Please show me the R code or process of c). Thanks 3.6 The following data consists...

    Please show me the R code or process of c). Thanks 3.6 The following data consists of the times to relapse and the times to death following relapse of 10 bone marrow transplant patients. In the sample patients 4 and 6 were alive in relapse at the end of the study and patients 7-10 were alive, free of relapse at the end of the study Suppose the time to relapse had an exponential distribution with hazard rate A and the...

  • 6. The probability density function of (lifetime of an electronic component in years) X is f, (x)...

    6. The probability density function of (lifetime of an electronic component in years) X is f, (x)- 4 x exp(-r)U(x) 32 (a) What value of A will make this a valid pdf? (b) What is the probability that it will fail within 6 years, given that normally these units tend to fail within 4 to7 years? (c) What is P[IX-316)? (d) If the unit is known to fail within 6-8 years, what is the probability that it fail within 7...

  • please help me! Thanks in advance :) 5. Let N be a Poisson random variable with...

    please help me! Thanks in advance :) 5. Let N be a Poisson random variable with parameter λ Suppose ξ1S2, is a sequence of 1.1.d. random variables with mean μ and variance σ2, independent of N. Let SN-ξι 5N. Determi ne the me an and variance of Sw. 6. Let X, Y be independent random variables, each having Exponential(A) distribution. What is the conditional density function of X given that Z =

  • 6.9 Find the method of moments estimators of the parameters, and e, in the gamma bution...

    6.9 Find the method of moments estimators of the parameters, and e, in the gamma bution with the probability density function: 6.10 f(x) = – forro T(0) based on a random sample X. X... X. (Hint: Equate the mean and variance of the gamma distribution, the formulas for which are given in Section 2.8.3. to the correspondine sample quantities and i12 - A, respectively, and solve.) Find the method of moments estimators of the parameters, and in the beta distribution...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT