Question

In: Statistics and Probability

Use R Studio to solve this problem. A simple electronic device consists of two components which...

Use R Studio to solve this problem.

A simple electronic device consists of two components which have failure times which may be modeled as independent exponential random variables. The first component has a mean time to failure of 3 months, and the second has a mean time to failure of 6 months.

(a) If the electronic device will fail when either of the components fails, use 1000 random samples of the simulated electronic device to estimate the mean and variance of the time to failure for the device.

Hint: Using the appropriate distributions for failure time and appropriate means, generate 1000 samples of Y1 representing failure time of the first component and 1000 samples of Y2 representing failure time of the second component of the 1000 simulated electronic device. Under this scenario, the failure time of the device is the minimum value of Y1i , Y2i for the i th pair. Using this, calculate the mean and variance of the failure time of the device.

(b)If the electronic device will fail when both of the components fail, use 1000 random samples of the simulated electronic device to estimate the mean and variance of the time to failure for the device.

Hint: Under this scenario, the failure time of the device is the maximum value of Y1i , Y2i for the i th pair. Using this, calculate the mean and variance of the failure time of the device.

Solutions

Expert Solution

a) R code with comments

get this

b) R code with comments

get this

All code together is

------------------

#set the random seed for repeatability
set.seed(123)

#part a)
#set the number of samples
n<-1000
#draw n samples of failure times y1 for component 1
y1<-rexp(n,rate=1/3)
#draw n samples of failure times y2 for component 2
y2<-rexp(n,rate=1/6)
#failure time of the device is
y<-pmin(y1,y2)
#print the mean failure time of the device
sprintf('the estimated Mean failure time of the device is %.4f',mean(y))
#print the variance of failure time of the device
sprintf('the estimated Variance of failure time of the device is %.4f',var(y))

#part b)
#set the number of samples
n<-1000
#draw n samples of failure times y1 for component 1
y1<-rexp(n,rate=1/3)
#draw n samples of failure times y2 for component 2
y2<-rexp(n,rate=1/6)
#failure time of the device is
y<-pmax(y1,y2)
#print the mean failure time of the device
sprintf('the estimated Mean failure time of the device is %.4f',mean(y))
#print the variance of failure time of the device
sprintf('the estimated Variance of failure time of the device is %.4f',var(y))

----------------------


Related Solutions

1. Basic use of R/R Studio. Solve the following problem in R and print out the...
1. Basic use of R/R Studio. Solve the following problem in R and print out the commands and outputs. (a) Create a vector of the positive odd integers less than 100; Remove the values greater than 60 and less than 80; Find the variance of the remaining set of values (b) What’s the difference in output between the commands 2*1:5 and (2*1):5? Why is there a difference? (c) If you wanted to enter the odd numbers from 1 to 19...
Use R studio to do this problem. This problem uses the wblake data set in the...
Use R studio to do this problem. This problem uses the wblake data set in the alr4 package. This data set includes samples of small mouth bass collected in West Bearskin Lake, Minnesota, in 1991. Interest is in predicting length with age. Finish this problem without using Im() (a) Compute the regression of length on age, and report the estimates, their standard errors, the value of the coefficient of determination, and the estimate of variance. Write a sentence or two...
Please solve in R studio. Thanks in advance! **Below are two samples of test scores from...
Please solve in R studio. Thanks in advance! **Below are two samples of test scores from two different calculus classes. It is believed that class 1 performed better than class two. From previous tests it is known that the test scores for both classes are normally distributed and the population standard deviation of class 1 is 10 points and the population standard deviation of class 2 is 8 points. Do the data support that class 1 performed better.** ```{r} class1<-c(100,...
Solve this problem by hand. A thermal interaction between two components requires that both components have...
Solve this problem by hand. A thermal interaction between two components requires that both components have similar temperature. One random sample for each component was obtained. The data is summarized in the table below: Component 1 55 54 53 54 Component 2 54 52 53 Calculate x1,s1,x2,and s2 Is there evidence to support that the two components has the same temperature. Assume α=0.05 . Assume that both populations are normally distributed with equal unknown variances Construct two sided 95% CI...
Please use R to solve this with explanation Consider the simple linear trend model. This model...
Please use R to solve this with explanation Consider the simple linear trend model. This model relates quarterly sales (y) to time period (t). a. Compute the residuals and plot them versus time. b. Does the plot suggest that the error terms are autocorrelated? Explain. c. Calculate the Durbin-Watson statistic. d. Test for positive (first-order) autocorrelation = .05. t Sales 1 21.74 2 26.41 3 26.44 4 26.40 5 23.91 6 27.06 7 26.63 8 26.98 9 28.26 10 27.87...
THIS QUESTION REQUIRES THE USE OF R STUDIO. ANY ANSWERS GIVEN THAT ARE NOT IN R...
THIS QUESTION REQUIRES THE USE OF R STUDIO. ANY ANSWERS GIVEN THAT ARE NOT IN R STUDIO CODE WILL NOT SUFFICE. SOLVING WITHOUT THE USE OF R STUDIO IS NOT ACCEPTABLE. The previous question was: Annual salaries for a large company are approximately normally distributed with a mean of 49000 dollars and a standard deviation of 2000 dollars. One manager claims that all of his direct reports are paid "above the 75th percentile" for the company. What is the minimum...
(R code needed) Lifetimes of electronic components manufactured by an electronic company are assumed to follow...
(R code needed) Lifetimes of electronic components manufactured by an electronic company are assumed to follow an Exp(λ) distribution with mean 1/λ. A random sample of 30 lifetimes in years was obtained and shown below: 5.1888 3.6757 4.5091 7.1320 1.3711 1.6454 2.1979 3.8805 0.5290 2.3796 3.2840 3.6678 0.6836 7.9914 12.9922 2.6192 0.3593 5.0234 0.2240 7.5862 0.1172 0.0618 2.6203 16.2319 17.2107 0.8101 8.9368 2.0752 0.9925 1.0187 The data can also be found in life2018.csv. (a) Find the moment estimate of λ....
USE R STUDIO. Consider the pressure data frame. There are two columns: temperature and pressure: •...
USE R STUDIO. Consider the pressure data frame. There are two columns: temperature and pressure: • Construct a scatterplot with pressure on the vertical axis and temperature on the horizontal axis. • The graph of the following function passes through the plotted points reasonably well: y = (0.168 + 0.007 ∗ x) ^(20/3). Recall that the differences between the pressure values predicted by the curve (i.e. y) and the observed pressure values (i.e. the pressure values obtained from the data...
The figure shows a simple device for measuring your reaction time. It consists of a cardboard...
The figure shows a simple device for measuring your reaction time. It consists of a cardboard strip marked with a scale and two large dots. A friend holds the strip vertically, with thumb and forefinger at the dot on the right in the figure. You then position your thumb and forefinger at the other dot (on the left in the figure), being careful not to touch the strip. Your friend releases the strip, and you try to pinch it as...
Cyber bullying, is use of any electronic device to intimidate, bully, harass or threaten another. Which...
Cyber bullying, is use of any electronic device to intimidate, bully, harass or threaten another. Which of the following might be use for it? Cellphone (text) Gaming devices Computer All of the above ANA felt that bullying in workplace was such important topic that developed position paper in 2008. ANA defines bullying as: Repeated, unwanted, harmful actions intended to humiliate, offend, and cause distress in recipient Act of aggression that 1 inflict on another that’s unexpected or warranted Any act...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT