Docsity

Introduction to Basic of Statistics, Papers of Statistics

Toggle sidebar
bg1
Basics of Statistics
Jarkko Isotalo
Birthweights of children during years 1965-69
5000.0
4800.0
4600.0
4400.0
4200.0
4000.0
3800.0
3600.0
3400.0
3200.0
3000.0
2800.0
2600.0
2400.0
30
20
10
0
Std. Dev = 486.32
Mean = 3553.8
N = 120.00
Horsepower
3002001000
Time to Accelerate from 0 to 60 mph (sec)
30
20
10
0
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53

Partial preview of the text

Download Introduction to Basic of Statistics and more Papers Statistics in PDF only on Docsity!

Basics of Statistics

Jarkko Isotalo

Birthweights of children during years 1965-

30

20

10

0

Std. Dev = 486. Mean = 3553. N = 120.

Horsepower

Time to Accelerate from 0 to 60 mph (sec) 0 100 200 300

30

20

10

0

Preface

These lecture notes have been used at Basics of Statistics course held in Uni- versity of Tampere, Finland. These notes are heavily based on the following books.

Agresti, A. & Finlay, B., Statistical Methods for the Social Sci- ences, 3th Edition. Prentice Hall, 1997. Anderson, T. W. & Sclove, S. L., Introductory Statistical Analy- sis. Houghton Mifflin Company, 1974. Clarke, G.M. & Cooke, D., A Basic course in Statistics. Arnold,

Electronic Statistics Textbook, http://www.statsoftinc.com/textbook/stathome.html. Freund, J.E.,Modern elementary statistics. Prentice-Hall, 2001. Johnson, R.A. & Bhattacharyya, G.K., Statistics: Principles and Methods, 2nd Edition. Wiley, 1992. Leppälä, R., Ohjeita tilastollisen tutkimuksen toteuttamiseksi SPSS for Windows -ohjelmiston avulla, Tampereen yliopisto, Matem- atiikan, tilastotieteen ja filosofian laitos, B53, 2000. Moore, D., The Basic Practice of Statistics. Freeman, 1997. Moore, D. & McCabe G., Introduction to the Practice of Statis- tics, 3th Edition. Freeman, 1998. Newbold, P., Statistics for Business and Econometrics. Prentice Hall, 1995. Weiss, N.A., Introductory Statistics. Addison Wesley, 1999.

Please, do yourself a favor and go find originals!

That is, statistics provides methods for

  1. Design: Planning and carrying out research studies.
  2. Description: Summarizing and exploring data.
  3. Inference: Making predictions and generalizing about phenomena rep- resented by the data.

Furthermore, statistics is the science of dealing with uncertain phenomenon and events. Statistics in practice is applied successfully to study the effec- tiveness of medical treatments, the reaction of consumers to television ad- vertising, the attitudes of young people toward sex and marriage, and much more. It’s safe to say that nowadays statistics is used in every field of science.

Example 1.1 (Statistics in practice). Consider the following problems: –agricultural problem: Is new grain seed or fertilizer more productive? –medical problem: What is the right amount of dosage of drug to treatment? –political science: How accurate are the gallups and opinion polls? –economics: What will be the unemployment rate next year? –technical problem: How to improve quality of product?

1.2 Population and Sample

Population and sample are two basic concepts of statistics. Population can be characterized as the set of individual persons or objects in which an inves- tigator is primarily interested during his or her research problem. Sometimes wanted measurements for all individuals in the population are obtained, but often only a set of individuals of that population are observed; such a set of individuals constitutes a sample. This gives us the following definitions of population and sample.

Definition 1.2 (Population). Population is the collection of all individuals or items under consideration in a statistical study. (Weiss, 1999)

Definition 1.3 (Sample). Sample is that part of the population from which information is collected. (Weiss, 1999)

Population vs. Sample

⇒

Figure 1: Population and Sample

Always only a certain, relatively few, features of individual person or object are under investigation at the same time. Not all the properties are wanted to be measured from individuals in the population. This observation empha- size the importance of a set of measurements and thus gives us alternative definitions of population and sample.

Definition 1.4 (Population). A (statistical) population is the set of mea- surements (or record of some qualitive trait) corresponding to the entire col- lection of units for which inferences are to be made. (Johnson & Bhat- tacharyya, 1992)

Definition 1.5 (Sample). A sample from statistical population is the set of measurements that are actually collected in the course of an investigation. (Johnson & Bhattacharyya, 1992)

When population and sample is defined in a way of Johnson & Bhattacharyya, then it’s useful to define the source of each measurement as sampling unit, or simply, a unit.

The population always represents the target of an investigation. We learn about the population by sampling from the collection. There can be many

Example 1.4 (Descriptive and Inferential Statistics). Consider event of toss- ing dice. The dice is rolled 100 times and the results are forming the sample data. Descriptive statistics is used to grouping the sample data to the fol- lowing table

Outcome of the roll Frequencies in the sample data 1 10 2 20 3 18 4 16 5 11 6 25

Inferential statistics can now be used to verify whether the dice is a fair or not.

Descriptive and inferential statistics are interrelated. It is almost always nec- essary to use methods of descriptive statistics to organize and summarize the information obtained from a sample before methods of inferential statistics can be used to make more thorough analysis of the subject under investi- gation. Furthermore, the preliminary descriptive analysis of a sample often reveals features that lead to the choice of the appropriate inferential method to be later used.

Sometimes it is possible to collect the data from the whole population. In that case it is possible to perform a descriptive study on the population as well as usually on the sample. Only when an inference is made about the population based on information obtained from the sample does the study become inferential.

1.4 Parameters and Statistics

Usually the features of the population under investigation can be summarized by numerical parameters. Hence the research problem usually becomes as on investigation of the values of parameters. These population parameters are unknown and sample statistics are used to make inference about them. That is, a statistic describes a characteristic of the sample which can then be used to make inference about unknown parameters.

Definition 1.8 (Parameters and Statistics). A parameter is an unknown numerical summary of the population. A statistic is a known numerical sum- mary of the sample which can be used to make inference about parameters. (Agresti & Finlay, 1997)

So the inference about some specific unknown parameter is based on a statis- tic. We use known sample statistics in making inferences about unknown population parameters. The primary focus of most research studies is the pa- rameters of the population, not statistics calculated for the particular sample selected. The sample and statistics describing it are important only insofar as they provide information about the unknown parameters.

Example 1.5 (Parameters and Statistics). Consider the research problem of finding out what percentage of 18-30 year-olds are going to movies at least once a month.

  • Parameter: The proportion p of 18-30 year-olds going to movies at least once a month.
  • Statistic: The proportion pˆ of 18-30 year-olds going to movies at least once a month calculated from the sample of 18-30 year-olds.

1.5 Statistical data analysis

The goal of statistics is to gain understanding from data. Any data analysis should contain following steps:

2 Variables and organization of the data

[Weiss (1999), Anderson & Sclove (1974) and Freund (2001)]

2.1 Variables

A characteristic that varies from one person or thing to another is called a variable, i.e, a variable is any characteristic that varies from one individual member of the population to another. Examples of variables for humans are height, weight, number of siblings, sex, marital status, and eye color. The first three of these variables yield numerical information (yield numerical measurements) and are examples of quantitative (or numerical) vari- ables, last three yield non-numerical information (yield non-numerical mea- surements) and are examples of qualitative (or categorical) variables.

Quantitative variables can be classified as either discrete or continuous.

Discrete variables. Some variables, such as the numbers of children in fam- ily, the numbers of car accident on the certain road on different days, or the numbers of students taking basics of statistics course are the results of counting and thus these are discrete variables. Typically, a discrete variable is a variable whose possible values are some or all of the ordinary counting numbers like 0 , 1 , 2 , 3 ,.... As a definition, we can say that a variable is dis- crete if it has only a countable number of distinct possible values. That is, a variable is is discrete if it can assume only a finite numbers of values or as many values as there are integers.

Continuous variables. Quantities such as length, weight, or temperature can in principle be measured arbitrarily accurately. There is no indivible unit. Weight may be measured to the nearest gram, but it could be measured more accurately, say to the tenth of a gram. Such a variable, called continuous, is intrinsically different from a discrete variable.

2.1.1 Scales

Scales for Qualitative Variables. Besides being classified as either qualitative or quantitative, variables can be described according to the scale on which they are defined. The scale of the variable gives certain structure to the variable and also defines the meaning of the variable.

The categories into which a qualitative variable falls may or may not have a natural ordering. For example, occupational categories have no natural ordering. If the categories of a qualitative variable are unordered, then the qualitative variable is said to be defined on a nominal scale, the word nominal referring to the fact that the categories are merely names. If the categories can be put in order, the scale is called an ordinal scale. Based on what scale a qualitative variable is defined, the variable can be called as a nominal variable or an ordinal variable. Examples of ordinal variables are education (classified e.g. as low, high) and "strength of opinion" on some proposal (classified according to whether the individual favors the proposal, is indifferent towards it, or opposites it), and position at the end of race (first, second, etc.).

Scales for Quantitative Variables. Quantitative variables, whether discrete or continuos, are defined either on an interval scale or on a ratio scale. If one can compare the differences between measurements of the variable meaningfully, but not the ratio of the measurements, then the quantitative variable is defined on interval scale. If, on the other hand, one can compare both the differences between measurements of the variable and the ratio of the measurements meaningfully, then the quantitative variable is defined on ratio scale. In order to the ratio of the measurements being meaningful, the variable must have natural meaningful absolute zero point, i.e, a ratio scale is an interval scale with a meaningful absolute zero point. For example, temperature measured on the Certigrade system is a interval variable and the height of person is a ratio variable.

2.2 Organization of the data

Observing the values of the variables for one or more people or things yield data. Each individual piece of data is called an observation and the collec- tion of all observations for particular variables is called a data set or data matrix. Data set are the values of variables recorded for a set of sampling units.

For ease in manipulating (recording and sorting) the values of the qualitative variable, they are often coded by assigning numbers to the different cate- gories, and thus converting the categorical data to numerical data in a trivial sense. For example, marital status might be coded by letting 1,2,3, and 4 denote a person’s being single, married, widowed, or divorced but still coded

3 Describing data by tables and graphs

[Johnson & Bhattacharyya (1992), Weiss (1999) and Freund (2001)]

3.1 Qualitative variable

The number of observations that fall into particular class (or category) of the qualitative variable is called the frequency (or count) of that class. A table listing all classes and their frequencies is called a frequency distribution.

In addition of the frequencies, we are often interested in the percentage of a class. We find the percentage by dividing the frequency of the class by the total number of observations and multiplying the result by 100. The percentage of the class, expressed as a decimal, is usually referred to as the relative frequency of the class.

Relative frequency of the class =

Frequency in the class Total number of observation

A table listing all classes and their relative frequencies is called a relative frequency distribution. The relative frequencies provide the most rele- vant information as to the pattern of the data. One should also state the sample size, which serves as an indicator of the creditability of the relative frequencies. Relative frequencies sum to 1 (100%).

A cumulative frequency (cumulative relative frequency) is obtained by summing the frequencies (relative frequencies) of all classes up to the specific class. In a case of qualitative variables, cumulative frequencies makes sense only for ordinal variables, not for nominal variables.

The qualitative data are presented graphically either as a pie chart or as a horizontal or vertical bar graph.

A pie chart is a disk divided into pie-shaped pieces proportional to the relative frequencies of the classes. To obtain angle for any class, we multiply the relative frequencies by 360 degrees, which corresponds to the complete circle.

A horizontal bar graph displays the classes on the horizontal axis and the frequencies (or relative frequencies) of the classes on the vertical axis. The frequency (or relative frequency) of each class is represented by vertical bar

whose height is equal to the frequency (or relative frequency) of the class. In a bar graph, its bars do not touch each other. At vertical bar graph, the classes are displayed on the vertical axis and the frequencies of the classes on the horizontal axis.

Nominal data is best displayed by pie chart and ordinal data by horizontal or vertical bar graph.

Example 3.1. Let the blood types of 40 persons are as follows:

O O A B A O A A A O B O B O O A O O A A A A AB A B A A O O A O O A A A O A O O AB

Summarizing data in a frequency table by using SPSS:

Analyze -> Descriptive Statistics -> Frequencies, Analyze -> Custom Tables -> Tables of Frequencies

Table 1: Frequency distribution of blood types BLOOD

16 40. 18 45. 4 10. 2 5. 40 100.

BLOOD O A B AB Total

Valid

Frequency Percent

Statistics

Graphical presentation of data in SPSS:

Graphs -> Interactive -> Pie -> Simple, Graphs -> Interactive -> Bar

3.2 Quantitative variable

The data of the quantitative variable can also presented by a frequency dis- tribution. If the discrete variable can obtain only few different values, then the data of the discrete variable can be summarized in a same way as quali- tative variables in a frequency table. In a place of the qualitative categories, we now list in a frequency table the distinct numerical measurements that appear in the discrete data set and then count their frequencies.

If the discrete variable can have a lot of different values or the quantitative variable is the continuous variable, then the data must be grouped into classes (categories) before the table of frequencies can be formed. The main steps in a process of grouping quantitative variable into classes are:

