Estadistica

Páginas: 12 (2778 palabras) Publicado: 16 de abril de 2012
Lab 1

Intro MATLAB
Data descrip.
Graph. Repr.
Position
measures
Dispersion
measures

Introduction to MATLAB/Octave and
Descriptive Statistics1
Telecommunications Engineering

Descrip. of 2
variables

Department of Statistics
Universidad Carlos III de Madrid

Academic year 2009/2010

1 Review

files Descriptive 1 and Descriptive 2
1 / 42

Lab 1

Summary
Intro MATLABData descrip.
Graph. Repr.
Position
measures

1

Introduction to MATLAB/Octave’s environment

2

Description of a data set

3

Graphical Representation

4

Position measures

5

Dispersion measures

6

Joint description of two variables

Dispersion
measures
Descrip. of 2
variables

2 / 42

Lab 1

Summary
Intro MATLAB
Data descrip.
Graph. Repr.
Positionmeasures

1

Introduction to MATLAB/Octave’s environment

2

Description of a data set

3

Graphical Representation

4

Position measures

5

Dispersion measures

6

Joint description of two variables

Dispersion
measures
Descrip. of 2
variables

3 / 42

Lab 1

Main window in MATLAB
Intro MATLAB
Data descrip.
Graph. Repr.
Current Directory

Positionmeasures
Dispersion
measures
Descrip. of 2
variables

Workspace
Command Window

Command History

4 / 42

Lab 1

Working directory (Current Directory):
Intro MATLAB

Especify directory: C:/.../

Data descrip.

for example: C:/lab1/

Graph. Repr.
Position
measures
Dispersion
measures
Descrip. of 2
variables

Here you can save the functions *.m created

working space(Workspace).
Here you can view all variables and functions loaded.

Window to type commands (Command Window).
Console where you type the commands to execute.

Command History
Here you can see all commands typed in the Command Window

Useful files for Lab 1
Download from the webpage the next files internet.mat,
AlumnosIndustriales.mat and histg.m here

5 / 42

Lab 1

Summary
IntroMATLAB
Data descrip.
Graph. Repr.
Position
measures

1

Introduction to MATLAB/Octave’s environment

2

Description of a data set

3

Graphical Representation

4

Position measures

5

Dispersion measures

6

Joint description of two variables

Dispersion
measures
Descrip. of 2
variables

6 / 42

Lab 1

Example: failures
Intro MATLAB
Data descrip.
Graph.Repr.
Position
measures

Next table summarizes the number of failures in 40 electric central
stations (the table shown is incomplete):

Dispersion
measures
Descrip. of 2
variables

Central Station

No failures

1
2
3
4
.
.
.

1
3
2
2
.
.
.

39
40

1
2

7 / 42

Lab 1

Example: failures
Intro MATLAB
Data descrip.
Graph. Repr.

In MATLAB, we insert dataover the command window

Position
measures
Dispersion
measures
Descrip. of 2
variables

>> averias=[ 1; 3; 2; 2; 0; 3; 1; 0; 2; 1; 0; 1; 0; 3; 0; 2;
0; 2; 1; 1; 1; 0; 2; 3; 0; 0; 0; 0; 1; 1; 4; 0;
3; 1; 0; 2; 1; 1; 1; 2 ]

We have created the column vector averias
averias =
1
3
2
2
...

8 / 42

Lab 1

Example: failures
Intro MATLAB
Data descrip.
Graph. Repr.
Positionmeasures

The command tabulate, calculate the absolute frequencies (Count)
and the relative (in %) (Percent)

Dispersion
measures
Descrip. of 2
variables

>> tabulate(averias)
Value
0
1
2
3
4

Count
13
13
8
5
1

Percent
32.50%
32.50%
20.00%
12.50%
2.50%

9 / 42

Lab 1

Example: failures
Intro MATLAB
Data descrip.
Graph. Repr.
Position
measures

To managethe table as a matrix, we name it tabla. Now we can
access to their elements easily.
>> tabla = tabulate(averias)

Dispersion
measures
Descrip. of 2
variables

For instance, we can represent the relative frequencies between 0 and
1, rather than in %
>> tabla(:,3) = tabla(:,3)/100
tabla =
0
1.0000
2.0000
3.0000
4.0000

13.0000
13.0000
8.0000
5.0000
1.0000

0.3250
0.3250...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Estadistica
  • Estadistica
  • Estadistica
  • Estadistica
  • Estadistica
  • Estadisticas
  • Estadistica
  • Estadistica

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS