Docsity

data analysis iple unimi, Sintesi del corso di Analisi Dei Dati

Toggle sidebar
bg1
Summary of data analysis
Data analysis=series of statistical methodsto learn about realitythrough
the analysis of data
Useful every time we want to learn something about the reality surrounding
us
Datum=singlepiece ofinformationregarding aspecific aspectof a specific
unit of observation
Data=multiple datum
Dataset=organization of data
data analysis can be useful to answer research questions about reality of two
kinds:
Descriptive questionsthat investigatehow a given phenomenon
varies across space and/or time
Causal questionsthat investigatewhy a given phenomenon
happens(its causes)and/or the consequences of a given
phenomenon.
Addressing
descriptive
questionshelps us observe “how things actually
are”.
Through data analysis we cansummarisehow a given phenomenon takes
various forms, the most typical forms it has taken thus far. We learn about
differences, similarities, and thus variations. We can make comparisons
across these variations, and try to interpret and make sense of them.
Addressing
causal
questionsis the ‘next step’:once you get a full description
of the phenomenon of interest and of its variations, you may want to learn
alsowhythese variations occur.
investigate if the phenomenon under examination has a relationship with
other phenomena that you suspect could have aninfluenceon the former,
based on either your own intuition or some theory you studied.we need to
investigate if the presence/absence of a given phenomenon tends to be
associated with the presence/absence of another phenomenon, and if the
two phenomena tend to change together.This requires us to compare
situations displaying various combinations of the two phenomena.Data
analysis is conducted through statistics. In general,the goal of research is to
expand or improve our knowledge of reality.
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

Anteprima parziale del testo

Scarica data analysis iple unimi e più Sintesi del corso in PDF di Analisi Dei Dati solo su Docsity!

Summary of data analysis Data analysis = series of statistical methods to learn about reality through the analysis of data Useful every time we want to learn something about the reality surrounding us Datum = single piece of information regarding a specific aspect of a specific unit of observation Data = multiple datum Dataset = organization of data data analysis can be useful to answer research questions about reality of two kinds:  Descriptive questions that investigate how a given phenomenon varies across space and/or time  Causal questions that investigate why a given phenomenon happens (its causes) and/or the consequences of a given phenomenon.

Addressing descriptive questions helps us observe “how things actually

are”. Through data analysis we can summarise how a given phenomenon takes various forms, the most typical forms it has taken thus far. We learn about differences, similarities, and thus variations. We can make comparisons across these variations, and try to interpret and make sense of them.

Addressing causal questions is the ‘next step’: once you get a full description

of the phenomenon of interest and of its variations, you may want to learn also why these variations occur. investigate if the phenomenon under examination has a relationship with other phenomena that you suspect could have an influence on the former, based on either your own intuition or some theory you studied. we need to investigate if the presence/absence of a given phenomenon tends to be associated with the presence/absence of another phenomenon, and if the two phenomena tend to change together. This requires us to compare situations displaying various combinations of the two phenomena. Data analysis is conducted through statistics. In general, the goal of research is to expand or improve our knowledge of reality.

a useful distinction is between qualitative research and quantitative researc h. the difference essentially rests on the number of observations we want to study, which in turn determines the research method we could use.

 Qualitative research deals with small number of cases, which can be

investigated in depth.

 Quantitative research deals with large number of cases by measuring

(quantifying) some of their characteristics. Within statistics we can distinguish between descriptive statistics and inferential statistics. To understand the difference, when we do research we want to learn about phenomena that refer to a broader population.

  • Population = The entire set of cases that we wish to study and gain insight into. However it's hard to collect data from entire populations. This is why it is common practice to select and focus on a sample.
  • Sample = a subset of a population, a group of cases for whom we have data from the broader population we are interested in. The sample should be representative of the characteristics present in the broader population it is drawn from. Randomness is the strategy to maximise the representativeness of the sample. Random sample = A sample chosen from a population such that each

case belonging to the population has an equal chance of being selected (as

in a lottery).

- Descriptive statistics : a branch of statistics whose goal is to describe

and summarise the characteristics of a sample of cases from which we have

collected data. Analytical tools: such as frequencies tables , graphs,

measures of central tendency; measures of variability and dispersion. Warning: based on descriptive statistics we can advance interpretations about what has emerged from the analysis of our sample, but we should refrain from making generalizations about the broader population. Inferential statistics : a branch of statistics whose goal is to make generalisations ( to infer) regarding the broader population based on the analysis of a sample of cases selected from the population.

we need to formulate a conceptual definition of the phenomenon under examination. A conceptual definition is a description of a given phenomenon, which should highlight two main aspects of the phenomenon: a) units of analysis : the entities to which the phenomenon applies b) qualifying characteristics : try to describe the phenomenon of interest as accurately as possible, by highlighting those aspects that allow recognizing it in the real world. These characteristics are also called indicators , as recognizing their presence in the empirical reality indicates the presence of the phenomenon under examination. Step 2. Think in terms of variables by translating the phenomenon characteristics into properties that can take different modalities. having defined the phenomenon under examination from a conceptual viewpoint, we should ‘translate’ the phenomenon and its qualifying characteristics into properties that could apply to our units of analysis. different modalities (or status) these properties can take, with reference to our units of analysis. In general, a given property:

  1. could be either present or absent
  2. could assume different forms
  3. can be possessed or displayed in various quantities As we start thinking in terms of properties that can assume different modalities across the relevant units of analysis, we have transformed the phenomenon under examination and its qualifying characteristics into variables. Variable: a property whose modality or status can vary. Variables must possess two characteristics:  They must have a name, which generally is the name of the property they are derived from.  They must have at least two possible modalities. Variation may occur in two main ways:
  4. Across the subjects/objects/events representing our units of analysis.
  1. Over time. Step 3. Formulate an operational definition that establishes the measurement strategy. The final step of the process of operationalization consists in the formulation of an operational definition of our variables. The operational definition of a variable is a description of the procedure that we should follow to measure the variable.
  2. The actual measurement of a variable is the activity of applying the operational definition of a variable to the cases that we selected as part of our sample. An operational definition must address two main issues:

1. What empirical evidence we should observe to assess the presence of

the phenomenon

2. How to record the relevant information

Measurement validity and reliability The formulation of the operational definition of a variable should be inspired by two main principles, namely, validity and the reliability. In general, we want our measurement strategy to be as valid and reliable as possible. Validity refers to the degree to which a measurement strategy is able to measure what it is intended to measure. Validity is about the accuracy of the measurement strategy. A valid measure accurately represents the concept that it is supposed to measure, it provides a clear link between the concept and the empirical reality. Reliability relates to the consistency of a measurement strategy and, specifically, the extent to which a measure yields identical results if repeated multiple times and/or by different persons. A measurement strategy is reliable if applying the same operational rules on the same case will produce always the same result, assuming that nothing changes from one measurement to the other.

The operationalization of a nominal variable requires identifying two or more categories corresponding to different modalities of the property being measured.

Categories need to be mutually exclusive and jointly exhaustive, so that all

the cases in our sample can fit in one and just one category.

  • Mutually exclusive : categories should not overlap; they should be designed in a way that each observed case can be assigned into only one category.
  • Jointly exhaustive : categories should encompass all the possible modalities the variable can take, so that every case can be assigned a value. A nominal variable that can take only two values is called binary , dichotomous , or dummy. Binary variables are especially useful if we want to distinguish cases that have or do not have a given property. A nominal variable that can take three or more values is said polychotomous. the values of a nominal variable do not have any inherent order and they cannot be ranked. even if we use numbers, with nominal variables we cannot use the ordinal and cardinal properties of numbers.

- Remember : if we recode categories into numbers, keep track of what

categories each of these numbers identify. Ordinal variables Ordinal variables are similar to nominal variables, to the extent that they are organised in categories, but are more precise. The core trait of an ordinal variable is that its values can be ordered in a meaningful way. seize similarities and differences between cases, but also allows comparisons in terms of the position of the cases relative to each other. The operationalization of an ordinal variable requires us not only to identify various categories, but also to establish an order between these categories. The measurement, in turn, implies not only classification but also ordering. ordinal variables do not tell the absolute magnitude of the difference between the ordered levels. The distance between two adjacent levels of an ordinal variable is not necessarily uniform across all levels.

The numbers must reflect the ordering. However, the sequence is what matters, not the exact value. In other words, the numbers of an ordinal variable have no real numeric meaning.

- Remember : If we recode ordered categories into numbers, keep track of

what categories these numbers identify. Interval and ratio variables Interval variables are measured using numerical scales and they tell us exactly “how much” the property being measured is present in an observed case. Importantly, in interval variables the intervals between two adjacent values always are of the same size. With interval variables, a one-unit increase in the value of the variable indicates the same amount of change across all the values of the variable. However, not all variables measured using an interval scale have a true zero point.

  • A scale is said to have a true zero when the value 0 truly indicates “nothing”. Interval scales with a true zero point are called ratio scales. In a ratio scale variable, a value equal to zero indicates the full absence of the property being measured, it truly means “nothing”. Special variables: rating scales and indexes Rating scales: researchers create scales of values, typically ranging from 0 to 10, asking respondents to rate how much ‘something’. Indexes : if a concept is ‘multidimensional’ and cannot be measured based on a single characteristic, we can create an index: a variable resulting from the aggregation of two or more other variables. Indexes typically range from 0 to 1, from 0 to 10, from 0 to 100, etc. These final scores are obtained by summing, multiplying, etc. the scores relative to other variables. Alternative approaches to classifying variables Besides the level of precision of their measurement scale, variables can be classified based on other key characteristics. Some frequently used distinctions include:

Summary Nominal variable : a categorical (qualitative and discrete) variable that only captures similarities and differences across cases. Categories can be assigned numeric values, but these numbers have no mathematical property. Ordinal variable : a categorical (qualitative and discrete) variable that captures not only similarities and differences across cases but also relationships such as ‘greater than’ and ‘less than’. Categories can be assigned numeric values, but these numbers only have ordinal properties. Interval variable : a quantitative variable (either continuous or discrete) that captures similarities and differences across cases not only regarding their relative positions (greater/less than) but also regarding their distance. They are always made of numeric values, and these numbers have full mathematical properties.

 Data must be collected, based on the established ‘plan of action’ (operationalisation).  The collected data must be organised in a format that allows them to be analysed. Collecting data To collect data, we should:

  1. Select the sample of cases that we will observe and from which we will collect data.
  2. Apply to each case in our sample the operational rules previously defined to ‘measure’ each variable we are interested in. Each measurement will generate a datum = a piece of information collected from a particular case/observation relative to a specific variable. In general, data come from two main sources: experiments or observation.  Experimental data are obtained in “controlled” settings, specifically designed for generating new data, in which the researcher is able

to fully control the conditions and experiences of the participants to the experiments.  Observational data are obtained by observing reality as it is. Depending on the unit of analysis (and more generally the phenomena and research questions we are interested in), we may resort to different techniques to collect this kind of data primary and secondary data. Primary data are new data that we can generate through a plurality of methods such as surveys, interviews, expert evaluations, consultation of documents, etc.  The advantage is that the researcher can create their own data according to their own research goal.  The disadvantage is that generating new data requires a lot of time and resources. Secondary data are data that already exist and that have been created by others, such as other researchers ( research data ) or administrative offices ( administrative data ).  The advantage derives from saving time and resources.  One disadvantage is that these data have been collected for purposes that are not necessarily similar to ours and do not directly address our research questions. However, we can collect and then ‘transform’ secondary data to adapt them to our research design. Organising data bring order to the data we have collected. The most commonly used method for organising data to prepare them for statistical analysis is the creation of a dataset in the form of a data matrix. Datase t: a collection of data organised in the form of a data matrix. Recall that we have collected data regarding a certain number N of cases (or observations) and relative to a certain number V of variables; Hence, we have measured each case relative to each variable, generating a number of data equal to N x V. Data matrix : a spreadsheet in tabular form representing a collection of data organized in rows and columns.

Panel dataset (also called time-series cross-sectional). A dataset that incorporates both cross sectional and time-series variations, by recording information regarding a plurality of cases, each case being observed at two or more time periods. Dataset codebook. Any dataset must be accompanied by its own codebook describing its structure and content. The codebook is like a dictionary that allows you to ‘decipher’ a dataset, which otherwise may appear as a rather obscure collection of textual and numeric values. To create a good codebook, it is essential to keep track of what we do when we operationalise variables, collect data, and build the dataset.  First, a codebook should describe the dataset, providing information on the unit of analysis, the number of observations, the kind of information collected, the time to which this information refers, and the structure of the dataset.  A codebook should provide a list of all the variables contained in the dataset, along with variable-level details for each variable, such as:  The variable name;  A brief description of the concept/property the variable is derived from, what phenomenon the variable measures;

 The scale of measurement (nominal, ordinal, interval and, in the latter case, whether it is discrete or continuous);  The modalities the variable can take, its categories or range of numerical values (e.g. from 0 to 10) depending on the scale of measurement;  For variables whose categories have been assigned numeric values, it is essential to illustrate how numbers and categories relate to each other.  The source of the data.  Additional notes, remarks, or comments that contextualize the information conveyed in the variable. Managing data and datasets with Excel Importing data from data hubs to conduct your research based on secondary data, for instance using data from one of the previously described data hubs. You will need to: download the dataset from the internet import these data into the software you will use to conduct data analysis. Since several programs for data analysis exist, often datasets are made available online as files in a special format that is compatible with multiple data analysis programs. Some of these special formats are:  .csv (comma separated values)  .tsv (tab separated values)  .txt (text) A step-by-step procedure to import data from a csv file to an Excel spreadsheet

  1. Download the dataset of interest in your own computer.
  2. Open Excel and a new empty spreadsheet.
  3. Go in the Data tab from the upper menu and specifically in the command group Get & Transform Data.
  4. Follow this sequence: Get Data → From Text → From Text/CSV.

If you are using filters to create a smaller dataset, after you apply the preferred filters, you should better copy the smaller dataset and paste it into a separate worksheet. In general, when you apply filters, remember to also remove them at the end. You just need to click again on the FILTER command. Transforming data A few preliminary caveats:  Always duplicate the original data before operating any transformation.  Do not modify the original data. Always keep track of the transformations that you operate in the codebook.

Frequency distribution analysis

Summarization is the process of taking a potentially large volume of data and reducing it to a few quantities that adequately represent the data so that the data can be easily understood, without losing (too much) information the analysis of categorical variables (nominal and ordinal) requires techniques that are fewer and simpler than the techniques required and available for analyzing interval variables. The first method for conducting descriptive univariate analysis that we will examine is the so-called frequency distribution analysis. It represents the main method to analyze nominal and ordinal variables, even though it can be used with interval variables too. Frequency distribution (in general) First thing: s how the data (the information we obtained from a sample of observed cases) are distributed across the range of the possible values (either categorical or numeric) the variable under examination can take. All these “how many” questions investigate the number of times (or how frequently) a certain variable takes certain values (either categories or numbers, depending on the measurement scale) across the observed cases. More generally, when we ask this kind of questions, we are interested in the frequency distribution of a variable

Frequency = the number of times a variable takes a certain value within a sample of observed cases, or the number of times the modalities (or status) represented by the values of a variable occur Frequency distribution of a variable = the count of the number of occurrences of each value of a variable within a sample of observed cases; the number of times each value occurs. It is informative about how the possible values of a variable (i.e. the possible modalities of the property measured by a given variable) are distributed in the empirical reality under examination (our sample of cases). Frequency distribution analysis = it simply consists of a summary display for the frequency distribution of a variable, in terms of how often each of the possible values of a variable occur in the sample of observed cases. Frequency Table = a table that lists all the possible values of a variable and in which each value of the variable is associated with the frequency with which it is present in the sample of cases under examination. For each particular value of the variable being examined, frequency tables show how many cases/observations take on that value. Frequency tables count how many times each value of the variable occurs in the sample of observed cases. Frequency distribution analysis of nominal variables The frequency distribution of a nominal variable shows all the categories and how many observations fall into each category. How to report frequencies for nominal variables: absolute and relative frequencies Absolute (or raw) frequencies = The raw number of times each value of the variable under examination occurs in the sample of observed cases. Absolute frequencies are the simple counting of how many cases in a sample display each value of the variable under examination. For a nominal variable, absolute frequencies simply represent the number of cases that fall in each category. how the absolute frequency recorded for a particular category relates to the total observed cases and thus also to the absolute frequencies recorded for the other categories within the variable. Relative frequencies = The proportion (or share) of cases in a sample that take a certain value of a variable. Relative frequencies tell us how many

Graphic presentation of frequency distribution for nominal variables. The information summarized in a frequency distribution table can be displayed using graphs. From a statistical viewpoint, tables should be preferred to graphs. In some situations, however, graphs have the advantage of conveying (about) the same information visually, that is, in a way less intimidating for an audience with no specific expertise in data analysis and statistics. The two most frequently used and easy-to-interpret graphical displays for summarizing the frequency distribution of a nominal variable are the bar chart and the pie chart. Both can be created starting from the information contained in a frequency distribution table Caution: When you use graphs to analyse data, it is very important to include titles, labels, legends, and notes explaining as clearly as possible what the graph actually illustrates and how to interpret it. Bar charts A bar chart displays the frequency distribution of a nominal variable using a series of rectangles (vertical bars) of different heights. There must be a rectangle for each category of the variable. each category of a variable should be assigned a rectangular vertical bar whose base lies along the horizontal axis. If the variable has two categories, we need to create two bars along the horizontal axis, etc.

  • The bases should be equal width, and not touch each other.
  • Each bar should be labelled with the name of the corresponding category.
  • The label should be placed below the base of the rectangle.
  • The height of each bar is measured along the vertical axis and represents the frequency (absolute or relative freq.) associated with the corresponding category
  • The vertical axis should be labelled to clarify if it measures raw frequencies or relative frequencies. You can choose to represent either absolute or relative frequencies, but be clear about what the bars actually measure.
  • Since categories of nominal variables are unordered the sequence of the bars is arbitrary

Pie charts A pie chart is a graph showing the relative frequencies in percentages of a variable’s frequency distribution. It is a circle (a pie), whose total area is cut into two or more segments (the slices of the pie).The size of the area of each slice of the pie is proportional to the relative frequency of the corresponding category. we must find the correct angle for each slice of the pie. There are 360 degrees in a complete circle; therefore, we multiply each percentage by 3.6 to find the central angle of each slice. They are not recommended, however, when variables have a larger number of categories besides the name of the category, it is recommended to always report the actual percentage represented by each slice. Frequency distribution analysis of ordinal variables Ordering categories. Since the categories of an ordinal variable by definition have a meaningful order, the order of the rows in a frequency distribution table must be consistent with the inherent order of the variable’s categories. We can opt for either an ascending or a descending order, but we must follow an order. Cumulative relative frequencies. When we describe an ordinal variable with a frequency distribution table, besides absolute and relative frequencies, it is useful to include an additional column reporting the cumulative relative frequencies and, specifically cumulative percentages. A cumulative percentage records the percentage of cases (relative to the total cases) that fall:

  • Either at and below any given value of a variable = bottom-up cumulative percentages,
  • Or at and above any given value of a variable = top-down cumulative percentages.
  • We start from one of the ‘extreme’ categories of an ordinal variable (either the lowest or the highest), whose cumulative percentage is just equal to its percentage.