Question

In: Math

Solve following using Program R studio. Please show code and results. Thank you. 3. Assume that...

Solve following using Program R studio. Please show code and results. Thank you.

3. Assume that ? is a random variable represents lifetime of a certain type of battery which is exponentially distributed with mean 60 hours.  
a. Simulate 500 pseudorandom numbers (using set.seed(10)) and assign them to a vector called expran.
b. Calculate average of simulated data and compare it with corresponding theoretical value.
c. Calculate probability that lifetime is less than 50 hours using cumulative probability function.
d. Calculate the total lifetime for these 500 simulated lifetimes.
e. Calculate 80th percentile using quantile function.

Solutions

Expert Solution

The R-Code is provided as:

a.)

set.seed(10)
expran = rpois(500, lambda = 60)
expran
60 58 49 55 63 50 58 55 68 65 58 67 65 60 52 65 73 60 54 54 59 66 71 59 61 59 60 50 67 61 49 60 60 60 73 53 54 44 52 64 60 67 60 64 70 76 63 66 53 70 66 64 56 53 57 69 65 56 68 60 54 51 62 70 53 56 55 64 58 65 65 63 61 65 77 50 57 58 60 68 64 74 59 55 54 67 63 83 69 63 58 65 60 51 68 56 66 57 68 65 69 67 56 47 50 64 68 53 57 67 55 44 59 69 80 54 65 67 47 71 74 61 68 74 79 59 49 56 61 64 57 42 58 51 47 61 82 54 56 61 53 61 48 65 50 68 55 75 63 59 66 64 55 49 57 76 57 59 56 60 67 54 60 53 70 62 70 63 65 57 51 63 61 74 69 56 87 63 49 56 55 57 51 57 53 60 72 64 70 57 57 60 62 66 53 63 57 72 65 66 63 63 59 60 57 56 68 67 48 49 68 54 71 61 62 76 83 62 62 88 73 66 65 40 57 58 37 78 71 54 56 77 62 60 51 44 50 55 62 70 61 64 53 73 70 67 55 58 69 71 64 55 52 62 56 58 66 59 58 51 59 58 75 71 50 59 79 56 66 58 56 54 56 56 63 64 44 60 66 57 60 62 64 69 62 56 53 72 55 65 44 53 53 68 76 63 69 67 65 75 68 65 49 64 50 66 54 46 59 63 57 59 60 75 59 65 59 57 57 68 74 55 54 42 58 55 60 66 55 60 67 76 55 67 60 52 63 54 57 52 65 58 69 50 71 76 73 58 52 63 69 55 55 58 54 54 70 59 67 60 66 57 64 62 71 61 64 60 67 61 53 53 56 60 49 59 54 54 54 57 65 52 54 55 68 59 48 56 68 59 55 66 50 50 70 77 62 75 50 58 70 66 48 62 68 61 61 60 55 69 60 42 56 58 52 74 64 60 56 66 73 69 60 72 68 49 52 59 67 68 63 62 58 63 49 60 59 58 60 57 76 59 54 53 69 66 75 61 70 62 62 53 50 46 39 51 59 67 58 67 80 54 65 58 61 71 56 57 67 71 68 61 49 65 52 54 57 56 46 55 43 55 64 54 58 62 61 75 50 67 62 75 61 59 60 64 50 50 77 56

b.) The average of simulated data is computed as:

mean(expran)
60.748

Hence, we observe that the average of simulated data is quite close to the mean of the exponentially distributed random variable M which is 60 hours.

c.) The probability that the lifetime is less than 50 hours using cumulative probability function is:

ppois(49,lambda = 60, lower.tail = T)
0.08440668

d.) The total lifetime for these 500 simulated lifetimes is obtained as:

sum(expran)
30374

e.) The 80th percentile using quantile function is obtained as:

quantile(expran, 0.8)
80%
67


Related Solutions

