Docsity

Riassunto settimane 6-11, Sintesi del corso di Metodologia della ricerca

Toggle sidebar
bg1
RESEARCH METHODS FOR SOCIAL SCIENCES
Complete exam study guide
Weeks 7–10 + R Lab 10 · Exploratory Data Analysis · Association · χ² test ·
Correlation · Simple and Multiple Linear Regression
Built from the six lecture files (Week 7 I–III, Weeks 7-8 I–II, Weeks 9-10 I, Prof. Luca Secondi), R Lab 10 on
multiple regression (F. Brogi) and your handwritten notes
How to read this guide
■ DEFINITION a definition you must be able to state in words
■ FORMULA a formula – with the meaning of every symbol
■ EXAMPLE a worked example with the numbers from the lectures
■ WATCH OUT a classic mistake or trap
■ REMEMBER the key idea to memorise
■ R OUTPUT R / R-Studio output explained
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

Anteprima parziale del testo

Scarica Riassunto settimane 6-11 e più Sintesi del corso in PDF di Metodologia della ricerca solo su Docsity!

RESEARCH METHODS FOR SOCIAL SCIENCES

Complete exam study guide

Weeks 7–10 + R Lab 10 · Exploratory Data Analysis · Association · χ² test ·

Correlation · Simple and Multiple Linear Regression

Built from the six lecture files (Week 7 I–III, Weeks 7-8 I–II, Weeks 9-10 I, Prof. Luca Secondi), R Lab 10 on multiple regression (F. Brogi) and your handwritten notes

How to read this guide

■ DEFINITION a definition you must be able to state in words ■ FORMULA a formula – with the meaning of every symbol ■ EXAMPLE a worked example with the numbers from the lectures ■ WATCH OUT a classic mistake or trap ■ REMEMBER the key idea to memorise ■ R OUTPUT R / R-Studio output explained

Contents

    1. The basic vocabulary
    1. Explanatory vs response variables
    1. Frequency distributions and tables
    1. Graphical representations and their properties
    1. The shape of a distribution
    1. Measures of center: mean, median, mode
    1. Measures of variability: range, standard deviation, variance
    1. Measures of position: percentiles, quartiles, IQR, box plot, z-score
    1. Reading statistics critically
    1. Association between two categorical variables
    1. The Chi-square (χ²) test of independence
    1. Association between two quantitative variables
    1. Association vs correlation vs causation vs regression
    1. Linear regression
    1. Multiple linear regression
    1. Understanding R output
    1. Check your handwritten notes
    1. Formula sheet
    1. Self-test

2. Explanatory vs response variables

Who explains whom? The first question in every bivariate analysis

Explanatory variable (x) Response variable (y)

Definition the variable we use to something^ explain or predict^ the variable we outcome^ want to explain : the

Other names independent variable, predictor, "cause"candidate dependent variable, outcome

Symbol x y In a contingency table rows^ (they define the groups we compare)^ columns In a scatterplot horizontal axis vertical axis In a regression on the right: ŷ = a + b x on the left: ŷ = a + bx In R after the tilde: lm(y ~ x ) before the tilde: lm( y ~ x)

How to recognise them

  • Ask: "Does a change in A go with a change in B?" → A is explanatory, B is the response.
  • Time order helps: the explanatory variable usually comes first (gender exists before an opinion is formed; education comes before income).
  • The research question names the outcome: "Is feeling towards the EU associated with gender?" → feeling = response. Research question (from the lectures) x (explanatory) y (response)

Is the feeling towards the EU associated with gender? Gender Feeling (hope / doubts /confidence)

Is the murder rate related to poverty? Poverty rate Murder rate Does consumption grow with disposable income? Disposable income Household consumption Does income depend on years of education? Years of education Annual income Is happiness associated with being religious? Religious (yes/no) Happiness

WATCH OUT · Explanatory ≠ cause Calling x "explanatory" is a modelling choice , not a proof that x causes y. Association does not imply causation (see Section 13). Symmetric or not? Independence and correlation are symmetric : swapping x and y gives the same χ² and the same r. Regression is not symmetric: regressing y on x gives a different line than regressing x on y – so choosing who is x matters.

REMEMBER

Practical rule for tables: put the explanatory variable in the rows and compute the percentages within each row (each row sums to 1). Then you compare the response across the groups on the same scale.

3. Frequency distributions and tables

Week 7 (I)

DEFINITION · Frequency distribution A listing of the possible values (or categories) of a variable, together with the number of observations at each value. Absolute frequency = a count (how many observations). Relative frequency = proportion or percentage, used to compare categories more easily.

FORMULA · Proportion and percentage

A proportion lies between 0 (nobody belongs to the category = 0%) and 1 (all observations belong to it = 100%). All proportions together sum to 1.

