Você está na página 1de 4

Class Activity 3

Statistics 2

1. Consider the following measurements of the heat-producing capacity of the coal produced by two mines (in
millions of calories per ton):

What is the probability that the two population variances are equal? (Add the graph)
M1=[8260,8130,8350,8070,8340];
M2=[7950,7890,7900,8140,7920,7840];
X1=mean(M1);
X2=mean(M2);
%%inferimos que sigma1=sigma2
n1=length(M1);
n2=length(M2);
S1=var(M1);
S2=var(M2);
F=(S1)/(S2);
% Graph
ejeX=finv(0.001,n1-1,n2-1):0.001:finv(0.999,n1-1,n2-1);
ejeY=fpdf(ejeX,n1-1,n2-1);
ind1=find(round(ejeX,4)==round(F,4));
Y2=ejeY;
Y2(1,ind1:end)=0;
figure;
plot(ejeX,ejeY,'r','LineWidth',2);hold on;
h=area(ejeX,Y2);h.FaceColor=([.7 .7 .7]);
xlabel('F','Interpreter','latex');
ylabel('Probability','Interpreter',"latex");
xlim([-8.6 77.4])
ylim([-0.058 0.694])

1
p = fcdf(F,n1-1,n2-1)
p = 0.6564

R=La probabilidad de que las varianzas poblacionales sean iguales es de 0.6564 y mi estadistico en
este caso me da 1.4423

2. Assuming that the sample variances are continuous measurements, find the probability that a random sample
of 30 observations, from a normal population with variance , will have a sample variance of that is

(a) greater than 7.338;

R=la probabilidad es de 0.0500

procedimiento
v=29;
n=30;
sigma=5;
%chi2=5.8S
%P(S>7.338)->P(S> 5.8 * 7.338)
%P(S>42.5604)
chi=42.5604;
a=1-chi2cdf(chi,v)
a = 0.0500
%grafica
ejeX=chi2inv(0.0001,n-1):0.0001:chi2inv(0.9999,n-1);

2
ejeY=chi2pdf(ejeX,n-1);
Y2=ejeY;
ind=find(round(ejeX,4)==round(chi,4));
Y2(1,1:ind)=0;
figure;
plot(ejeX,ejeY,'r','LineWidth',2);hold on;
h=area(ejeX,Y2);h.FaceColor=([.7 .7 .7]);
text(chi,0,'$\chi^{2}$','Interpreter',"latex");
xlabel('$\chi^{2}$','Interpreter','latex');
ylabel('Probability','Interpreter',"latex");
set(gca,'ticklabelinterpreter','latex');

(b) between 2.766 and 7.883;

R=la probabilidad es de 0.9500

demostracion
%2.766 y 7.883
%chi2=5.8S
%P(2.766<S<7.883)
%%P(5.8 * 2.766<S< 5.8 *7.883)
%P(16.0428<S<45.7214)
chi1=16.0428;
chi2=45.7214;
P=chi2cdf(chi2,v)-chi2cdf(chi1,v)
P = 0.9500
%grafica

3
ejeX=chi2inv(0.0001,n-1):0.0001:chi2inv(0.9999,n-1);
ejeY=chi2pdf(ejeX,n-1);
Y2=ejeY;
ind1=find(round(ejeX,4)==round(chi1,4));
ind2=find(round(ejeX,4)==round(chi2,4));
Y2(1,1:ind1)=0;
Y2(1,ind2:end)=0;
figure;
plot(ejeX,ejeY,'r','LineWidth',2);hold on;
h=area(ejeX,Y2);h.FaceColor=([.7 .7 .7]);
text(chi1,0,'$\chi^{2}$','Interpreter',"latex");
text(chi2,0,'$\chi^{2}$','Interpreter',"latex");
xlabel('$\chi^{2}$','Interpreter','latex');
ylabel('Probability','Interpreter',"latex");
set(gca,'ticklabelinterpreter','latex');

(c) Add the graph.

Você também pode gostar