Skip to content

Milor123/Estadistica-statistic-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Descriptive statistics

Description


This algorithm allows you to do calculations in statistic descriptive in one way very easy, because you only need paste the data and run the script

What can calculate?:

Information Tables with Figures Examples
Min value Absolute Frecuency Histogram See Figures
Max value Mark of class Frequency polygon Results - Resultados
Old range (Range) Relative Frecuency Ascending Ogive
Range (New Range) Cumulative Absolute Frequency Descending Ogive
Size of interval class Ogive Ascending and Descending
Old amplitude (Amplitude) Circle Dragram
Amplitude (New Amplitude)
Old excess (Excess)
Excess (New Excess)
Maximun sample size
Mark of class
Simple frequency

Table of Contents

  1. Description
  2. Table of contens
  3. Requeriments
    1. Basic requeriments
    2. How install pip
  4. How use
    1. First step
    2. Example
    3. Optional step
    4. Results
  5. Copyright and license

Requeriments


You must have a version of python as indicated below or greater, but but this does not support python 3x

  • python 2.7x
    • Windows : Download
    • Debian / Ubuntu: sudo apt-get install python2.7
  • matplotlib
    • pip install matplotlib
    • Debian / Ubuntu : sudo apt-get install python-matplotlib
    • Fedora / Redhat : sudo yum install python-matplotlib
  • numpy (This is included in matplotlib)
    • pip install numpy
  • astropy Optional Instalation
    • pip install --no-deps astropy

How install pip?


How use the algorithm?##


First Step

Copy the text of estadistica.py in any text editor, in windows for example you could use notepad, then paste it and save the file as any_name.py, with .py extension.

Now follows these steps:

You must write the information within self.data, if you need exact calculation, you should add a decimal value in any number, example the first number is 60, change it by 60.0 and then the rest will be changed automatically when you run the script

You can add:

  • numbers
  • spaces
  • jump of lines
  • dot for decimals (decimal numbers)

Warning: Don't Use commas ,

Example:

self.data = """
60 66 77 70 66 68 57 70
      66 52 75 65 69 71 58 66 67 74 61
63 69 80 59 66        70 67 
78 75 64 71 81 62 64 69 68 72 83 56
65 74 67 54 65 65 69 61 67 73 57 62     67 68 63 
67 71 68 76
   61 62 63 76 61 67
   67 64 72 64 73 79 58 67 71 68 59 69 70
66 62 
63 66

"""

Optional Step

if you want see a pretty tables:

sees the penultimate line of code and change it.printme(0) by it.printme(1), because 1 enables astropy tables, which are nice, however if you cant install astropy could use 0 by default.

Executing file

How execute file?:

Information Obtained After Execute:

Datos ordenados - Organized information
[52, 54, 56, 57, 57, 58, 58, 59, 59, 60, 61, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 63, 64, 64, 64, 64, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 70, 70, 70, 70, 71, 71, 71, 71, 72, 72, 73, 73, 74, 74, 75, 75, 76, 76, 77, 78, 79, 80, 81, 83]

Frecuencia Simple - Simple frequency
[{52: 1}, {54: 1}, {56: 1}, {57: 2}, {58: 2}, {59: 2}, {60: 1}, {61: 4}, {62: 4}, {63: 4}, {64: 4}, {65: 4}, {66: 7}, {67: 9}, {68: 5}, {69: 5}, {70: 4}, {71: 4}, {72: 2}, {73: 2}, {74: 2}, {75: 2}, {76: 2}, {77: 1}, {78: 1}, {79: 1}, {80: 1}, {81: 1}, {83: 1}]

(Dato Minimo - Max value) : 52
(Dato Maximo - Min Value) : 83
(Viejo Rango - Old range) : 31
(Rango - Range) : 32
(Tamano de Clase- Size of class) : 7
(Vieja Amplitud - Old amplitude) : 4
(Amplitud - Amplitude) : 5
(Viejo Exceso - Old excess) : 3
(Exceso - Excess) : -3
(Tamano Muestra - Sample size) : 80
(Marca de clase - Mark of class) : [54, 59, 64, 69, 74, 79, 84]

El orden es: intervalos, frecuencia absoluta, frecuencia absoluta acomulada, frecuencia realtiva, marca de clase
Order is: Intervals, Absolute frequency, Cumulative absolute frequency, relative frequency, mark of class

Astropy Table

Intervals  fi  Fi    fr    xi
--------- --- --- ------- ---
   52, 57   3   3  3.75 %  54
   57, 62  11  14 13.75 %  59
   62, 67  23  37 28.75 %  64
   67, 72  27  64 33.75 %  69
   72, 77  10  74  12.5 %  74
   77, 82   5  79  6.25 %  79
   82, 87   1  80  1.25 %  84

Default Table

________________________________________________________________________
|  52, 57  |  3  |  3  |  3.75 %  |  54  |
|  57, 62  |  11  |  14  |  13.75 %  |  59  |
|  62, 67  |  23  |  37  |  28.75 %  |  64  |
|  67, 72  |  27  |  64  |  33.75 %  |  69  |
|  72, 77  |  10  |  74  |  12.5 %  |  74  |
|  77, 82  |  5  |  79  |  6.25 %  |  79  |
|  82, 87  |  1  |  80  |  1.25 %  |  84  |
_________________________________________________________________________
Intervals, fi ,  Fi , fr , xi 

Figures

Figures

Copyright and license

Code copyright 2016-2020 Mateo Bohorquez. Code released under the MIT license

About

Script for calculus of Descriptive statistics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages