# A brief introduction to Minitab

## INTRODUCTION

### In suns, to access minitab type the command:

` bingsun2% minitab `

### Minitab will then start up with the following prompt:

```
MINITAB Statistical Software, Enhanced Version
Release 9.1 for SUN

JULY 14, 2000 - SUNY - BINGHAMTON

Worksheet size: 8000 cells

For information on:            Type:
--------------------------     ---------------
How to use Minitab             HELP
Customer service               HELP OVERVIEW 14
Documentation                  HELP OVERVIEW 15
What's new in this release     NEWS

MTB>  ```

### When you run a minitab session you will get a worksheet of data to you can do arithmetic and statistical manipulations. The worksheet consists of a sheet of constants (denoted K1, K2, K3, ...), columns (denoted C1, C2, C3, ...) and matrices (denoted M1, M2, M3, ...). To store data in the constant K1, use

`MTB> let k1=990             `

### To store data in the vector C1, use

```MTB> set c1
MTB> 11 14 15 15 3
MTB> end```

### You can name variables:

`MTB> name c1 'age'            `

### At any point in the session, you can find out what is in the worksheet (all k's, c's and m's that you have defined) typing

```MTB>  INFO
Column   Name          Count
C1                         5

Constant Name          Value
K1                     990.000```

### You can do operations and statistical manipulations with the data in your worksheet by inputting commands. For example, the command

`MTB> let c3=c1+c2`

### Adds the vectors c1 and c2 and stores the result in C3 in your worksheet. You need to have defined c1 and c2 before hand. After you do this, you do not see c3 in your screen. To see c3, use print. For example, with the previous entered data:

```MTB> let c2=c1+k1
MTB>  print c2

C2
1001   1004   1005   1005    993 ```

## GETTING HELP ON MINITAB

### There is a online help, that gives you plenty of information in how to use minitab, for example if you type

``` MTB>  help
* You are using MINITAB Statistical Software, Enhanced Version *

To see:                        Type:
-----------------------------  ---------------------------------
A list of all command topics   HELP COMMANDS
A list of all overview topics  HELP OVERVIEW
Information on a command       HELP commandname [subcommandname]
-----------------------------  ---------------------------------

For example:   HELP COMMANDS
HELP PLOT
HELP PLOT TITLE

To leave Minitab, type STOP.```

### If you type :

`MTB>  help regression  `

### you get help in the command regression. If you type :

`MTB>  help regr resi `

```
MTB> quit
MTB> stop
```

## TYPES OF FILES

### If the worksheet is stored, this file will have the ending .MTW. To save the worksheet (the data in the minitab memory; c's and k's that you have defined) type:

`MTB>  save  'file' `

### This command will store your current worksheet in the file 'filename.MTW' To come back to that worksheet, you can retrieve it by typing :

```MTB>  retr 'filename'
```

```

## ENTERING DATA

### Minitab can store numbers in: To enter the value of constants you can do

`MTB> let k1=990             `

### To enter the value of vector you can do

```MTB> set c1
MTB> 11 14 15 15 3
MTB> end```

### or

```MTB> READ  C1  C2
DATA>     23 21
DATA>    25 17
DATA>     40 52
DATA>     56 30
DATA>     12 19
DATA>     END```

### You also can enter patterned data from the Session window. For example,

```MTB>  set c6
DATA> 1:4 3(30) 2(7)
DATA> end

puts 1 2 3 4 30 30 30 7 7 into column c6.

You also can create a data a unix with data and pass this
data to the worksheet doing:

Altenatively, you also can pass your data from the worksheet into unix by doing:

MTB>  write c1   'file'
In your unix directory the file will be ending in .DAT. These commands work with several columns and matrices (see the minitab help). ```

## SOME ARITHMETIC COMMANDS

```It is possible to do simple arithmetic (add, subtract, multiply and divide and square roots). The next commands are self explanatory:

MTB>  let c3=c1+c2
MTB> let c3=c1-c2
MTB>  let c3=c1*c2
MTB>  let c3=c1/c2
MTB>  let k1=sqrt(5)
MTB>  let k1=2**(1/3)    ```

## SOME STATISTICS COMMANDS

```
MTB> mean C3 ```

### print the mean of the numbers stored in column C3.

```
MTB> stdev C3 ```

### print the standard deviation of the numbers stored in column C3.

```
MTB>  corr c1 c2```

### print the linear correlation coefficient between the two columns.

```
MTB>  describe C3 ```

### print various descriptive statistics, including maximum, mean, median, of the numbers in C3.

```
MTB>   tinterval c1 ```

## PLOTTING DATA

### There are several commands to plot data. These commands can have subcommands. For example,

``` MTB>  hist c1

Histogram of x   N = 10

Midpoint   Count
-2.0       1  *
-1.5       3  ***
-1.0       1  *
-0.5       0
0.0       0
0.5       2  **
1.0       1  *
1.5       2  **

MTB>  dotplot c1

.
.        :    .                       . . .     ..
---+---------+---------+---------+---------+---------+---x
-2.10     -1.40     -0.70      0.00      0.70      1.40

MTB>  boxplot c1

----------------------------------
---------I                +               I-------
----------------------------------
----+---------+---------+---------+---------+---------+--x
-2.10     -1.40     -0.70      0.00      0.70      1.40
```

### There are commands to graph one variable versus another.

```
MTB>  plot c1 c2

-                                 *
1.2+                     *
-                                                      *
x       -                                   *
-                   *
-
0.0+
-
-
-
-
-1.2+   *
-                                    *         *       *
-
-
-                                                     *
-2.4+
----+---------+---------+---------+---------+---------+--y
-1.40     -1.05     -0.70     -0.35      0.00      0.35
```

### There are two types of graphing options; standards graphs and professional graphs. Most commands only works in one of these options. To change to standard graphs use

`MTB  gstd`

## DISTRIBUTIONS

### The cumulative distribution of certain distributions can be found using the command cdf. For example,

```MTB>  set c3
DATA> 1 3 5
DATA> end
MTB>  cdf c3;
SUBC> binomial 5 0.5.
K       P(X LESS OR = K)
1.00            0.1875
3.00            0.8125
5.00            1.0000```

### Possible distributions and their parameters are

```        bernoulli       p = k
binomial        n = k p = k
poisson         mu=k
integer a=k  b= k
discrete        values in c, probabilities in c
normal  [mu=k [sigma=k]]
uniform [a=k  b=k]
t       df=k
f       df1=k   df2=k
chisquare       df=k```

### INVCDF finds a value x corresponding to a given probability p with respect of the specified distribution. For example,

```MTB>  invcdf 0.05;
SUBC> t 15.
0.0500   -1.7531```

### The command random finds random samples. For example,

```MTB>  random 100 c1;
SUBC> t 15.```

## MACROS IN MINITAB

### An execs macro is just an Unix file with some minitab commands. Different commands are typed in different lines. It is recommended that you type 'end' at the end of the file. To run this file just type:

` MTB>  exec 'namefile'  k1  `

### Global and local macros can have special collection of minitab commands (such as if, while and goto). These files use the default extension MAC and are invoked using the symbol %.

` MTB>  %namefile `