Faruk M. Hw3 Problem8 (Simulation Study of System Lifetime in Engineering)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Simulation Study of System Lifetime in Engineering

By

Faruk, Muritala

STAT7100

Instructor: Professor Kimberly Gardner

Kennesaw State University


Introduction

Citing Example 4.81 Sec. 4.12, this study brings a solution to Exercise 8 Sec.

4.12 (Navidi, 2015). The lifetime of two components A and B in a parallel

connection of a system is considered to function until both components fail,

the system lifetime of A and B in months follows an exponential distribution

with Lambda 1 and ½ respectively. This simulation will mimic a procedure

adopted by Gardner (2023). A simulation process will be adopted to estimate

both components’ lifetimes. The purpose of this simulation study is to

determine the better choice to maximize the mean system lifetime and the 10 th

percentile of the system lifetime and also, to determine the better choice to

minimize the probability that the system fails within a month by replacing

either of component A or B with whose lifetime has an exponential distribution

of lambda 1/2 or 1/3 respectively. This simulation is a good way to mimic the

actual lifetime of the system so that it can be studied efficiently and effectively.

Methodology

The lifetime of the system connected in parallel will function until both

components A and B fails, therefore the maximum lifetime of either of the

component is considered the system lifetime I.e Maximum( Lifetime A,


Lifetime B) = system lifetime. The lifetime of these components follows an

Exponential

distribution with different Lambda (λ). A Monte Carlo statistical simulation was

conducted using SAS software version 9.4. A SAS code was written to generate

three sets of 1000 lifetime of the system before replacement and under the

assumption that component A and B is replaced. The generated lifetimes of

when each component A and B were replaced are stored as

“ReplacedALifetime” and “ReplacedBLifetime” respectively with the initial

lifetime before replacement in the dataset called "Lifetime".

Results and Conclusions

The computed sample mean of the lifetime for the three conditions (Before

replacement, when component A was replaced, and when component B was

replaced) was executed using the SAS code provided in Appendix B. The result

shows that the mean of the component before replacement is (1.185456)

when the A and B components have an exponential distribution of Lambda

equals 1/2 and 1/3 respectively, also the mean (0.747223) when component A

was replaced and the mean of (1.102382) when component B was replaced

since our assumption is to select the better choice to maximize the system
lifetime between replacing component A or B. Therefore, replacing component

B will result in a longer system lifetime than replacing component A, since B

has a greater mean lifetime compared to A.

The Appendix B SAS code computes the mean of the 1000 total number

Lifetime of the three conditions (Before replacement, when component A was

replaced, and when component B was replaced). The results of the summary

statistics result were formatted based on need and given as Table1 below:

Number of Sample Mean Sample Mean of System Sample Mean of System

System System Lifetime when A was Lifetime when B was

Lifetime Lifetime replaced replaced

1000 1.185456 0.747223 1.102382

Table 1: Average Lifetime of System for the three Conditions.

Also, based on our assumption we are interested in minimizing the probability

that the system lifetime fails within a month when a replacement is done in

the components. A SAS code presented in Appendix C provides a Boolean

stored dataset when the replaced components fail in less than a month and

the frequency of occurrence is formatted as shown in Table 2 below. The table

shows that 409 failure was recorded when component B was replaced and

component A recorded 255 failure. The interest of this simulation is also to


minimize the occurrence of the system failure within a month since replacing

component B turns out to have a less probability of failure (equals 0.591)

compare to component A (equals 0.745). Therefore, component B is a better

choice to minimize the occurrence of failure in the system’s lifetime.

Table 2: Frequency Distribution of System Lifetime failure within a month.

Condition of No. of System Percentage of Probability of System

System Failures in less System Failures in Failures in less than a

Lifetime than a month less than a month month

(# of 1000)

Component 745 74.5% 0.745

A replaced

Component 591 59.1% 0.591

B replaced

Lastly, consider maximizing the 10th percentile of the system lifetimes for the

replaced components A or B. The Appendix D SAS code generates Figure 1 and

figure 2 for the 1000 system lifetimes quartiles when components A and B are

replaced respectively.
Figure 1: The Percentile distribution of System Lifetime when component A

was replaced.
Figure 2: The Percentile distribution of System Lifetime when component B

was replaced.

Figure 1 shows that the 10th percentile of when component A was replaced is

0.189682 (approximately 19%), while the 10th percentile of when component

B was replaced is 0.220048 (approximately 22%). Since our aim is to maximize

the 10th percentile of the system lifetime, therefore the best choice is

component B (22%) since it has the highest lifetime compared to component A

(19%).
Appendix A.

/*To simulate the lifetime of the system. we generate


random variables with an exponential distribution.*/
/*Note; New lambda (A,B)=(1/2,1/3) and old Lambda (A,B)=(1,1/2) */

data lifetime;
do i = 1 to 1000;
a0= rand('exponential', 1); /*inital*/
b0= rand('exponential', 1/2); /*Initial*/
a1 = rand('exponential', 1/2); /*relacing from 1 to 1/2 */
b1 = rand('exponential', 1/3); /*relacing from 1 to 1/3 */
system_lifetime = max(a0, b0); /*initial lifetime of system before
replacement*/
replacedA_lifetime = max(a1, b0); /*lifetime of system when A is
replaced*/
replacedB_lifetime = max(a0, b1); /*lifetime of system when B is
replaced*/
output;
keep system_lifetime replacedA_lifetime replacedB_lifetime;
end;
run;

Appendix B.

/*This gives us an estimate of the mean system lifetime.*/


/*maximize the mean system lifetime */

proc means data=lifetime mean;run;

Appendix C.

/*To estimate the probability that the system functions for


less than 1 month, we can use the FREQ procedure:*/
data lifetimeLessthan1 (keep=ALessthan1 BLessthan1);
set lifetime;
if replacedA_lifetime < 1 then ALessthan1=1;
else ALessthan1=0;
if replacedB_lifetime < 1 then BLessthan1=1;
else BLessthan1=0;
run;
/*This gives us an estimate of the probability that the system
functions for less than 1 month*/
proc freq data=lifetimeLessthan1;
run;

Appendix D.

/*To estimate the 10th percentile of the system lifetimes,


we can use the UNIVARIATE procedure:*/
proc univariate data=lifetime;
var replacedA_lifetime replacedB_lifetime;
output out=lifetimeLessthanP10 pctlpts=10 pctlpre=p10_;run;
References

Gardner, K. (2023). STAT7100-Statistical Methods, Statistical Simulation Introduction

Class Note. Kennesaw State University. Atlanta Georgia, GA. USA.

Navidi, W. (2015). Statistics for engineers & scientist, 4th ed. McGraw-Hill Education.

New York, NY. USA.

You might also like