EXAMPLE · People at risk of poverty or social exclusion by household type, EU 2019 (Tab1) Type of household Number Proportion Percentage Single person 30,550,736 0.321 32. One adult <65 years 32,644,556 0.343 34. Two adults 14,751,913 0.155 15. Three or more 17,226,427 0.181 18. Total 95,173,632 1.000 100. E.g. 30,550,736 / 95,173,632 = 0.321 → 32.1%. A table with proportions/percentages is a relative frequency distribution.

Grouping a quantitative variable into intervals

For a quantitative variable with many values we group them into intervals (classes). As with every summary, we lose some information as the cost of gaining clarity.

  • Intervals are usually of equal width.
  • They must include all possible values of the variable (exhaustive).
  • They must be mutually exclusive : every observation falls in exactly one interval.

EXAMPLE · % of seats in parliament held by women, 59 countries (Tab2) Interval (%)

(2.65, 0.3]

(10.3, 7.8]

(17.8, 5.4]

(25.4, 3]

(33,40. 6]

(40.6, 8.1]

(48.1, 5.8] Total Frequency 6 7 16 11 9 7 3 59 Percentage 10.2 11.9 27.1 18.6 15.3 11.9 5.1 100 The most frequent class is 17.8–25.4%. "(10.3, 17.8]" means more than 10.3 and up to and including 17.8. In R: table(cut(x, breaks = 7)).

4. Graphical representations and their properties

Week 7 (I) and (II): reading, interpreting and discussing EDA

The main graphs of the course (bar chart and stacked bar use lecture data; the other panels are illustrations)

Graph Variabletype What it shows Key properties Watch out

Bar chart (vertical or horizontal)

categorical (also discrete)

frequency or % of each category

one bar per category; height = frequency ; bars separated by gaps; order of bars can be changed (horizontal bars are good for long labels)

the axis should start at 0, otherwise differences look bigger

Pie chart categorical composition of awhole^ slices are % of a total, must addup to 100%

only with few categories; hard to compare similar slices – a bar chart is often clearer

Line chart quantitativeover time trends (time series)

points joined by lines in time order; several lines = several groups (e.g. EU-27 vs Italy S80/S20)

distinguish a level from a trend

Histogram quantitative thedistribution^ shape^ of the

one bar per interval ; bars touch; x-axis is a number line; discrete with few values → one bar per value

the look depends on the choice of intervals

Stacked bar / composition

shares of a total

how a total is split (e.g. income shares by quintile)

each segment = a share; segments sum to 100%

segments other than the first are hard to compare

Box plot quantitative

center, spread, tails, outliers (5-number summary)

box = middle 50% (Q1 to Q3); line = median; whiskers; outliers marked separately; side-by-side box plots compare groups

the whisker rule must be stated (1.5·IQR or P10–P90)

Scatterplot two quantitative^ relationshipbetween x and y

one point (xi, yi) per observation; checks whether a relation is linear ; shows outliers

a pattern is association, not causation

Graph Variabletype What it shows Key properties Watch out

Dot / range chart

quantitative by group

compare 2 groups across categories (e.g. boys vs girls school attendance by wealth quintile)

two dots per category joined by a line = the gap —

Lorenz curve distribution ofincome inequality

cumulative % of population (x) vs cumulative % of income (y); the further below the diagonal, the more unequal

describes a distribution, does not identify a cause

Bar chart vs histogram – the classic exam question

Left: Eurobarometer feelings (categorical). Right: women in parliament, intervals from Tab2 (quantitative) Bar chart Histogram Variable categorical quantitative (numerical) x-axis categories (labels) a number line divided into intervals Bars separated by gaps touching (adjacent intervals) Order of bars can be changed fixed by the numbers What we read which category is most frequent the shape : center, spread, skewness, tails

The mean is pulled towards the long tail; the median stays in the middle of the ordered data; the mode is at the peak

REMEMBER · The rule to memorise

Skewed right: mean > median. Skewed left: mean < median. Symmetric unimodal (bell): mean = median = mode.

Example (Week 7 III): Italy, EU-SILC 2024 – mean equivalised disposable income €23,651, median €20,605. Mean > median by €3,046 → the income distribution is skewed to the right (long upper tail).

To compare the distributions of 2 groups, make numerical comparisons with descriptive statistics (mean, median, sd, quartiles), not only pictures.

6. Measures of center: mean, median, mode

Week 7 (I)

6.1 The mean (average)

DEFINITION · Mean The sum of the observations divided by the number of observations. It describes the center of a frequency distribution for a quantitative variable.

FORMULA · Sample mean

n = sample size; y 1 , …, yn = the observations; ȳ ("y-bar") = sample mean; Σ ("sigma") = "add up".

EXAMPLE

