








































Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!









































2 Statistics I
4 Statistics I
mainly to the research by Kolmogorov, was developed in the XXth century, and is the approach that we follow in these notes.
The power of Averages, it means a lot if you can understand Means, a lot. Anubis the Philosomancer
Statistics can be defined, in short, as follows
Definition 1.0.1 Statistics is a set of techniques whose goal is to understand and draw conclusions about a phenomenon (or phenomena), in a particular place and time, using the information contained in a set of data
For example, we may study the unemployment in Catalonia this year using the “En- cuesta de Población Activa (EPA)”, or the opinion poll of the electorate before any call for elections using surveys published in the media
Technically, the "phenomenon" to study is called variable, while that "particular place and time" is the population. In the same sense, "data" is usually called sample data (or observations). In this way,
Definition 1.0.2 Population is the set of elements to study from which we want to draw a conclusion with respect to some of its features (or variables)
Definition 1.0.3 Sample is a subset of the population used to collect information and draw conclusions
Definition 1.0.4 Variables are those features or phenomena of the population that we want to study
Definition 1.0.5 Data are the specific values of the considered variables that we ob- serve in the sample at hand
Vallès. By law, All homes must be registered in the Registry of the Property, with the corresponding declaration of their cadastral value. Therefore, in this case we have all the necessary information for all the elements of the population at study, that is, all the houses in Cerdanyola. The same happens, in many cases, when we want to study some macroeconomic variables. Many international or- ganizations (World Bank, International Monetary Fund, EUROSTAT, etc.) have exhaustive databases with information on a large number of socioeconomic vari- ables of interest. These databases can be downloaded from the electronic sites of these organizations, and used in statistical research.
We will see next what a sample is, that is, how a sample can be selected out of a population. Since we want to study this sample to produce conclusions about the pop- ulation, it can not be selected arbitrarily. In this sense, there exist rigorous techniques specially tailored for this purpose. In what follows, the more basic techniques will be introduced, while more sophisticated analysis are out of the scope of these notes. The following definition introduces the idea of sampling
Definition 1.1.1 Sampling is a systematic technique to select a sample out of a popu- lation in such a way that it is representative of that population
Here, the keyword is representative. Indeed, if we want our sample to be used in order to produce "reliable" conclusions regarding the original population, we would better have a sample that closely resembles (in its structure) the original population. For instance, if we want to conduct an electoral survey and we only interview people living in a "rich" neighborhood, then it is clear that their answers will not be representative of the whole population.
There are different types of sampling techniques, depending on the specific features of the study at hand. The more important are:
This is the "most random" of all the sampling methods, and throughout this notes we will normally assume that samples are obtained using this technique. Its main feature is that all elements in the population have the same probability of being selected to be incorporated to the sample. In other words, the sample is constructed completely at random. If we think for a moment of all the possible different samples of a given size that can be selected from a given population, simple random sampling means that each of these samples has the same probability of been selected as "the sample", i.e., they are equally likely
Example 1.1.2 Consider a population consisting of only 4 elements
Population = {A, B, C, D}
If, for instance, we want to draw a sample of size 2, there are 6 possible samples
Sample 1 Sample 2 Sample 3 Sample 4 Sample 5 Sample 6 {A, B} {A, C} {A, D} {B, C} {B, D} {C, D}
Table 1.1: Possibles Samples
Hence, in a simple random sampling (SRS), each of this samples has the same proba- bility of being selected, 16 in this case. Analogously, we may also say that each of the four elements in the Population has the same probability of being drawn to enter the selected sample. Indeed, since each of the elements belongs to exactly 3 of the possible sample and each possible sample has probability 16 of being the selected sample, then the probability for any of the elements in the Population of entering the selected sample is 16 + 16 + 16 = 12.
This probability ( 12 ) can also be understood as each element in the Population having probability 14 of being the first element to enter the sample and probability 1334 of being selected as the second element in the sample given that it has not been selected in the first place, which yields a total of 12 probability of being one of the two elements in the sample.
The Systematic Sampling consists of a variant of a SRS. It is useful when the popu- lation to sample is not "static", but changes often. The following example shows how this method works.
Example 1.1.3 Consider a factory that manufactures Intel "chips". The managers want to study how many of these chips turn out to be faulty every day. The factory has a "chain" process so that once the "chip" has been assembled, it automatically enters in the packaging process and then moves into warehouse. Let us suppose that the factory produces 100 "chips" a day, and that a sample of size 5 is going to be se- lected. It is clear that the managers can not wait until the end of the day, then stop all processes, randomly select 5 chips, and start all processes over again. This would be very costly. What is needed is a way to randomly select "chips" but without having to stop the manufacturing chain process. Here is what can be done in cases like this.
In this way, we have selected 200 public schools to visit in Catalonia with travel costs lower than using a SRS. The problem, though, is that the sample obtained will be less representative.
In some cases the sample is obtained without any randomness at all. For instance, if we want to test a new drug against malaria, we can not just randomly select "subjects" and force them to take the drug. In cases like this, a call for volunteers is made. This techniques are usually much less representatives that a random technique. Furthermore, since there are no random components in the sample, we can not use probabilistic tools to study the sample and, therefore, statistical inference techniques can not be properly applied.
1.2 Types of variables and frequency distribution ta-
bles
In order to conduct an statistical analysis using the data in the sample, it is necessary first to organize and present in a clear, simplified and understandable way this infor- mation. Descriptive Statistics is a sub-field within statistics that deals with the task of arranging the data in such a way that the analysis becomes easier.
Definition 1.2.1 Descriptive statistics deals with the study of a set of data, correspond- ing to one or more variables of a population, and its arrangement in order to facilitate its understanding and use
Once all the information is arranged in a clear and efficient way, the researcher can use "statistical inference" techniques, which use probabilistic tools, to extend the conclu- sions obtained from the sample to the entire population that is under study.
As we have seen before, the characteristic of the population that is to be studied is represented by means of a variable (unemployment, income, etc.) As in other branches of mathematics, variables are usually denoted using the last letters of the alphabet (in uppercase), X, Y, Z. If we need to consider many variables at the same time the use subscripts becomes convenient, X 1 , X 2 ,... , Xn.
The different data points (or observations) for each variable that we obtain from a sample are often denoted using subscripts of the corresponding variable (in lowercase). For instance, if we have 3 data points corresponding to the variable labeled X 3 we will represent them as x 31 , x 32 , x 33. If we only have one variable, X, then we simply use the notation x 1 , x 2 , x 3.
When variables have meaningful names, it is customary to use acronyms that match their description to ease the interpretation of those variables (for instance, GDP for Gross Domestic Product).
According to their nature there are two types of variables:
(a) Nominal (or categorical) variables. These are variables whose values are categories, such as the profession, the gender, or the studies of a person. Each observation is usually associated, for convenience, with a number (or letter) according to some established criteria. For example, for the variable profession we could have: 1: Entrepreneur 2: Employee 3: Unemployed 4: Retiree An important feature of this type of variable is that it does not make sense doing calculations with their values. For example, from the list of values of the profession variable considered above, saying that the average profession is 2.35 can not be interpreted in any meaningful way. (b) Ordinal (or scale) variables. These are variables whose values correspond to the elements of a scale or ranking, such as the degree of satisfaction with a given product, or the position in a given classification. For example, for the variable Degree of satisfaction with the Statistics I course we could have: 1: Very unsatisfied 2: Not satisfied 3: Satisfied 4: Very satisfied
In this case, since the values that the variable can take determine an order, it makes sense to do some calculations with these values. For example, if we get an average satisfaction level of 3.35 in a sample, we can conclude that the degree of satisfaction is between Satisfied and Very satisfied.
(a) Continuous variables: can take any value within a range. Usually corre- spond to measurement values. For example the temperature or the weight of electronic parts. (b) Discrete variables: can take any value from a finite (or countable) list of values^1. For example, the number of students that pass a given subject, or the number of times that we obtain “heads” when tossing a coin a given number of times.
Example 1.2.2 Consider the table 1.2, which summarizes a survey of 10 families living in Cerdanyola. Here we consider 5 variables.
(^1) In practice, to study these variables we will use the same techniques as with qualitative variables.
0 Without fiber at home 1 With fiber at home
The “raw” data of a variable provides very little useful information, specially if the dataset is large. It is necessary to classify it so that it becomes informative. This is done differently depending on whether we deal with a continuous quantitative variable or a discrete quantitative or qualitative variable. The question, ultimately, is to know how many times each data value appears in the sample (how many people are unemployed, how many people will vote for the PP, etc.), or maybe some other type of summary.
1.2.2.1 Frequency distribution of qualitative or discrete quantitative variables
In the case of quantitative discrete or qualitative variables (they are treated alike^2 ), what we do is first to look at how many different values the variable has taken, and then count how many times each of theses values appears in the sample.
In the previous example, X 1 , X 2 , i X 5 can be thus treated in the same way.
Let us take, for example, X 1. We have the following data
{x 11 , x 12 , x 13 , x 14 , x 15 , x 16 , x 17 , x 18 , x 19 , x 110 } = { 2 , 3 , 4 , 5 , 8 , 2 , 4 , 5 , 7 , 2 }
We observe that we have 10 observations of the variable X 1 , but it only takes 6 differ- ent values which we represent with v. Thus, the list of different values that X 1 takes in our sample is: {v 1 , v 2 , v 3 , v 4 , v 5 , v 6 } = { 2 , 3 , 4 , 5 , 7 , 8 }
From this list we can create a frequency distribution consisting on counting how many times each of these values is found in the data. In this sense, we define below the important concepts of absolute frequency and relative frequency
(^2) Statistically they can be treated in the same way because in both cases we work with an enumerable list of values that the variable has taken. We will see that for the case of continuous quantitative variables this is not useful.
Definition 1.2.3 The absolute frequency (ni) of a value vi is the number of times this value is found in the data set
Definition 1.2.4 The relative frequency (fi) (o proportion) of a value vi is the per- centage of times this value is found in the data set
Clearly, if n the total number of observations in the data set we have,
fi =
ni n
Moreover, we can compute^3 the cumulative frequencies (absolute (Ni) and relative (Fi)) for each value as the sum of all the frequencies (absolute (ni) or relative (fi)) of the lower values including that of the value for which we are computing the cumulative frequency. Thus, such cumulative frequencies are interpreted as:
Ni → number of data points (observations) of the variable that are less or equal than vi
Fi → proportion of data points (observations) of the variable that are less or equal than vi
Table1.3 summarizes all such frequencies for the variable X 1. Notice, for example, the following interpretations:
n 3 = 2 → There are 2 observations of the variable that are equal to v 3 = 4
f 3 = 0. 2 → 20% of the observations of the variable are equal to v 3 = 4
N 3 = 6 → There are 6 observations of the variable that are less or equal than v 3 = 4
F 3 = 0. 6 → 60% of the observations of the variable are less or equal than y 3 = 4
Absolute Relative Absolute Cumulative Relative Cumulative Value of Frequency Frequency Frequency Frequency X 1 (ni) (fi = n ni ) (Ni) (Fi = N ni ) 2 3 0.3 3 0. 3 1 0.1 4 0. 4 2 0.2 6 0. 5 2 0.2 8 0. 7 1 0.1 9 0. 8 1 0.1 10 1
Table 1.3: Table of frequencies for the variable X 1
The frequencies of any variable always satisfy the properties below, where k represents the number of different values the variable takes^4 (^3) It does not make any sense to do this for nominal qualitative variables since this computation requires a natural ordering of the values vi (^4) In our example, k = 6.