In: Mechanical Engineering
Data analysis of the breaking strength of a certain fabric shows that it is normally distributed with a mean of 300 lb and a variance of 9.
a. Estimate the percentage of fabric samples that will have a breaking strength no less than 294 lb.
b. Estimate the percentage of fabric samples that will have a breaking strength no less than 297 lb and no greater than 303 lb.
Program plan:
• To write a matlab code to find the percent of fabric having breaking strength no less than 294 lb.
• To find the percentage of fabric sample that will be having breaking strength no less than 297 lb and no greater than 303 lb.
Program:
%**********************************************************
%A matlab code is written to find the percent of fabric
%samples that have breaking strength no less than 294 lb
%and also to find the percent of fabric samples that will
%have breaking strength no less than 297 lb and no greater
%than 303 lb using the mean and variance of the sample.
%**********************************************************
%Declaration of mean
mu=300;
%Declaration of variance
variance=9;
%Declaration of standard deviation
sigma=sqrt(variance);
%Computes the value
z1=(294-mu)/sigma;
%Computes the value
z2=(297-mu)/sigma;
%Computes the value
z3=(303-mu)/sigma;
%To find the percent of fabric samples which have breaking strength no less
%than 294lb
p1=100*(1-erf(z1/sqrt(2)))/2;
%Displays text
disp('Sample having breaking strength no less than 294lb');
%Displays value
disp(p1);
%To find the percent of fabric samples which have breaking strength no less
%then 297lb and no greater then 303lb
p2=100*(erf(z3/sqrt(2))-erf(z2/sqrt(2)))/2;
%Display text
disp('Sample having breaking strength no less than 297lb and no greater then 303lb');
%Display value
disp(p2);
Output:
>> Untitled
Sample having breaking strength no less than 294lb
97.7250
Sample having breaking strength no less than 297lb and no greater then 303lb
68.2689
a. Sample having breaking strength no less than 294lb
97.7250
2. Sample having breaking strength no less than 297lb and no greater then 303lb
68.2689