Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PLZ solve 2&3 function V=P4_numgenTP1_2017(9801081) randn(\'seed\',98.0108); ran

ID: 3254117 • Letter: P

Question

PLZ solve 2&3

function V=P4_numgenTP1_2017(9801081)

randn('seed',98.0108);

rand('seed',108.9009);

A1=[50,100,200,500,1000,2000,5000];
A=A1(randi(7));

B=(randi(15)+5)/400;

%V=(randn(1,50)*(rand()*20+5)/300+(1+(randi(2)*2-3)*(rand()+0.2)/100)^2)*A;
V=(randn(1,100)*(rand()*20+5)/300+(1+(randi(2)*2-3)*(rand()+0.2)/100)^2)*A;

fprintf(' mu=%g alpha=%g n=%g m=%g ',A,A*B,20+round(rand()*1000)/100,35+round(rand()*1000)/100);


end

You are in charge of the Quality Control systems for a resistor production line. The key process in the production line requires a resistor to be within a specific range of resistance. If the resistance lies outside this range, it is defective. Run P4 numgenTP1 2017.m in MATLAB with your student number to generate your data for this portfolio. The code will output: the data of measured resistances for 100 units of the resistor Au i.e. mu a e. alpha Your tasks: 1. Write one MATLAB function that calculates and returns the sample mean (T) and sample variance (s2) of your data, using a while loop. Do not use the built-in functions mean and var. Provide the MATLAB function as a separate .m file and the resulting mean and variance The process is supposed to have a mean value of Au (ie. mu as per printout from P4 numgenTP1 2017.m). There are concerns that the system may be incorrectly calibrated. To determine if there is sufficient evidence to support the concerns: (a) find the 95% confidence interval for the mean value Au (b) perform a hypothesis test. 3. In order to be within tolerance, the resistance must be between Au-a and Au (see mu and alpha in printout from P4 numgenTP1 2017.m). If it is outside of this range, the resistor is defective. Assuming that the system produces resistances described by a Normal distribution with mean and variance s2, determine the probability that the resistor will be defective. You may use MATLAB, a graphics calculator or the Z-table. If you use MATLAB or a graphics calculator you must provide the code/commands.

Explanation / Answer

randn('seed',98.0108);
rand('seed',108.9009);
A1=[50,100,200,500,1000,2000,5000];
A=A1(randi(7));
B=(randi(15)+5)/400;
V=(randn(1,100)*(rand()*20+5)/300+(1+(randi(2)*2-3)*(rand()+0.2)/100)^2)*A;

fprintf(' mu=%g alpha=%g n=%g m=%g ',A,A*B,20+round(rand()*1000)/100,35+round(rand()*1000)/100);
mu=80;
alpha=8;
n=25.97;
m=40.25;
             

x=1:length(V);                
su=0;
k=1;                            
while k<=length(V)
   su=su+V(k);
   k = k+1;                      
end
me=su/k;
va=(sum((V-me).^2))/100;
cil=mu-1.96*va/sqrt(n);
ciu=mu+1.96*va/sqrt(n);
hp=(me-mu)*sqrt(n)/va;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote