Docsity

Statistics Notes Pt. 1 2020, Appunti di Statistica

Toggle sidebar
bg1
First topic: describing data
Decisions in economics and management are often made on limited information.
Before bringing a new product to a market a manufacturer wants to arrive at some
assessment of the likely level of the demand;
In this framework, the manufacturer is interested in all possible buyers of a product (the
target population).
Populations are often so large that collecting complete information on them could be
impossible or too expensive.
We need to focus on smaller samples 🡪 subset of observable population, and we can focus
on them in order to made conclusions that can be extended to the whole population.
These facts provide many problems: some samples cannot be extended without any errors. In
general, when we extend the sample, we commit an error, a sampling error, and we have to
realize we somehow have control of the error.
Key Definitions
A population is the collection of all items of interest or under investigation. N represents the
population size.
A sample is an observed subset of the population. n represents the sample size. Is strictly
included in the whole population. Therefore, in general the problem is to provide conclusions for
the whole population using just a restricted sample of it.
A parameter is a specific characteristic of a population. The particular aspect I am interested in. It
is always unknown, because we compute it if we observe all the individuals, but the beginning of
the problem is that the population is too large to observe. We observe it with limited information.
Values calculated using population data are called parameters.
Statistics a specific characteristic of a sample. If we compute it, we have statistics. It does not
perfectly reflect the general parameters, but if I choose a good sample, I can expect the error to be
small. Values computed from sample data are called statistics.
Examples of Populations
Names of all registered voters in the United States
Incomes of all families living in Daytona Beach
Annual returns of all stocks traded on the New York Stock Exchange
Grade point averages of all the students in your university
Providing good samples is doing our best to minimize the error. How can I do it? The sample has
to be representative of the population: the sample has to reflect in small the characteristics of the
population.
Sample has to be a picture of population in small, in respect of the quantity of the population. We
have to address representative samples and not bias. We need rules to select a good sample.
The most common theory used is Random Sampling (our golden rule). More effective
procedures can be used but they are more complex. This can be adopted for all calculus made in
the course. Simple random sampling is a procedure that allows for obtaining a representative
sample:
1. Each member of the population is chosen strictly by chance,
2. The selection of one member does not influence the selection of any other member
3. Each member of the population is equally likely to be chosen, and every possible sample of
n objects is equally likely to be chosen. The resulting sample is called a random sample. I
make a list: then I draw for it, with or without replacement after the drawing. The two
pf3
pf4
pf5
pf8
pf9

Anteprima parziale del testo

Scarica Statistics Notes Pt. 1 2020 e più Appunti in PDF di Statistica solo su Docsity!

First topic: describing data  Decisions in economics and management are often made on limited information.  Before bringing a new product to a market a manufacturer wants to arrive at some assessment of the likely level of the demand;  In this framework, the manufacturer is interested in all possible buyers of a product (the target population).  Populations are often so large that collecting complete information on them could be impossible or too expensive.  We need to focus on smaller samples 🡪 subset of observable population, and we can focus on them in order to made conclusions that can be extended to the whole population. These facts provide many problems: some samples cannot be extended without any errors. In general, when we extend the sample, we commit an error, a sampling error, and we have to realize we somehow have control of the error. Key Definitions A population is the collection of all items of interest or under investigation. N represents the population size. A sample is an observed subset of the population. n represents the sample size. Is strictly included in the whole population. Therefore, in general the problem is to provide conclusions for the whole population using just a restricted sample of it. A parameter is a specific characteristic of a population. The particular aspect I am interested in. It is always unknown, because we compute it if we observe all the individuals, but the beginning of the problem is that the population is too large to observe. We observe it with limited information. Values calculated using population data are called parameters. Statistics a specific characteristic of a sample. If we compute it, we have statistics. It does not perfectly reflect the general parameters, but if I choose a good sample, I can expect the error to be small. Values computed from sample data are called statistics. Examples of Populations  Names of all registered voters in the United States  Incomes of all families living in Daytona Beach  Annual returns of all stocks traded on the New York Stock Exchange  Grade point averages of all the students in your university Providing good samples is doing our best to minimize the error. How can I do it? The sample has to be representative of the population: the sample has to reflect in small the characteristics of the population. Sample has to be a picture of population in small, in respect of the quantity of the population. We have to address representative samples and not bias. We need rules to select a good sample. The most common theory used is Random Sampling (our golden rule). More effective procedures can be used but they are more complex. This can be adopted for all calculus made in the course. Simple random sampling is a procedure that allows for obtaining a representative sample:

  1. Each member of the population is chosen strictly by chance,
  2. The selection of one member does not influence the selection of any other member
  3. Each member of the population is equally likely to be chosen, and every possible sample of n objects is equally likely to be chosen. The resulting sample is called a random sample. I make a list: then I draw for it, with or without replacement after the drawing. The two

procedures lead to the same results when the population is large and the sample smaller. In general, I drew using the case the subset of individuals I want to interview. There are two branches of statistics:  Descriptive statistics : collecting, summarizing, and processing data to transform data into information.  Inferential statistics : provide the bases for predictions, forecasts, and estimates that are used to transform information into knowledge. You always fail in the statistics: but you fail with control on the error. We would speak about the probability to commit less than a five-point error, is twenty percent. We make the calculation and after that we trace the error. You have to fail in small quantities. Methods to collect data in Descriptive Statistics:  Collect data: e.g., Survey  Present data: e.g., Tables and graphs  Summarize data: e.g., Sample mean = i X n These are three possible fields. Instead in the Inferential Statistics:  Estimation: e.g., Estimate the population mean weight using the sample mean weight. When we have no idea of the parameter of the population, we measure the parameter on the sample and it is an estimation.  Hypothesis testing: e.g., Test the claim that the population mean weight is 120 pounds. We have an idea of the parameter value. We have an a priori. What value is close enough to be considered? We will develop tools that let us define it. Inference is the process of drawing conclusions or making decisions about a population based on sample results. There are different types of data:

  1. Categorical. Are data that belong to groups and categories, e.g. YES/NOT, or questions that are categorically coded, e.g. marital status, eye colour. They are nominal, we cannot admit an order between alternatives. There is no order in possible eye colours. No unique way to order data. When we can order them (e.g. strongly agree, agree, disagree…) it is categorical and ordinal.
  2. Numerical. When the possible outcome is a number.
    • When we are able to describe the alternative of possible outcomes, it is numerical discrete data. The possibilities can be counted. It can be realised as a biunivocal correspondence between numbers and options. Count the alternatives of the object of interest. It can be ∞e or finite.
    • The numerical data can be continuous if it can be any variable in a continuous trail of data: usually from a counting/measurement variable. You can count the observations in a sequence. In a continuous variable, it can be something between one and two (e.g. 1.5). You can always imagine an intermediate value between the other two. In the discrete, there is nothing else between one and two. It does not necessarily mean ∞vie. Graphical presentation of data Consider for example a sample of five data in raw form , regarding the gender of interviewed individuals in a market research: M, M, F, F, M. Raw form is just the starting point in order to build

Graphs illustrated so far have involved only a single variable. When two variables exist, other techniques are used:

  • Categorical (Qualitative) Variables use cross tables. - Numerical (Quantitative) variables use scatter plots: s cattered diagrams are used for paired observation taken from two numerical variables: one is measured on the vertical axis and the other is measured on the horizontal. For each individual, there is a value. A graph for time series data is a line chart (time series plot) used to show the values of a variable over time, time is measured on the horizontal axis, the variable of interest is measured on the vertical axis. The main tools in our presentation are cross tables or contingency tables, which list the number of observations for every combination of values for two categorical variables. If there are r categories for the first variable (rows) and c categories for the second variable (columns), the table is called an r x c cross table. (See the table on slide 45) Frequencies are the number of observations for each combination of category I (in row) and j (in column). Ri is the marginal frequency for row I, obtained as fi1+fi2+fi3 and Cj is the marginal frequency for column j, obtained as f1j + f2j. n is the sum of cj and ri. Absolute joint frequencies pij are obtained as fij/n and relative frequencies as Ri/n or Cj/n. Joint and marginal frequencies are helpful for describing the numerical consistency of the cells but not for underlining the connection between rows and columns. This is a pivotal content. For these purposes, we introduce the concept of conditional distributions. The conditional distribution of Y given the category X=xi is defined as Fr (Yj|Xi) = fij / Ri. (Row conditional frequency is the sum of the row). When we speak of association, connection or dependency, we refer to this kind of pattern. 28.09. Reprise from cross table example. Conditional frequencies may be row conditional or column conditional. The correct representation of this is a side-by-side chart, with on the axis X the explanatory cause, on the Y the conditional frequencies of Y given X. An alternative is a segmented (staked) bar chart: on the X we put the cause; on the Y we put the conditional frequency of Y given X. Hence, on Y we report bar divided in segments that are proportional to Fr(Y/X) 🡪 focus on the intensity of the relationship. Independence and Association  Since the conditional distributions of the favourite cultural activity vary between the groups defined by the gender, we state that “there is an association between the explanatory and the dependent variables»;  in more detail, males tend to prefer museums, while females tend to be in favour of cinemas.  When frequency distributions for rows (and/or for columns) do not vary between the groups defined by the explanatory variable, we state that the variables are independent. Independent and not related variables The choice of what characters you choose is arbitrary: for example we can have employment status (employed/unemployed) or income (high/low), with n=30. Employment is the cause and income is the consequence. x/y employed unemployed high 15 5 20 low 5 5 10 20 10 30

We need the column frequency. The choice between column and row frequency is arbitrary, due to the data you want. Therefore, we have Fr [xIy]. x/y employed unemployed hig h

low 0.25 0.25 1 1 1 The two data are dependent, so we have different conditional frequencies (remember the sport/age example, with independence). Describing data numerical: Central tendency indicators are those that tell what happens at the centre of the distribution. Nevertheless, what is the centre of a distribution? We have three propositions.

  • Arithmetic Mean 🡪 arithmetic average
  • Median 🡪 mid-point of ranked values.
  • Mode
    1. The arithmetic mean is the most common measure of central tendency and can be defined as the sum of data values divided by total number of observations (N and μ).). If the data set is from a population then the population n is a parameter. If it is a representation of a sample, it is a statistics (x and n). It is the most common measure of central tendency. Mean = sum of values divided by the number of values and it is affected by extreme values (outliers). 🡪Value of the observation took in consideration. 2. Median it is a preliminary operation, for having it you have to order the data in increasing/decreasing order. In an ordered list, the median is the “middle” number (50% above, 50% below). It is not affected by extreme values, because it is an order statistics. Median position = 0.5(n+1) = (n+1)/2 position in the ordered data. This is not the value of the median, only the position of the median in the ranked data. 🡪 Order is token in consideration. 3. Mode A measure of central tendency.
      • Value that occurs most often
      • Not affected by extreme values.
      • Used for either numerical or categorical data.
      • There may be no mode.
      • There may be several modes. The decision as to whether the mean, the median or the mode is the appropriate measure to describe data is context specific. You have to take in account: 1. Type of data:
      • Categorical (nominal) 🡪 mode (ex. Eyes’ colour).
      • Categorical (ordered) 🡪 mode, median  Numerical (discrete, continuous) 🡪 mode, median, mean
    2. The presence or less of outlier:  If outliers are not present in general we prefer mean  If outliers are present we prefer median

 Shows variation about the mean  has the same units as the original data  Population standard deviation: VD. Formula Ơ2 = sum n with i=1 (xi – μ) ^2 /N sample variance^2 = sum n with i=1 (xi – μ) ^2 /n- those are variances Sigma = square root of the sum n with i=1 (xi – μ) ^2 /N sample variance= square root of the sum n with i=1 (xi – μ) ^2 /n- standard deviation E.G. A) sample A: 1, 2, 3 x with over score = 1 + 2 + 3/3 = 2 B) sample B: 0, 2, 4 x with over score: 0 + 2 + 4 /3 = 2 Sample so we use sample variances. In the first sample, data are closer to the mean, in the second one the data are far from the mean, even if the mean is the same. In sample B, we have greater variability than in sample A. The closer are the points, the lower would be the variability. The larger the variability of data, the larger the distance between the points in the mean. Standard deviation is used because even when the mean is the same, the value can be very different. Advantages of Variance and Standard Deviation  each value in the data set is used in the calculation  Values far from the mean are given extra weight (because deviations from the mean are squared) Coefficient of variation takes in account the difference in the sample value, as not done in the other variabilities. CVx= Sx/ Ix with over score I 🡪 you can express it In % because it express the standard deviation as a percentage of the mean. Seeing which CVx has a higher value, we can state what variability is higher.  Measures relative variation  always in percentage (%)  Shows variation relative to mean  Can be used to compare two or more sets of data measured in different units Linear relationship Starting from the scatter plot, we can build a linear relationship between the variables. The linear relationship is one where increasing or decreasing one variable causes a corresponding increase or decrease in the other variables. The scatter plot is a good way to visualize the linear relationship. It is called linear because we can also define it as a relationship of direct proportionality that, when plotted on a graph, traces a straight line. The relationship needs to be monotonous 🡪 if one goes up and the other down is an inverse linear relationship , if both go up (or down) is a direct linear relationship. We focus only on linear relationships, but it is not the only one. We can imagine having a quadratic relationship (y=x^2) etc…etc… Linear models are the easiest and very flexible, they can be used in any economic application. Extensions of linear models can be used to explore non-linear relationships.

The focus is on measuring and describing linear dependency between variables:

  1. Sampling data
  2. Representing graphically 🡪 scatter plot
  3. Measuring on an analytical point of view of:
    • if exists a linear relationship
    • the direction of that
    • the strength of that Covariance is an indicator that measures the direction of the linear relationship between two variables. If we cannot identify any direction, the linear relationship does not exist. Covariance is the mean value of the product of the deviation of two variables from their respective means. Population Covariance: Cov(x, y) = sigma xy = formula. Sample covariance: Cov(x, y) = S xy = formula. In the sample we, as in the variance, put n-1 instead of N. to better understand the direction, we can create other Cartesian axes with the centre in the mean of x and y. If x and y move in the same direction we have a direct linear relationship. What happens if the two directions are opposite? When a value decreases and other increases, the covariance would be negative. If both decrease/increase, it would be positive. Covariance between two variables:
  • Cov(x, y) > zero x and y tend to move in the same direction.
  • Cov(x, y) < zero x and y tend to move in opposite directions.
  • Cov(x, y) = zero x and y are not linearly related (but we cannot exclude different functional relationships): 🡪 There is no relationship. 🡪 The relationship has other nature. 🡪 An increase/decrease of x means no change in y. Covariance is a good indicator if the aim of the analysis is: a. Detect the presence of a linear relationship b. To identify the direction However, it fails to give info about the strength of the relationship. In order to overcome the limit we need to introduce a new dependency indicator. The coefficient of Correlation measures the relative strength of the linear relationship between two variables and, therefore, of the linear relationship. Population correlation coefficient: formula. Sample correlation coefficient: formula. Its features are:  Unit free  Ranges between –1 and 1  The closer to –1, the stronger the negative linear relationship  The closer to 1, the stronger the positive linear relationship  The closer to 0, the weaker any positive linear relationship  Ro and r have the same sign of the covariance.