In: Computer Science
5. A test engineer conducted an experiment to estimate time to failure of a system component known to decay with time. Because activation of the component depended on its interaction with other components in the system, she could not control when the component was activated, but she could measure the time of its activation. She tracked the function of that component in 14 randomly chosen prototypes of the system, recording activation time (Ta) for the component, and the time the component decayed to the point of failure (Tf). Results are delineated below (each data point in the recorded data is the time recorded in seconds from when the experiment began)
Chart : Prototype ID 3 8 14 17 21 22 25 32 34 40 46 43 48 49
Ta (sec) 0 12 6 17 32 14 35 22 10 18 29 23 4 15
Tf (sec) 130 115 158 180 250 292 117 217 231 172 123 182 218 200
Write a MATLAB script that obtain statistics about the time it takes the component to decay to the point of failure. Your script can hardcode the data in Table 2 or ask the user to input the data. Include in your display the number of prototypes tested, a minimum time (the lowest calculated time), a maximum time (the highest calculated time), a standard estimate (the mean of calculated times across all prototypes), and a conservative estimate (the mean of calculated times across prototypes with the highest and lowest values removed). Your display should have the format as follows (with calculated values replacing ): Experimental results --------- Number of prototypes: Minimum time to failure: Maximum time to failure: Mean time to failure (standard): Mean time to failure (conservative):
Ta=[0 12 6 17 32 14 35 22 10 18 29 23 4 15];
Tf=[130 115 158 180 250 292 117 217 231 172 123 182 218 200];
time=Tf-Ta;
count=length(Ta);
maxTime=max(time);
minTime=min(time);
stdEstimate=mean(time);
conservativeEstimate=(sum(time)-maxTime-minTime)/(count-2);
fprintf('Experimental results\n')
fprintf('---------\n')
fprintf('Number of prototypes: %d\n',count)
fprintf('Minimum time to failure: %d s\n',minTime)
fprintf('Maximum time to failure: %d s\n',maxTime)
fprintf('Mean time to failure (standard): %g
s\n',stdEstimate)
fprintf('Mean time to failure (conservative): %g
s\n',conservativeEstimate)