Estadiostica

Solo disponible en BuenasTareas
  • Páginas : 2 (287 palabras )
  • Descarga(s) : 0
  • Publicado : 7 de noviembre de 2010
Leer documento completo
Vista previa del texto
Batres Hernández David Osmar 09-Septiembre-2010

Estadística
Programa para:
a) Acomodode datos de menor a mayor
b) Sacar Total de Datos
c) Sacar Dato mayor y dato menor
d) Sacar número de clases
e) Sacar intervalo de clase
f) Sacar Frecuenciag) Graficar

Private Sub Command1_Click()

Open "datos.txt" For Output As #1
Close #1

Open "datos.txt" For Append As #1
t = Val(InputBox("total dedatos"))
For i = 1 To t
datos = Val(InputBox("escribir datos de problema"))
Write #1, datos
Next i
Close #1
End Sub

Private Sub Command2_Click()

Open"datos.txt" For Input As #1
Do While Not EOF(1)
n = n + 1
Input #1, a(n)
Loop
Close (1)

Do
cambio = 0
For i = 1 To n - 1
If a(i) > a(i + 1) Then
z =a(i)
a(i) = a(i + 1)
a(i + 1) = z
cambio = 1
End If
Next i
Loop Until cambio = 0
For i = 1 To n
List1.AddItem a(i)
Next i

b = Fix((Log(n)) / (Log(2))) +1
List2.AddItem b

datomayor = a(n)
List5.AddItem datomayor

datomenor = a(1)
List6.AddItem datomenor

ic = (datomayor - datomenor) / b
List7.AddItemic

For f = 1 To b
intervalos(f) = datomenor + (ic * f)
List3.AddItem intervalos(f)
Next f

intervalos(0) = 0
For f = 1 To b
For i = 1 To n
If a(i) <=intervalos(f) And a(i) > intervalos(f - 1) Then
frecuencia(f) = frecuencia(f) + 1
End If
Next i
Next f

For f = 1 To b
List4.AddItem frecuencia(f)Next f

End Sub

Private Sub Command3_Click()
For i = 1 To 50
For j = 1 To 5000 Step 10

Next i

End Sub

Private Sub Command4_Click()
End
End Sub
tracking img