A tire company has tested 1000 tires to estimate the life of the tires it produces. The results of the 1000 samples is attached to this homework as a MATLAB workspace file called “data.mat”. Copy this file into a folder in which you will write a MATLAB file for solution of this problem. Write a MATLAB code in which you upload the data into workspace using “load” command (use load(data) and MATLAB automatically uploads the data in an array called ‘x’ in the workspace). Find the mean value and standard deviations of the x, data, then use normal density function to find the following probabilities in parts (a) and (b). For this purpose, you should use this command “normcdf”. Please use MATLAB help to understand this command.

a) What the probability of a tire working less than 40,000 miles. b) What the probability of a tire working between 40,000 and 60,000 miles.

load('data.mat'); % finding size of array x [n m]=size(x); % finding mean and std dev of array x sum=0; for a=1:n sum=sum+x(a); end mean=sum/n; sumsqr=0; for a=1:n sumsqr=sumsqr+(x(a)-mean)^2; end var=sumsqr/n; stddev=var^0.5; %part p1= probsbility of tyres working leass than 40000 miles y1=40000; p1=normcdf(y1,mean,stddev); %partb y2=60000; p2=normcdf(y2,mean,stddev); %p3= probability of tyres working between 40000 and 60000 miles p3=p2-p1;