y 1 = 10, y 2 = 20, y 3 = 25 → ȳ = (10 + 20 + 25) / 3 = 55 / 3 = 18.

Properties of the mean

  • Appropriate only for quantitative variables.
  • It can be highly influenced by outliers (an observation very different from the rest).
  • It is pulled in the direction of the longer tail of a skewed distribution (e.g. GDP growth rates, Tab3, skewed to the right).
  • It is the center of gravity (balance point): the sum of the distances to the mean from the observations above it equals the sum of the distances from those below it (deviations sum to 0).
  • For two groups combined, the overall mean is a weighted average : each group mean is multiplied by its number of observations.

FORMULA · Weighted mean of two groups

Example: 10 students with mean 20 and 30 students with mean 28 → (10·20 + 30·28)/40 = (200 + 840)/40 = 26 (not (20+28)/2 = 24: the bigger group weighs more).

EXAMPLE · How one outlier moves the mean (and not the median) Incomes 20, 22, 25, 27, 30 → mean = 24.8, median = 25. Replace 30 with 300 → mean = (20+22+25+27+300)/5 = 78.8 , median still 25.

6.2 The median

DEFINITION · Median The observation that falls in the middle of the ordered sample. It splits the sample into two parts with an equal number of observations (ordered from lowest to highest or vice versa): 50% below, 50% above. It is the 50th percentile.

6.4 Mean vs median vs mode – which one?

Mean Median Mode Nominal data no no yes Ordinal data no (only if we assign scores) yes yes Quantitative data yes yes yes Uses all numerical values? yes^ no (only the order)^ no Affected by outliers? yes, strongly no no

Best when…

distribution close to symmetric or mildly skewed, or discrete with few distinct values

distribution highly skewed (income!) or ordinal data

categorical data; to find the most typical category

EXAMPLE · Mean of ORDINAL data: only if we assign scores To compute a mean for ordinal categories we must give each category a number. In the lecture, the categories of professional status are given scores that approximate the years of education → mean = 11.8. The result depends on the scores chosen, which is why the median is the natural measure for ordinal data.

REMEMBER

Lecture conclusion: the median is usually preferred when the distribution is very highly skewed (and for ordinal scales); if the distribution is close to symmetric or only mildly skewed, the mean is usually preferred because it uses the numerical values of all the observations. When a distribution may be asymmetric, report both.

7. Measures of variability: range, standard deviation, variance

Week 7 (I)

DEFINITION · Variability How spread out the observations in a dataset are. A measure of center alone is not adequate : it describes a typical value (e.g. the mean) but not the spread of the data about the mean.

Two countries with the same mean income: country B's incomes are more tightly centered around the mean

7.1 The range

FORMULA · Range

Example: nation A incomes from $0 to $50,000 → range $50,000; nation B from $20,000 to $30,000 → range $10,000. Nation A has greater variability.

WATCH OUT · Weakness of the range The range uses only 2 observations, so it is not sensitive to the other characteristics of variability: distributions with the same mean and the same range can be very different in how the data are spread around the center. It is also driven by extreme values (outliers). (In your notes this was marked with a +, but it is a limitation .)

7.2 Deviations

DEFINITION · Deviation

positive when the observation is above the mean, negative when below , zero when equal to the mean.

8. Measures of position: percentiles, quartiles, IQR, box plot, z-score

Week 7 (I) and (III)

DEFINITION · Measure of position Tells us where a particular value is located within a dataset: the value below (or above) which a given percentage of the data fall. We already met two: the range (uses max and min) and the median (50% below, 50% above).

DEFINITION · Percentile The p-th percentile is the value such that p% of the observations fall below or at it and (100 − p)% fall above it. Example: 25th percentile → 25% below, 100 − 25 = 75% above. The 50th percentile is the median.

Name Percentile Meaning

Q1 – lower quartile 25th one quarter of the data fall below it. = median of theobservations below the median

Q2 – median 50th half below, half above

Q3 – upper quartile 75th one quarter of the data fall above it. = median of theobservations above the median

Deciles D1…D10 / P10, P90 10th, 20th, …,90th divide the data into 10 groups of 10% each (used for income)

FORMULA · Interquartile range

It measures the spread of the middle 50% of the observations. IQR increases as variability increases → useful to compare groups. It is not sensitive to outliers (it ignores the 25% at each end), unlike the range and the standard deviation. For bell-shaped distributions the distance from the mean to each quartile ≈ ⅔ s, so IQR ≈ (4/3)s.

EXAMPLE · Quartiles by hand (HDI data, n = 15) Ordered: 5.3 5.9 13.3 14.1 20.5 21.1 21.2 | 23.5 | 29.5 30.0 31.4 32.9 39.3 48.4 53. Median = 23.5. Lower half (7 values) → its median = Q1 = 14.1. Upper half → Q3 = 32.9. IQR = 32.9 − 14.1 = 18.. (Software uses slightly different interpolation rules, so R's quantile() may give slightly different numbers.)

Box plot and outliers

Box plot of the HDI data, with an imaginary extra value 82 to show how an outlier is marked

DEFINITION · Box plot (box-and-whisker plot) Graphs the five-number summary : minimum, Q1, median, Q3, maximum. The box contains the central 50% (from Q1 to Q3); a line inside marks the median ; the lines going out are the whiskers , to the min and max unless those are outliers – then they stop at the most extreme observation within 1.5·IQR and the outliers are drawn as separate points. Side-by-side box plots are very useful to compare groups (e.g. murder rate USA vs Canada).

FORMULA · Outlier rule (1.5 × IQR)

HDI example: lower fence 14.1 − 1.5·18.8 = −14.1; upper fence 32.9 + 1.5·18.8 = 61.1 → no outliers (max 53.2). A value of 82 would be an outlier. Caution: with a long right tail some observations may exceed the fence without being really separated from the data. Treat a high value as a signal to investigate, not an automatic error ; repeat the analysis without it to check whether conclusions change.

9. Reading statistics critically

Week 7 (III): descriptive statistics with current European data

REMEMBER · One number is rarely enough The mean, the median and the whole distribution answer different questions. Italy 2024: mean income €23,651 vs median €20,605. Median age 1 Jan 2025: Italy 49.1 (highest in the EU), EU 44.9 , Bulgaria 47.3, Ireland 39.6. Median age splits a population into a younger and an older half.

A distribution starts with a denominator : e.g. Italy's population by age, as shares of all residents: 0– = 11.9%, 15–64 = 63.4%, 65+ = 24.7%.

WATCH OUT · Before quoting a statistic, check four things Question Examples What is the unit? person, household, country, observation? Who is included? target population, sample, exclusions?

Which time period? collection year and reference year may differ (EU-SILC 2024 refersto income in 2023)

Which definition? nominal or real income? equivalised or raw?

What EDA CAN show What EDA CANNOT show alone Italy's S80/S20 ratio was 5.53 in 2024 why the ratio has that value Italy's median age was 49.1 years in 2025 which policy changed the distribution the income mean exceeded the median whether one variable caused another

DEFINITION · Where the lecture examples come from (Week 7 II and III) Source Used for UN – Integrating a Gender Perspective into Statistics

how to build and read frequency tables, bar, line, pie charts, scatterplots

Eurostat (EU-SILC 2024, regional yearbook) income quantiles, S80/S20, decile shares, median age byregion

Bank of Italy (SHIW survey) income distribution shape; consumption, income, saving(SHIW 2016)

FAO, World Bank (LAC Equity Lab), OECD examples of histograms, poverty indicators, box plots European Social Survey, Eurobarometer, Flash Eurobarometer, GESIS

survey microdata for association analysis (Flash Eurobarometer 2019: feeling × gender)

REMEMBER

Description and explanation are different stages of analysis. Descriptive statistics establish patterns ; a research design (data, comparison, method) is needed to investigate explanations. A country comparison says nothing by itself about the causes of inequality.

10. Association between two categorical variables

Weeks 7-8 (I): contingency tables, conditional distributions, independence

DEFINITION · Association Two variables are associated if certain values of one variable tend to go with certain values of the other. In the population, an association exists if the distribution of the response variable changes as the value of the explanatory variable changes. Looking at two variables together = bivariate analysis.

Running example – Flash Eurobarometer 2019 ("Emotions and political engagement towards the EU"), a sub-sample of 848 people: is the feeling that first comes to mind about the EU (Confidence, Doubts, Hope) associated with gender?

DEFINITION · Contingency table Displays the number of subjects observed at all combinations of the outcomes of two categorical variables. Each row = a category of the explanatory variable (the groups compared); each column = a category of the response. With 2 rows and 3 columns it is a 2 × 3 ("2-by-3") table. Gender Confidence Doubts Hope Total Female 142 169 164 475 Male 137 137 99 373 Total 279 306 263 848 The row totals (475, 373) and column totals (279, 306, 263) are the marginal distributions (they are in the "margins" of the table).

DEFINITION · Conditional distribution To compare groups of different size , compare percentages, not counts : divide every number of a row by that row's total. Each row then sums to 1 and is a conditional distribution of the response given the group (both groups on the same scale). Gender Confidence Doubts Hope Total Female 142/475 = 0.30 169/475 = 0.36 164/475 = 0.35 1 Male 137/373 = 0.37 137/373 = 0.37 99/373 = 0.27 1 0.30 = 142/475 is a conditional frequency : the proportion of females who feel Confidence.