(a) Find the minimum and the maximum values variable have in the data set

(b) Choose intervals of equal length that cover the range between the min- imum and the maximum without overlapping. These are called class intervals, and their end points are called class limits.

(c) Count the number of observations in the data that belongs to each class interval. The count in each class is the class frequency.

(c) Calculate the relative frequencies of each class by dividing the class frequency by the total number of observations in the data.

The number in the middle of the class is called class mark of the class. The number in the middle of the upper class limit of one class and the lower class limit of the other class is called the real class limit. As a rule of thumb, it is generally satisfactory to group observed values of numerical variable in a data into 5 to 15 class intervals. A smaller number of intervals is used if number of observations is relatively small; if the number of observations is large, the number on intervals may be greater than 15.

The quantitative data are usually presented graphically either as a his- togram or as a horizontal or vertical bar graph. The histogram is like a horizontal bar graph except that its bars do touch each other. The his- togram is formed from grouped data, displaying either frequencies or relative frequencies (percentages) of each class interval.

If quantitative data is discrete with only few possible values, then the variable should graphically be presented by a bar graph. Also if some reason it is more reasonable to obtain frequency table for quantitative variable with unequal class intervals, then variable should graphically also be presented by a bar graph!

Example 3.2. Age (in years) of 102 people:

34,67,40,72,37,33,42,62,49,32,52,40,31,19,68,55,57,54,37,32, 54,38,20,50,56,48,35,52,29,56,68,65,45,44,54,39,29,56,43,42, 22,30,26,20,48,29,34,27,40,28,45,21,42,38,29,26,62,35,28,24, 44,46,39,29,27,40,22,38,42,39,26,48,39,25,34,56,31,60,32,24, 51,69,28,27,38,56,36,25,46,50,36,58,39,57,55,42,49,38,49,36, 48,

Summarizing data in a frequency table by using SPSS:

Analyze -> Descriptive Statistics -> Frequencies, Analyze -> Custom Tables -> Tables of Frequencies

Table 2: Frequency distribution of people’s age Frequency distribution of people's age

6 5.9 5. 10 9.8 15. 14 13.7 29. 11 10.8 40. 19 18.6 58. 8 7.8 66. 12 11.8 78. 12 11.8 90. 4 3.9 94. 2 2.0 96. 4 3.9 100. 102 100.

18 - 22 23 - 27 28 - 32 33 - 37 38 - 42 43 - 47 48 - 52 53 - 57 58 - 62 63 - 67 68 - 72 Total

Valid

Frequency Percent

Cumulative Percent

Graphical presentation of data in SPSS:

Graphs -> Interactive -> Histogram, Graphs -> Histogram

Table 3: Frequency distribution of prices of hotdogs Frequencies of prices of hotdogs ($/oz.)

5 9.3 9. 19 35.2 44. 15 27.8 72. 6 11.1 83. 3 5.6 88. 4 7.4 96. 1 1.9 98. 1 1.9 100. 54 100.

0.031-0. 0.061-0. 0.091-0. 0.121-0. 0.151-0. 0.181-0. 0.211-0. 0.241-0. Total

Valid

Frequency Percent

Cumulative Percent

or alternatively

Table 4: Frequency distribution of prices of hotdogs (Left Endpoints Ex- cluded, but Right Endpoints Included)

Frequencies of prices of hotdogs ($/oz.)

5 9.3 9. 19 35.2 44. 15 27.8 72. 6 11.1 83. 3 5.6 88. 4 7.4 96. 1 1.9 98. 1 1.9 100. 54 100.

0.03-0. 0.06-0. 0.09-0. 0.12-0. 0.15-0. 0.18-0. 0.21-0. 0.24-0. Total

Valid

Frequency Percent

Cumulative Percent

Graphical presentation of the data:

Price ($/oz)

.270 -.

.240 -. .210 -.

.180 -. .150 -.

.120 -. .090 -.

.060 -. .030 -.

0.000 -.

20

10

0

Figure 4: Histogram for prices

Let us look at another way of summarizing hotdogs’ prices in a frequency table. First we notice that minimum price of hotdogs is 0. 05. Then we make decision of putting the observed values 0. 05 and 0. 06 to the same class interval and the observed values 0. 07 and 0. 08 to the same class interval and so on. Then the class limits are choosen in way that they are middle values of 0. 06 and 0. 07 and so on. The following frequency table is then formed: