Note_06

4

Click here to load reader

Transcript of Note_06

Page 1: Note_06

1

ST 103-Statistics Applications I-2011/2012

Note 06

Distributions and Random data

Calc Random data

Generate a separate random sample of K observations from various distributions into

specified columns.

Suppose we want 50 random samples, each containing 20 observations, from a binomial

distribution with number of trials n=5, and probability of success p=0.3.

If you want to samples rows from one or more specified columns randomly,

Calc Random data Samples from columns

If Replace is used, sampling is done with replacement(the same row can be selected

more than once.)

Page 2: Note_06

2

IMPORT / EXPORT SPECIAL TEXT

Import Special Text

File Other Files Import Special Text

Reads data from a text file into the worksheet.

Most of the time, the File Open Worksheet command is the best way to open a text

file. However, the Import Special Text command can do two things that the Open

Worksheet command cannot. You can

Create a format statement that gives Minitab very specific instructions for

interpreting the file. This can solve import problems when the text file is

formatted in an odd way.

Append data from a file to the bottom of existing columns. The Open Worksheet

command places data in a new worksheet, or, when used with the merge option,

places data in new columns in the current worksheet.

Dialog box items

Store data in column(s): Enter the columns into which Minitab should place the data

(for example, C1-C3).

Replace any existing data in these columns: Choose to replace existing values in the

indicated columns with the new data.

Append to any existing data in these columns: Choose to insert the imported data at

the bottom of the indicated columns.

Format

Dialog box items

Data Selection : Allows you to read a portion of the data file. You can read the

first part of a file or skip over a specified number of lines in your data file. This is

useful if the data file contains header information that cannot be used by Minitab.

These two options may be used in combination to import a block of rows which is

in the middle of the data file.

Use first ___ rows of data: Enter the number of rows you want to import. Minitab

will only import the specified portion of the file.

Skip first ___ lines of a file: Enter the number of lines of the data file you want to

skip over. Minitab will only import the specified

portion of the file.

Page 3: Note_06

3

Decimal Separator

Period: Click to specify that a period is the decimal separator symbol.

Comma: Click to specify that a comma is the decimal separator symbol.

Blank delimited (numeric data only): Choose to import data separated by at least

one space or comma.

Tab delimited: Choose to import data separated by tabs.

Column names in first row: Check to read the first row as column names in tab

delimited files.

User-specified text columns: Minitab automatically identifies columns as

numeric, date/time, or text, depending on the first data value in the column. To

override this automatic checking, specify which columns are to be designated as

text columns.

User-specified format: Enter a format statement that specifies how to read the

file.

<OK>: When you click OK, Minitab opens the Import Text from File dialog box.

To open a file, make sure the correct file type appears in the List Files of

Type box. Next, select the file you want to open, browsing through drives and

directories as necessary.

Export Special Text

File Other Files Export Special Text

Exports data in the specified columns to a text file.

Most of the time, the command Save Current Worksheet As is best for saving your

worksheet in a text file. But if you want to save your data in a custom (Fortran-type)

format, or if you want to save non-contiguous columns, you must use Export Special

Text.

How data is exported

Column names are not saved, only the data.

If all columns do not fit on one line, the continuation symbol (&) is put at the end

of the line and the data continues onto the next line.

When exporting columns of unequal length, Minitab adds missing value symbols

(*) to the shorter numeric column(s).

Page 4: Note_06

4

Dialog box items

Columns to export: Select the columns to be written to a data file. When exporting

columns of unequal length, Minitab adds missing value symbols (*) to the shorter

numeric column(s).

User-specified format: Choose to export data using a fixed format (for example,

columns not separated by spaces), then enter a format statement in the box.

Decimal Separator

Period: Click to select a period as the decimal separator in the new file.

Comma: Click to select a comma as the decimal separator in the new file.

<OK>: When you click OK, Minitab opens the Export Data To File dialog box.

To save a data file, enter the file name of your choice in the File Name

box. Select the correct drive and directory if necessary to tell Minitab where to

save the file.