Solve following using Program R studio. Please show code and results. Thank you. 1. Assume that...
Solve following using Program R studio. Please show code and results. Thank you. 1. Assume that ? is a random variable follows binomial probability distribution with parameters 15 and 0.25.   a. Simulate 100 binomial pseudorandom numbers from the given distribution (using set.seed(200)) and assign them to vector called binran. b. Calculate ?(? < 8) using cumulative probability function. c. Calculate ?(? = 8) using probability distribution function. d. Calculate the average of simulated data and compare it with the corresponding...
Using R-Studio please answer the following questions and show your code. 1. Julie buys a take-out...
Using R-Studio please answer the following questions and show your code. 1. Julie buys a take-out coffee from one of two coffee shops on a random basis: Ultimo Coffee and Joe’s Place. This month, she measured the temperature of each cup immediately after purchase, using a cooking thermometer. Sample data is shown below, temperatures are in Fahrenheit. ultimo =  c(171,161,169,179, 171,166,169,178,171, 165,172,172) joes = c(168,165,172, 151,162,158,157,160, 158,160,158,164) State the null and alternative hypothesis in your own words. What type of statistical...
Please answer everything in R programming language. Show the code to me as well. Thank You...
Please answer everything in R programming language. Show the code to me as well. Thank You 1. Problem Open dataset stat500. Package: faraway. Use R (a) Calculate the correlation matrix. 10. (b) Plot total vs hw, to see how strong the relationship. (c) Build a simple linear regression: total regressed against midterm. Print model output. (d) Calculate directly the coefficients as in (3) (e) Calculate the Residual standard error s, as in (4). (f) Calculate the standard error of beta_1,...
SOLVE THE FOLLOWING USING STATISTICAL SOFTWARE R. SHOW YOUR CODE AND ANSWERS, USING AN RMD FILE...
SOLVE THE FOLLOWING USING STATISTICAL SOFTWARE R. SHOW YOUR CODE AND ANSWERS, USING AN RMD FILE (SHOW ANSWERS IN R MARKDOWN FORWAT WITH CODE AND ANSWERS) PROBLEM 1 A study of 400 glaucoma patients yields a sample mean of 140 mm and a sample standard deviation of 25 mm for the the following summaries for the systolic blood pressure readings. Construct the 95% and 99% confidence intervals for μ, the population average systolic blood pressure for glaucoma patients. PROBLEM 2...
SOLVE THE FOLLOWING USING STATISTICAL SOFTWARE R. SHOW YOUR CODE PROBLEM 1 A study of 400...
SOLVE THE FOLLOWING USING STATISTICAL SOFTWARE R. SHOW YOUR CODE PROBLEM 1 A study of 400 glaucoma patients yields a sample mean of 140 mm and a sample standard deviation of 25 mm for the the following summaries for the systolic blood pressure readings. Construct the 95% and 99% confidence intervals for μ, the population average systolic blood pressure for glaucoma patients. PROBLEM 2 Suppose that fasting plasma glucose concentrations (FPG) in some population are normally distributed with a mean...
Please use R studio, Thank you. 2. The probability of a student passing statistics is known...
Please use R studio, Thank you. 2. The probability of a student passing statistics is known to be 0.41; and the probability of a student passing chemistry is known to be 0.55. If the probability of passing both is known to be 0.35, calculate: (a) the probability of passing at least one of statistics and chemistry (b) the probability of a student passing chemistry, given that they passed statistics (c) Are passing chemistry and statistics independent? Justify (d) (harder) a...
Please show the Rstudio code used in markdown. thank you! 3. Hypothesis Testing on Two Proportions...
Please show the Rstudio code used in markdown. thank you! 3. Hypothesis Testing on Two Proportions The Organization for Economic Cooperation and Development (OECD) summarizes data on labor-force participation rates in a publication called OECD in Figures. Independent simple random samples were taken of 300 U.S. women and 250 Canadian women. Of the U.S. women, 215 were found to be in the labor force; of the Canadian women, 186 were found to be in the labor force. a) Compute the...
Can You please Answer the question using R studio and R cloud Telomeres are complexes of...
Can You please Answer the question using R studio and R cloud Telomeres are complexes of DNA and protein that cap chromosomal ends. They consist of the same short DNA sequence TTAGGG repeated over and over again. They tend to shorted with cell divisions and with advancing cellular age, which will lead to chromosome instability or apoptosis (programmed cell death). Eukaryotic cells have the ability to reverse telomere shortening by expressing telomerase, an enzyme that extends the telomeres of chromosomes....
Please solve A, B, and C. Please use excel. Please show work. Thank you. A. Use...
Please solve A, B, and C. Please use excel. Please show work. Thank you. A. Use the stocks of Apple, SAP, IBM, Oracle, and Amazon Download the historical data of weekly stock prices and S&P 500 index prices from year 2017-2019 on the website of yahoo finance and save it on an excel file. B. Use a different sheet to save the market adjusted prices of Apple, SAP, IBM, Oracle, and Amazon t and the index. For each stock, compute...
Using R Studio Use the two iid samples. (You can copy and paste the code into...
Using R Studio Use the two iid samples. (You can copy and paste the code into R). They both come from the same normal distribution. X = c(-0.06, 1.930, 0.608 -0.133,0.657, -1.284, 0.166, 0.963, 0.719, -0.896) Y = c(0.396, 0.687, 0.809, 0.939, -0.381, -0.042, -1.529, -0.543, 0.758, -2.574, -0.160, -0.713, 0.311, -0.515, -2.332, -0.844, -0.942, 0.053, 0.066, 0.942, -0.861, -0.186, -0.947, -0.110, 0.634, 2.357, 0.201, -0.428, -1.661, 0.395) (a) Report 95% confidence interval for the mean of X. Should we...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT