Académique Documents
Professionnel Documents
Culture Documents
Equipo:
jButton2.setText("Algoritmo Lineal");
jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton2MouseClicked(evt);
}
});
jButton3.setText("Algoritmo Multiplicador Constante");
jButton3.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton3MouseClicked(evt);
}
});
jButton4.setText("Salir");
jButton4.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton4MouseClicked(evt);
}
});
jButton5.setText("Limpiar");
jButton5.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton5MouseClicked(evt);
}
});
jButton6.setText("Algoritmo congruencial multiplicativo");
jButton6.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton6MouseClicked(evt);
}
});
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});
jButton7.setText("Prueba de Medias");
jButton7.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton7MouseClicked(evt);
}
});
jButton8.setText("Prueba de Varianza");
jButton8.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton8MouseClicked(evt);
}
});
jButton9.setText("Kolgomorov");
jButton9.addMouseListener(new java.awt.event.MouseAdapter() {
.addComponent(jButton11, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton12, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 101,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(58, 58, 58)
.addComponent(jButton14)
.addGap(50, 50, 50)
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 102,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 515, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(27, 27, 27))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(21, 21, 21)
.addComponent(jButton10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton8)
.addGap(6, 6, 6)
.addComponent(jButton11)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton9)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton12)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 404,
Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton4)
.addComponent(jButton5)
.addComponent(jButton14))
.addGap(22, 22, 22))
);
pack();
}// </editor-fold>
// Algoritmo de productos medios------------------------------------private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
jTextArea1.setText("");
float r;
float l;
String x0 = JOptionPane.showInputDialog("Dame el valor de Xo mayor a 3 digitos");
float X0= Integer.parseInt(x0);
String x1 = JOptionPane.showInputDialog("Dame el valor de x1 mayor a 3 digitos");
float X1 = Integer.parseInt(x1);
String c = JOptionPane.showInputDialog("Dame la cantidad de numeros a generar");
int C = Integer.parseInt(c);
int cont;
for(cont=0; cont < C; cont++)
{
float y0=X0*X1;
String d="";
d=d+y0;
String f ="";
f=f+d.charAt(3)+d.charAt(4)+d.charAt(5)+d.charAt(6);
r=Float.parseFloat(f);
X0=X1;
X1=r;
l=r/10000;
String v="";
v=v+l+"\n";
jTextArea1.append(v);
}
}
}
// multiplicador constante------------------------------------------------------------private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {
jTextArea1.setText("");
float r;
float l;
String x0 = JOptionPane.showInputDialog("Dame el valor de Xo mayor a 3 digitos");
float X0= Integer.parseInt(x0);
String x1 = JOptionPane.showInputDialog("Dame el valor de A mayor a 3 digitos");
float A =Integer.parseInt(x1);
String c = JOptionPane.showInputDialog("Dame la cantidad de numeros a generar");
int C = Integer.parseInt(c);
int cont;
for(cont=0; cont < C; cont++)
{
float y0=A*X0;
String d="";
d=d+y0;
String f ="";
int h =d.length();
if(h==9)
{
f=f+d.charAt(1)+d.charAt(2)+d.charAt(3)+d.charAt(4);
}
else
{
f=f+d.charAt(3)+d.charAt(4)+d.charAt(5)+d.charAt(6);
}
r=Float.parseFloat(f);
X0=r;
l=r/10000;
String v="";
v=v+l+"\n";
jTextArea1.append(v);
}
int cont;
double m = Math.pow(2,G);
float b =K*8+3;
for(cont=0; cont < N; cont++)
{
double X1=(b*X0) % m;
X0=X1;
r= X1/(m-1);
float u;
u=(float)r;
String v="";
v=v+u+"\n";
jTextArea1.append(v);
}
}
// algoritmo de cuadrados medios-----------------------------------------------------------------------------private void jButton10MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
jTextArea1.setText("");
String x0 = JOptionPane.showInputDialog("Dame el valor de X0 > a 3D");
double X0= Double.parseDouble(x0);
String n = JOptionPane.showInputDialog("Dame la cantidad de numeros a generar ");
int N = Integer.parseInt(n);
float x;
for (int cont=0;cont<N;cont++)
{
X0=Math.pow(X0, 2);
String d="";
d=d+X0;
String f ="";
int h =d.length();
if(h==9)
{
f=f+d.charAt(1)+d.charAt(2)+d.charAt(3)+d.charAt(4);
}
else
{
if(h==7)
{
f=f+d.charAt(0)+d.charAt(1)+d.charAt(2)+d.charAt(3);
}
else
{
if(h==8)
{
f=f+d.charAt(1)+d.charAt(2)+d.charAt(3)+d.charAt(4);
}
else
{
f=f+d.charAt(3)+d.charAt(4)+d.charAt(5)+d.charAt(6);
}
}
}
x=Float.parseFloat(f);
X0=x;
float l=x/10000;
String v="";
v=v+l+"\n";
jTextArea1.append(v);
}
Generador_Ale z = new Generador_Ale();
z.ks( g );
}
private void jButton7MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
//---------------------------------------------------// prueba de medias
prueba_DE_medias p = new prueba_DE_medias(ecko);
p.Media();
p.Limites();
String v="";
v=v+p.conclusion()+"\n";
jTextArea1.append(v);
}
private void jButton8MouseClicked(java.awt.event.MouseEvent evt) {
// prueba de varianza---------------------------------------------------------------------------------------------------------------------------------prueba_DE_varianza p= new prueba_DE_varianza( ecko );
p.media();
p.Varianza();
p.limites();
String v="";
v=v+p.conclusion()+"\n";
jTextArea1.append(v);
}
private void jButton11MouseClicked(java.awt.event.MouseEvent evt) {
// chi cuadrad--------------------------------------------------------------------prueba_DE_chicuadrada p= new prueba_DE_chicuadrada(ecko);
p.Oi();
p.estadisticaPrueba();
String v="";
v=v+p.conclusion()+"\n";
jTextArea1.append(v);
}
private void jButton12MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
}
private void jButton5MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
jTextArea1.setText("");
}
private void jButton14MouseClicked(java.awt.event.MouseEvent evt) {
String eck = jTextArea1.getText();
StringTokenizer st = new StringTokenizer (eck , "\n");
int cont =0;
int tam = st.countTokens();
// JOptionPane.showMessageDialog(null,tam);
ecko = new double [tam];
cv=tam;
while(st.hasMoreTokens())
{
String x = st.nextToken();
double valor = Double.parseDouble(x);
ecko [cont] = valor;
cont++;
//JOptionPane.showMessageDialog(null,valor);
}
}
// metodo de kolmogorov
public double ks (float []a){
quiksort (a,0,a.length-1);
float fn;
float d;
float dm;
dm=((float)(1/a.length)-a[0]);
if(dm<0)
dm=dm*(-1);
for(int i=0;i<a.length;i++){
fn=(float)(i+1)/a.length;
d=(float)fn-a[i];
if(d<0)
d=d*(-1);
if(d>dm) dm=d;
String v="";
v=v+dm+"\n";
jTextArea1.append(v);
}
return dm;
}
public void quiksort(float x[],int lo,int ho){
int l=lo, h=ho;
float mid,t;
if(ho>lo)
{
mid=x[(lo+ho)/2];
while(l<h)
{
while((l<ho)&&(x[l]<mid)) ++l;
while((h>lo)&&(x[h]>mid)) --h;
if(l<=h)
{
t = x[l];
x[l] = x[h];
x[h] = t;
++l;
--h;
}
}
if(lo<h) quiksort(x,lo,h);
if(l<ho) quiksort(x,l,ho);
}
}
public static void main(String args[]) {
/*
* Set the Nimbus look and feel
*/
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/*
* If Nimbus (introduced in Java SE 6) is not available, stay with the
* default look and feel. For details see
* http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Generador_Ale.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Generador_Ale.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Generador_Ale.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Generador_Ale.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
}
//</editor-fold>
Generador_Ale z = new Generador_Ale();
/*
* Create and display the form
*/
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Generador_Ale().setVisible(true);
}
});
}
{0.72575
0.74215 ,
{0.75804
0.77337 ,
{0.78814
0.80234 ,
{0.81594
0.82894 ,
{0.81594
0.82894 ,
{0.86433
0.87493 ,
{0.88493
0.89435 ,
{0.9032
0.91149 ,
{0.91924
0.92647 ,
{0.93319
0.93943 ,
{0.9452
0.95053 ,
{0.95543
0.95994 ,
{0.96407
0.96784 ,
{0.97128
0.97441 ,
{0.97725
0.97982 ,
{0.98214
0.98422 ,
{0.9861
0.98778 ,
{0.98928
0.99061 ,
{0.9918
0.99286 ,
{0.99379
0.99461 ,
{0.99534
0.99598 ,
{0.99653
0.99702 ,
{0.99744
0.99781 ,
{0.99813
0.99841 ,
{0.99865
0.99886 ,
{0.99903
0.99918 ,
{0.99931
0.99942 ,
{0.99952
0.9996 ,
,
0.72907 ,
0.73237 ,
0.73565 ,
0.73891 ,
0.74537 ,
0.74857 ,
0.75175 ,
0.7549 },
,
0.76115 ,
0.76424 ,
0.7673 ,
0.77035 ,
0.77637 ,
0.77935 ,
0.7823 ,
0.78524 },
,
0.79103 ,
0.79389 ,
0.79673 ,
0.79955 ,
0.80511 ,
0.80785 ,
0.81057 ,
0.81327 },
,
0.81859 ,
0.82121 ,
0.82381 ,
0.82639 ,
0.83147 ,
0.83398 ,
0.83646 ,
0.83891 },
,
0.81859 ,
0.82121 ,
0.82381 ,
0.82639 ,
0.83147 ,
0.83398 ,
0.83646 ,
0.83891 },
,
0.8665 ,
0.86864 ,
0.87076 ,
0.87286 ,
0.87698 ,
0.879 ,
0.881 ,
0.88298 },
,
0.88686 ,
0.88877 ,
0.89065 ,
0.89251 ,
0.89617 ,
0.89796 ,
0.89973 ,
0.90147 },
,
0.9049 ,
0.90658 ,
0.90824 ,
0.90988 ,
0.91308 ,
0.91466 ,
0.91621 ,
0.91774 },
,
0.92073 ,
0.9222 ,
0.92364 ,
0.92507 ,
0.92785 ,
0.92922 ,
0.93056 ,
0.93189 },
,
0.93448 ,
0.93574 ,
0.93699 ,
0.93822 ,
0.94062 ,
0.94179 ,
0.94295 ,
0.94408 },
,
0.9463 ,
0.94738 ,
0.94845 ,
0.9495 ,
0.95154 ,
0.95254 ,
0.95352 ,
0.95449 },
,
0.95637 ,
0.95728 ,
0.95818 ,
0.95907 ,
0.9608 ,
0.96164 ,
0.96246 ,
0.96327 },
,
0.96485 ,
0.96562 ,
0.96638 ,
0.96712 ,
0.96856 ,
0.96926 ,
0.96995 ,
0.97062 },
,
0.97193 ,
0.97257 ,
0.9732 ,
0.97381 ,
0.975 ,
0.97558 ,
0.97615 ,
0.9767 },
,
0.97778 ,
0.97831 ,
0.97882 ,
0.97932 ,
0.9803 ,
0.98077 ,
0.98124 ,
0.98169 },
,
0.98257 ,
0.983 ,
0.98341 ,
0.98382 ,
0.98461 ,
0.985 ,
0.98537 ,
0.98574 },
,
0.98645 ,
0.98679 ,
0.98713 ,
0.98745 ,
0.98809 ,
0.9884 ,
0.9887 ,
0.98899 },
,
0.98956 ,
0.98983 ,
0.9901 ,
0.99036 ,
0.99086 ,
0.99111 ,
0.99134 ,
0.99158 },
,
0.99202 ,
0.99224 ,
0.99245 ,
0.99266 ,
0.99305 ,
0.99324 ,
0.99343 ,
0.99361 },
,
0.99396 ,
0.99413 ,
0.9943 ,
0.99446 ,
0.99477 ,
0.99492 ,
0.99506 ,
0.9952 },
,
0.99547 ,
0.9956 ,
0.99573 ,
0.99585 ,
0.99609 ,
0.99621 ,
0.99632 ,
0.99643 },
,
0.99664 ,
0.99674 ,
0.99683 ,
0.99693 ,
0.99711 ,
0.9972 ,
0.99728 ,
0.99736 },
,
0.99752 ,
0.9976 ,
0.99767 ,
0.99774 ,
0.99788 ,
0.99795 ,
0.99801 ,
0.99807 },
,
0.99819 ,
0.99825 ,
0.99831 ,
0.99836 ,
0.99846 ,
0.99851 ,
0.99856 ,
0.99861 },
,
0.99869 ,
0.99874 ,
0.99878 ,
0.99882 ,
0.99889 ,
0.99893 ,
0.99896 ,
0.999 },
,
0.99906 ,
0.9991 ,
0.99913 ,
0.99916 ,
0.99921 ,
0.99924 ,
0.99926 ,
0.99929 },
,
0.99934 ,
0.99936 ,
0.99938 ,
0.9994 ,
0.99944 ,
0.99946 ,
0.99948 ,
0.9995 },
,
0.99953 ,
0.99955 ,
0.99957 ,
0.99958 ,
0.99961 ,
0.99962 ,
0.99964 ,
0.99965 },
{0.99966
,
0.99968 ,
0.99969 ,
0.9997 ,
0.99971 ,
0.99972 ,
0.99973 ,
0.99974 ,
0.99975 ,
0.99976 },
{0.99977
,
0.99978 ,
0.99978 ,
0.99979 ,
0.9998 ,
0.99981 ,
0.99981 ,
0.99982 ,
0.99983 ,
0.99983 },
{0.99984
,
0.99985 ,
0.99985 ,
0.99986 ,
0.99986 ,
0.99987 ,
0.99987 ,
0.99988 ,
0.99988 ,
0.99989 },
{0.99989
,
0.9999 ,
0.9999 ,
0.9999 ,
0.99991 ,
0.99991 ,
0.99992 ,
0.99992 ,
0.99992 ,
0.99992 },
{0.99993
,
0.99993 ,
0.99993 ,
0.99994 ,
0.99994 ,
0.99994 ,
0.99994 ,
0.99995 ,
0.99995 ,
0.99995 },
{0.99995
,
0.99995 ,
0.99996 ,
0.99996 ,
0.99996 ,
0.99996 ,
0.99996 ,
0.99996 ,
0.99997 ,
0.99997 },
{0.99997
,
0.99997 ,
0.99997 ,
0.99997 ,
0.99997 ,
0.99997 ,
0.99998 ,
0.99998 ,
0.99998 ,
0.99998 }};
public prueba_DE_medias( double raux []) {
r=raux;
}
public void Media(){//calculo de la media
double media=0;
for (int i=0;i<cv;i++){
media=media+r[i];
}
med= media/cv;
}
public void Limites(){
double Zvalor=0 ;// valor de Z en la distribucion normal
int decima=0;
int centecima=0;
double condicion=1-alfa/2;//condicion de busqueda de Z en la tabla
for (int i =0;i<41;i++)
{
for (int j=0;j<10;j++)
{
if (z[i][j]<=condicion){decima =i;centecima=j;}
}
}
Zvalor =((decima*0.1)+(centecima*0.01));
LI=0.5-Zvalor*(1/Math.sqrt(cv*12));
LS=0.5+Zvalor*(1/Math.sqrt(cv*12));
}
String conclusion (){
String salida="";
if (med<LS|| med>LI){
salida="Media: "+med+"\nLimite Inferiror : "+LI+"\nLimite Superior: "+LS+
"\n Por lo tanto el conjunto Ri tiene un valor esperado de 0.5 con un
nivel de aceptacion de 1- a ";
}
else {
salida="Media: "+med+"\nLimite Inferiror : "+LI+"\nLimite Superior: "+LS+
"\nPor lo tanto el conjunto Ri NO tiene un valor esperado de 0.5 con un
nivel de aceptacion de 1- a ";
}
return salida;
}
{34.5274,
19.8119,
13.6356,
{36.1239,
21.0641,
14.6853,
{37.6978,
22.3071,
15.7332,
{39.2518,
23.5418,
16.7795,
{40.7911,
24.7690,
17.8244,
{42.3119,
25.9894,
18.8679,
{43.8194,
27.2036,
19.9102,
{45.3142,
28.4120,
20.9514,
{46.7963,
29.6151,
21.9915,
{48.2676,
30.8133,
23.0307,
{49.7276,
32.0069,
24.0689,
{51.1790,
33.1962,
25.1064,
{52.6187,
34.3816,
26.1430,
{54.0511,
35.5632,
27.1789,
{55.4751,
36.7412,
28.2141,
{56.8918,
37.9159,
29.2486,
{58.3006,
39.0875,
30.2825,
{59.7022,
40.2560,
31.3159,
31.8830,
18.2020,
12.9717,
33.4262,
19.4062,
13.9961,
34.9494,
20.6030,
15.0197,
36.4555,
21.7931,
16.0425,
37.9462,
22.9770,
17.0646,
39.4220,
24.1555,
18.0860,
40.8847,
25.3289,
19.1069,
42.3358,
26.4976,
20.1272,
43.7749,
27.6620,
21.1470,
45.2041,
28.8224,
22.1663,
46.6231,
29.9792,
23.1852,
48.0336,
31.1325,
24.2037,
49.4351,
32.2825,
25.2218,
50.8291,
33.4295,
26.2395,
52.2152,
34.5736,
27.2569,
53.5939,
35.7150,
28.2740,
54.9662,
36.8538,
29.2908,
56.3325,
37.9902,
30.3073,
29.8193,
16.9848,
12.3398},
31.3194,
18.1508,
13.3393},
32.8015,
19.3107,
14.3389},
34.2671,
20.4651,
15.3385},
35.7184,
21.6146,
16.3382},
37.1564,
22.7595,
17.3379},
38.5821,
23.9004,
18.3376},
39.9969,
25.0375,
19.3374},
41.4009,
26.1711,
20.3372},
42.7957,
27.3015,
21.3370},
44.1814,
28.4288,
22.3369},
45.5584,
29.5533,
23.3367},
46.9280,
30.6752,
24.3366},
48.2898,
31.7946,
25.3365},
49.6450,
32.9117,
26.3363},
50.9936,
34.0266,
27.3362},
52.3355,
35.1394,
28.3361},
53.6719,
36.2502,
29.3360},
27.6882,
15.9839,
24.7356,
15.1187,
22.3620,
14.3451,
29.1412,
17.1169,
26.1189,
16.2221,
23.6848,
15.4209,
30.5780,
18.2451,
27.4884,
17.3217,
24.9958,
16.4940,
31.9999,
19.3689,
28.8453,
18.4179,
26.2962,
17.5646,
33.4087,
20.4887,
30.1910,
19.5110,
27.5871,
18.6330,
34.8052,
21.6049,
31.5264,
20.6014,
28.8693,
19.6993,
36.1908,
22.7178,
32.8523,
21.6891,
30.1435,
20.7638,
37.5663,
23.8277,
34.1696,
22.7745,
31.4104,
21.8265,
38.9322,
24.9348,
35.4789,
23.8578,
32.6706,
22.8876,
40.2894,
26.0393,
36.7807,
24.9390,
33.9245,
23.9473,
41.6383,
27.1413,
38.0756,
26.0184,
35.1725,
25.0055,
42.9798,
28.2412,
39.3641,
27.0960,
36.4150,
26.0625,
44.3140,
29.3388,
40.6465,
28.1719,
37.6525,
27.1183,
45.6416,
30.4346,
41.9231,
29.2463,
38.8851,
28.1730,
46.9628,
31.5284,
43.1945,
30.3193,
40.1133,
29.2266,
48.2782,
32.6205,
44.4608,
31.3909,
41.3372,
30.2791,
49.5878,
33.7109,
45.7223,
32.4612,
42.5569,
31.3308,
50.8922,
34.7997,
46.9792,
33.5302,
43.7730,
32.3815,
{61.0980,
57.6921,
41.4217,
39.1244,
32.3486,
31.3235,
{62.4873,
59.0461,
42.5847,
40.2563,
33.3809,
32.3394,
{63.8694,
60.3953,
43.7452,
41.3861,
34.4126,
33.3551,
{65.2471,
61.7382,
44.9032,
42.5140,
35.4438,
34.3706,
{66.6192,
63.0760,
46.0588,
43.6399,
36.4746,
35.3858,
{67.9850,
64.4097,
47.2122,
44.7641,
37.5049,
36.4008,
{69.3476,
65.7384,
48.3634,
45.8864,
38.5348,
37.4156,
{70.7039,
67.0628,
49.5126,
47.0072,
39.5643,
38.4302,
{72.0550,
68.3830,
50.6598,
48.1263,
40.5935,
39.4446,
{73.4029,
69.6987,
51.8050,
49.2438,
41.6222,
40.4589,
};
double Xcuadrada2[][]={
{0.55,
0.6,
0.65, 0.7,
55.0025,
37.3591,
30.3359},
56.3280,
38.4663,
31.3359},
57.6483,
39.5718,
32.3358},
58.9637,
40.6756,
33.3357},
60.2746,
41.7780,
34.3356},
61.5811,
42.8788,
35.3356},
62.8832,
43.9782,
36.3355},
64.1812,
45.0763,
37.3354},
65.4753,
46.1730,
38.3354},
66.7660,
47.2685,
39.3353}
0.75, 0.8,
52.1914,
35.8871,
48.2319,
34.5981,
44.9853,
33.4314,
53.4857,
36.9730,
49.4804,
35.6649,
46.1942,
34.4804,
54.7754,
38.0575,
50.7251,
36.7307,
47.3999,
35.5287,
56.0609,
39.1408,
51.9660,
37.7954,
48.6024,
36.5763,
57.3420,
40.2228,
53.2033,
38.8591,
49.8018,
37.6231,
58.6192,
41.3036,
54.4373,
39.9220,
50.9985,
38.6693,
59.8926,
42.3833,
55.6680,
40.9839,
52.1923,
39.7148,
61.1620,
43.4619,
56.8955,
42.0450,
53.3835,
40.7597,
62.4281,
44.5395,
58.1201,
43.1053,
54.5722,
41.8040,
63.6908,
45.6160,
59.3417,
44.1649,
55.7585,
42.8477,
0.85, 0.9,
0.999},
{0.3573, 0.2750,
0.0000, 0.0000, 0.0000},
{1.1957, 1.0217,
0.0100, 0.0050, 0.0020},
{2.1095, 1.8692,
0.0717, 0.0449, 0.0243},
{3.0469, 2.7528,
0.2070, 0.1449, 0.0908},
{3.9959, 3.6555,
0.4118, 0.3075, 0.2102},
{4.9519, 4.5702,
0.6757, 0.5266, 0.3810},
{5.9125, 5.4932,
0.9893, 0.7945, 0.5985},
{6.8766, 6.4226,
1.3444, 1.1042, 0.8571},
{7.8434, 7.3570,
1.7349, 1.4501, 1.1519},
{8.8124, 8.2955,
2.1558, 1.8274, 1.4787},
{9.7831, 9.2373,
2.6032, 2.2321, 1.8338},
{10.7553, 10.1820, 9.6115, 9.0343, 8.4384, 7.8073, 7.1138, 6.3038, 5.2260, 4.4038, 3.5706,
3.0738, 2.6612, 2.2141},
{11.7288, 11.1291, 10.5315, 9.9257, 9.2910, 8.6339, 7.9008, 7.0415, 5.8919, 5.0087, 4.1069,
3.5650, 3.1118, 2.6172},
{12.7034, 12.0785, 11.4548, 10.8215, 10.1653, 9.4673, 8.6963, 7.7895, 6.5706, 5.6287, 4.6604,
4.0747, 3.5820, 3.0407},
{13.6790, 13.0298, 12.3809, 11.7212, 11.0365, 10.3070, 9.4993, 8.5468, 7.2609, 6.2621, 5.2294,
4.6009, 4.0697, 3.4825},
{14.6555, 13.9827, 13.3096, 12.6243, 11.9122, 11.1521, 10.3090, 9.3122, 7.9616, 6.9077, 5.8122,
5.1422, 4.5734, 3.9417},
{15.6328, 14.9373, 14.2406, 13.5307, 12.7919, 12.0023, 11.1249, 10.0852, 8.6718, 7.5642, 6.4077,
5.6973, 5.0916, 4.4162},
{16.6108, 15.8932, 15.1738, 14.4399, 13.6753, 12.8570, 11.9462, 10.8649, 9.3904, 8.2307, 7.0149,
6.2648, 5.6234, 4.9048},
{17.5894, 16.8504, 16.1089, 15.3517, 14.5620, 13.7158, 12.7727, 11.6509, 10.1170, 8.9065,
7.6327, 6.8439, 6.1673, 5.4067},
{18.5687, 17.8088, 17.0458, 16.2659, 15.4518, 14.5784, 13.6039, 12.4426, 10.8508, 9.5908,
8.2604, 7.4338, 6.7228, 5.9210},
{19.5485, 18.7683, 17.9843, 17.1823, 16.3444, 15.4446, 14.4393, 13.2396, 11.5913, 10.2829,
8.8972, 8.0336, 7.2889, 6.4467},
{20.5288, 19.7288, 18.9243, 18.1007, 17.2396, 16.3140, 15.2787, 14.0415, 12.3380, 10.9823,
9.5425, 8.6427, 7.8648, 6.9829},
{21.5095, 20.6902, 19.8657, 19.0211, 18.1373, 17.1865, 16.1219, 14.8480, 13.0905, 11.6885,
10.1957, 9.2604, 8.4503, 7.5291},
{22.4908, 21.6525, 20.8084, 19.9432, 19.0373, 18.0618, 16.9686, 15.6587, 13.8484, 12.4011,
10.8563, 9.8862, 9.0441, 8.0847},
{23.4724, 22.6156, 21.7524, 20.8670, 19.9393, 18.9397, 17.8184, 16.4734, 14.6114, 13.1197,
11.5240, 10.5196, 9.6462, 8.6494},
{24.4544, 23.5794, 22.6975, 21.7924, 20.8434, 19.8202, 18.6714, 17.2919, 15.3792, 13.8439,
12.1982, 11.1602, 10.2561, 9.2222},
{25.4367, 24.5440, 23.6437, 22.7192, 21.7494, 20.7030, 19.5272, 18.1139, 16.1514, 14.5734,
12.8785, 11.8077, 10.8733, 9.8029},
{26.4195, 25.5092, 24.5909, 23.6475, 22.6572, 21.5880, 20.3857, 18.9392, 16.9279, 15.3079,
13.5647, 12.4613, 11.4973, 10.3907},
{27.4025, 26.4751, 25.5391, 24.5770, 23.5666, 22.4751, 21.2468, 19.7677, 17.7084, 16.0471,
14.2564, 13.1211, 12.1278, 10.9861},
{28.3858, 27.4416, 26.4881, 25.5078, 24.4776, 23.3641, 22.1103, 20.5992, 18.4927, 16.7908,
14.9535, 13.7867, 12.7646, 11.5876},
{29.3694, 28.4087, 27.4381, 26.4397, 25.3901, 24.2551, 22.9762, 21.4336, 19.2806, 17.5387,
15.6555, 14.4577, 13.4073, 12.1961},
{30.3533, 29.3763, 28.3889, 27.3728, 26.3041, 25.1478, 23.8442, 22.2706, 20.0719, 18.2908,
16.3622, 15.1340, 14.0555, 12.8104},
{31.3375, 30.3444, 29.3405, 28.3069, 27.2194, 26.0422, 24.7143, 23.1102, 20.8665, 19.0467,
17.0735, 15.8152, 14.7092, 13.4312},
{32.3219, 31.3130, 30.2928, 29.2421, 28.1361, 26.9383, 25.5864, 23.9522, 21.6643, 19.8062,
17.7891, 16.5013, 15.3679, 14.0568},
{33.3065, 32.2821, 31.2458, 30.1782, 29.0540, 27.8359, 26.4604, 24.7966, 22.4650, 20.5694,
18.5089, 17.1917, 16.0315, 14.6881},
{34.2913, 33.2517, 32.1995, 31.1152, 29.9730, 28.7350, 27.3363, 25.6433, 23.2686, 21.3359,
19.2326, 17.8868, 16.7000, 15.3243},
{35.2764, 34.2216, 33.1539, 32.0532, 30.8933, 29.6355, 28.2138, 26.4921, 24.0749, 22.1056,
19.9603, 18.5859, 17.3730, 15.9652},
{36.2617, 35.1920, 34.1089, 32.9919, 31.8146, 30.5373, 29.0931, 27.3430, 24.8839, 22.8785,
20.6914, 19.2888, 18.0501, 16.6109},
{37.2472, 36.1628, 35.0645, 33.9315, 32.7369, 31.4405, 29.9739, 28.1958, 25.6954, 23.6543,
21.4261, 19.9958, 18.7318, 17.2612},
{38.2328, 37.1340, 36.0207, 34.8719, 33.6603, 32.3449, 30.8563, 29.0505, 26.5093, 24.4331,
22.1642, 20.7066, 19.4171, 17.9166}
};
valorXmax=Xcuadrada[cv-1][i];}}
}
String conclusion(){
String mensaje ="";
if (varianza >LI ||varianza<LS){
mensaje ="Varianza: "+varianza+"\nLimite Inferiror : "+LI+"\nLimite Superior: "+LS+
"\nPor lo tanto el conjunto Ri tiene una varianza de 1/12 con un nivel
de aceptacion de 1- a ";
}
else{
mensaje ="Varianza: "+varianza+"\nLimite Inferiror : "+LI+"\nLimite Superior: "+LS+
"\nPor lo tanto el conjunto Ri NO tiene una varianza de 1/12 con un
nivel de aceptacion de 1- a ";
}
return mensaje;
}
}
0.4,
0.8735,
5.9915,
2.0996,
7.8147,
3.2831,
9.4877,
4.4377,
11.0705,
5.5731,
12.5916,
6.6948,
14.0671,
7.8061,
15.5073,
8.9094,
16.9190,
10.006,
18.3070,
11.0971,
19.6752,
12.1836,
21.0261,
13.2661,
22.3620,
14.3451,
{36.1239,
21.0641,
14.6853,
{37.6978,
22.3071,
15.7332,
{39.2518,
23.5418,
16.7795,
{40.7911,
24.7690,
17.8244,
{42.3119,
25.9894,
18.8679,
{43.8194,
27.2036,
19.9102,
{45.3142,
28.4120,
20.9514,
{46.7963,
29.6151,
21.9915,
{48.2676,
30.8133,
23.0307,
{49.7276,
32.0069,
24.0689,
{51.1790,
33.1962,
25.1064,
{52.6187,
34.3816,
26.1430,
{54.0511,
35.5632,
27.1789,
{55.4751,
36.7412,
28.2141,
{56.8918,
37.9159,
29.2486,
{58.3006,
39.0875,
30.2825,
{59.7022,
40.2560,
31.3159,
{61.0980,
41.4217,
32.3486,
33.4262,
19.4062,
13.9961,
34.9494,
20.6030,
15.0197,
36.4555,
21.7931,
16.0425,
37.9462,
22.9770,
17.0646,
39.4220,
24.1555,
18.0860,
40.8847,
25.3289,
19.1069,
42.3358,
26.4976,
20.1272,
43.7749,
27.6620,
21.1470,
45.2041,
28.8224,
22.1663,
46.6231,
29.9792,
23.1852,
48.0336,
31.1325,
24.2037,
49.4351,
32.2825,
25.2218,
50.8291,
33.4295,
26.2395,
52.2152,
34.5736,
27.2569,
53.5939,
35.7150,
28.2740,
54.9662,
36.8538,
29.2908,
56.3325,
37.9902,
30.3073,
57.6921,
39.1244,
31.3235,
31.3194,
18.1508,
13.3393},
32.8015,
19.3107,
14.3389},
34.2671,
20.4651,
15.3385},
35.7184,
21.6146,
16.3382},
37.1564,
22.7595,
17.3379},
38.5821,
23.9004,
18.3376},
39.9969,
25.0375,
19.3374},
41.4009,
26.1711,
20.3372},
42.7957,
27.3015,
21.3370},
44.1814,
28.4288,
22.3369},
45.5584,
29.5533,
23.3367},
46.9280,
30.6752,
24.3366},
48.2898,
31.7946,
25.3365},
49.6450,
32.9117,
26.3363},
50.9936,
34.0266,
27.3362},
52.3355,
35.1394,
28.3361},
53.6719,
36.2502,
29.3360},
55.0025,
37.3591,
30.3359},
29.1412,
17.1169,
26.1189,
16.2221,
23.6848,
15.4209,
30.5780,
18.2451,
27.4884,
17.3217,
24.9958,
16.4940,
31.9999,
19.3689,
28.8453,
18.4179,
26.2962,
17.5646,
33.4087,
20.4887,
30.1910,
19.5110,
27.5871,
18.6330,
34.8052,
21.6049,
31.5264,
20.6014,
28.8693,
19.6993,
36.1908,
22.7178,
32.8523,
21.6891,
30.1435,
20.7638,
37.5663,
23.8277,
34.1696,
22.7745,
31.4104,
21.8265,
38.9322,
24.9348,
35.4789,
23.8578,
32.6706,
22.8876,
40.2894,
26.0393,
36.7807,
24.9390,
33.9245,
23.9473,
41.6383,
27.1413,
38.0756,
26.0184,
35.1725,
25.0055,
42.9798,
28.2412,
39.3641,
27.0960,
36.4150,
26.0625,
44.3140,
29.3388,
40.6465,
28.1719,
37.6525,
27.1183,
45.6416,
30.4346,
41.9231,
29.2463,
38.8851,
28.1730,
46.9628,
31.5284,
43.1945,
30.3193,
40.1133,
29.2266,
48.2782,
32.6205,
44.4608,
31.3909,
41.3372,
30.2791,
49.5878,
33.7109,
45.7223,
32.4612,
42.5569,
31.3308,
50.8922,
34.7997,
46.9792,
33.5302,
43.7730,
32.3815,
52.1914,
35.8871,
48.2319,
34.5981,
44.9853,
33.4314,
{62.4873,
42.5847,
33.3809,
{63.8694,
43.7452,
34.4126,
{65.2471,
44.9032,
35.4438,
{66.6192,
46.0588,
36.4746,
{67.9850,
47.2122,
37.5049,
{69.3476,
48.3634,
38.5348,
{70.7039,
49.5126,
39.5643,
{72.0550,
50.6598,
40.5935,
{73.4029,
51.8050,
41.6222,
};
59.0461,
40.2563,
32.3394,
60.3953,
41.3861,
33.3551,
61.7382,
42.5140,
34.3706,
63.0760,
43.6399,
35.3858,
64.4097,
44.7641,
36.4008,
65.7384,
45.8864,
37.4156,
67.0628,
47.0072,
38.4302,
68.3830,
48.1263,
39.4446,
69.6987,
49.2438,
40.4589,
56.3280,
38.4663,
31.3359},
57.6483,
39.5718,
32.3358},
58.9637,
40.6756,
33.3357},
60.2746,
41.7780,
34.3356},
61.5811,
42.8788,
35.3356},
62.8832,
43.9782,
36.3355},
64.1812,
45.0763,
37.3354},
65.4753,
46.1730,
38.3354},
66.7660,
47.2685,
39.3353}
53.4857,
36.9730,
49.4804,
35.6649,
46.1942,
34.4804,
54.7754,
38.0575,
50.7251,
36.7307,
47.3999,
35.5287,
56.0609,
39.1408,
51.9660,
37.7954,
48.6024,
36.5763,
57.3420,
40.2228,
53.2033,
38.8591,
49.8018,
37.6231,
58.6192,
41.3036,
54.4373,
39.9220,
50.9985,
38.6693,
59.8926,
42.3833,
55.6680,
40.9839,
52.1923,
39.7148,
61.1620,
43.4619,
56.8955,
42.0450,
53.3835,
40.7597,
62.4281,
44.5395,
58.1201,
43.1053,
54.5722,
41.8040,
63.6908,
45.6160,
59.3417,
44.1649,
55.7585,
42.8477,