---
title: "Why experiment? | *Pourquoi faire des expériences ?*"
author: "Brice + Vin"
date: today
bibliography: assets/learningdays-book.bib
format:
  revealjs:
    embed-resources: true
execute:
  freeze: auto
---


## Welcome | *Bienvenue*

::: {.columns}
::: {.column .lang-en width="50%"}

- Who we are, what EGAP is
- Introductions


:::
::: {.column .lang-fr width="50%"}

- Qui sommes-nous, qu'est-ce qu'EGAP
- Présentations

:::
:::

## Welcome | *Bienvenue*

::: {.columns}
::: {.column .lang-en width="50%"}

- Goals of this workshop
  - Understand what an experiment is
  - Understand the main experimental design decisions
  - Understand how to analyze and interpret experimental data
  - Build communities of researchers and practitioners in Africa
- Structure
  - Combination of lectures
  - Exercises in class / Activities

:::
::: {.column .lang-fr width="50%"}
- Objectifs de l'atelier
  - Comprendre ce qu'est une expérience
  - Comprendre les principales décisions d'un design expérimental
  - Comprendre comment analyser et interpréter des données expérimentales
  - Construire des communautés de chercheurs et de praticiens en Afrique
- Structure
  - Combinaison de cours magistraux
  - Exercices en classe / Activités

:::
:::

## Welcome | *Bienvenue*

::: {.columns}
::: {.column .lang-en width="50%"}

- Ground rules
  - We help each other: respectful communication
  - We all know this is often hard: Ask for help
  - Computers away except for exercises
- Resources
  - We will share resources on-line [https://egap.github.io/learningdays-resources/abidjan_2026/](https://egap.github.io/learningdays-resources/abidjan_2026/)
  - We will share resources on a thumb drive

:::
::: {.column .lang-fr width="50%"}

- Règles de conduite
  - Communication respectueuse
  - Demandez de l'aide
  - Ordinateurs rangés sauf pour les exercices
- Ressources
  - Nous partagerons des ressources en ligne [https://egap.github.io/learningdays-resources/abidjan_2026/](https://egap.github.io/learningdays-resources/abidjan_2026/)
  - Nous partagerons des ressources sur une clé USB

:::
:::

## Key points for this lecture | *Points clés du cours*

::: {.columns}
::: {.column .lang-en width="50%"}

- What are the limitations of observational research?
- What is a randomized experiment?
- Who uses experiments?
- What are experiments good for (and not)?

:::
::: {.column .lang-fr width="50%"}

- Quelles sont les limites des études observationnelles ?
- Qu'est-ce qu'une expérience aléatoire ?
- Qui utilise les expériences ?
- À quoi servent les expériences ?

:::
:::


## The big picture | *La vue d'ensemble*

$$X \overset{?}{\rightarrow} Y$$

## What is X called? What is Y called? | *Comment appelle-t-on X ? Comment appelle-t-on Y ?*

$$X \overset{?}{\rightarrow} Y$$

::: {.columns}
::: {.column .lang-en width="50%"}

- What is X called?
- What is Y called?

:::
::: {.column .lang-fr width="50%"}

- Comment appelle-t-on X ?
- Comment appelle-t-on Y ?

:::
:::

## What is X called? What is Y called? | *Comment appelle-t-on X ? Comment appelle-t-on Y ?*

$$X \overset{?}{\rightarrow} Y$$

::: {.columns}
::: {.column .lang-en width="50%"}

- **X**: independent variable, treatment
- **Y**: dependent variable, outcome variable

:::
::: {.column .lang-fr width="50%"}

- **X** : variable indépendante, traitement
- **Y** : variable dépendante, variable de résultat

:::
:::

## What is the impact of decentralization on corruption? | *Quel est l'impact de la décentralisation sur la corruption ?*

::: {.columns}
::: {.column .lang-en width="50%"}

- How would we try to answer that question?

:::
::: {.column .lang-fr width="50%"}

- Comment y répondre ?

:::
:::

## Observational research: the usual approach | *Études observationnelles : l'approche habituelle*

::: {.columns}
::: {.column .lang-en width="50%"}

- Download and merge existing datasets
- Measure naturally occurring behaviors or outcomes, perhaps by running a survey
- Observe, don't intervene or treat

:::
::: {.column .lang-fr width="50%"}

- Télécharger et fusionner les bases de données existants
- Mesurer les comportements ou d'autres résultats, par exemple en menant un sondage
- On observe, sans intervenir ni traiter

:::
:::

## An observational study of decentralization | *Une étude observationnelle de la décentralisation*

::: {.columns}
::: {.column .lang-en width="50%"}

- Fisman and Gatti (2002): "Decentralization and corruption: evidence across countries" (cited 2,423 times)
- Data from transparency international and IMF on 80 countries; OLS regression (with controls)
- Finds a strong country-level correlation between fiscal decentralization in government expenditure and lower corruption
- World Bank heavily promoted decentralization in the 1990s and 2000s

:::
::: {.column .lang-fr width="50%"}

- Fisman et Gatti (2002) : "Decentralization and corruption: evidence across countries" (cité 2 423 fois)
- Données de Transparency International et du FMI sur 80 pays ; régressions MCO (avec variables de contrôle)
- Constate une forte corrélation au niveau des pays entre la décentralisation fiscale des dépenses publiques et une baisse de la corruption
- La Banque mondiale a fortement encouragé la décentralisation dans les années 1990 et 2000

:::
:::

## Should the World Bank believe that decentralization decreases corruption, based on Fisman and Gatti (2002)? | *La Banque mondiale devrait-elle croire que la décentralisation réduit la corruption ?*

::: {.columns}
::: {.column .lang-en width="50%"}

- Countries that decentralize may
    - Be less corrupt to begin with
    - Have stronger civil societies
    - Adopt other governance reforms at the same time

:::
::: {.column .lang-fr width="50%"}

- Les pays qui se décentralisent sont peut-être
    - moins touchés par la corruption dès le départ
    - dotés d'une société civile plus forte
    - susceptibles d'adopter d'autres réformes de gouvernance en parallèle

:::
:::

## Confounding | *Facteurs de confusion*

::: {.columns}
::: {.column .lang-en width="50%"}

- *Confounding*: a hidden factor that makes it look like there's a causal effect when there might not be
- Observational research can show patterns and associations, but rarely causality

:::
::: {.column .lang-fr width="50%"}

- *Facteurs de confusion* : facteur caché qui donne l'impression qu'il existe un lien de causalité alors qu'il n'y en a peut-être pas
- La recherche observationnelle permet de mettre en évidence des tendances et des associations, mais rarement des liens de causalité

:::
:::

## What is a randomized experiment? | *Qu'est-ce qu'une expérience aléatoire ?*

::: {.columns}
::: {.column .lang-en width="50%"}

- You have a treatment (intervention)
- *You randomly assign units to treatment and control conditions*
- You compare the outcomes for the units that were assigned to treatment to outcomes for those that were not

:::
::: {.column .lang-fr width="50%"}

- Vous avez un traitement (intervention)
- *Vous répartissez aléatoirement les unités entre le groupe de traitement et le groupe témoin*
- Vous comparez les résultats des unités assignées au traitement à ceux des unités assignées au contrôle

:::
:::

## Randomized experiment diagram | *Schéma d'une expérience aléatoire*


```{r}
#| include: false
library(ggplot2)
source("R/pdf_lang_helpers.R")

plot_decentralization_rct <- function() {
  en_col <- "#3a7bbf"
  fr_col <- "#c45c7a"
  lang <- deck_lang()

  add_bilingual_pill <- function(p, x, y, en, fr, w = 1.55, h = 0.58) {
    labels <- pick_lang_pair(en, fr)
    en <- labels$en
    fr <- labels$fr
    p <- p +
      annotate(
        "rect",
        xmin = x - w / 2,
        xmax = x + w / 2,
        ymin = y - h / 2,
        ymax = y + h / 2,
        fill = "white",
        color = "grey35",
        linewidth = 0.3
      )
    if (!is.null(en)) {
      p <- p +
        annotate(
          "text",
          x = x,
          y = if (is.null(fr)) y else y + 0.12,
          label = en,
          color = en_col,
          size = 3,
          lineheight = 0.85
        )
    }
    if (!is.null(fr)) {
      p <- p +
        annotate(
          "text",
          x = x,
          y = if (is.null(en)) y else y - 0.15,
          label = fr,
          color = fr_col,
          size = 3,
          lineheight = 0.85,
          fontface = "italic"
        )
    }
    p
  }

  units_pts <- data.frame(
    x = c(0.55, 0.85, 0.70, 0.95, 0.60, 0.80, 0.72, 0.88, 0.65, 0.92),
    y = c(1.85, 1.95, 1.55, 1.70, 1.35, 1.45, 1.10, 1.25, 1.00, 1.15)
  )

  p <- ggplot() +
    geom_point(
      data = units_pts,
      aes(x = x, y = y),
      size = 2.8,
      color = "black"
    ) +
    annotate(
      "text",
      x = 0.75,
      y = 0.48,
      label = pick_lang("Villages", "Villages"),
      size = 3
    )

  p <- add_bilingual_pill(p, 3.35, 2.35, "Treatment group", "Groupe de traitement", w = 1.45, h = 0.58)
  p <- add_bilingual_pill(p, 3.35, 0.65, "Control group", "Groupe témoin", w = 1.35, h = 0.58)
  p <- add_bilingual_pill(
    p, 6.55, 2.35,
    "Corruption in villages\nwith decentralization",
    "Corruption dans les villages\navec décentralisation",
    w = 2.05, h = 0.82
  )
  p <- add_bilingual_pill(
    p, 6.55, 0.65,
    "Corruption in villages\nwithout decentralization",
    "Corruption dans les villages\nsans décentralisation",
    w = 2.15, h = 0.82
  )

  p <- p +
    geom_segment(
      aes(x = 1.15, xend = 2.55, y = 1.50, yend = 2.35),
      arrow = arrow(length = unit(0.12, "cm"), type = "closed"),
      linewidth = 0.35
    ) +
    geom_segment(
      aes(x = 1.15, xend = 2.55, y = 1.50, yend = 0.65),
      arrow = arrow(length = unit(0.12, "cm"), type = "closed"),
      linewidth = 0.35
    ) +
    geom_segment(
      aes(x = 4.35, xend = 5.30, y = 2.35, yend = 2.35),
      arrow = arrow(length = unit(0.12, "cm"), type = "closed"),
      linewidth = 0.35
    ) +
    geom_segment(
      aes(x = 4.35, xend = 5.30, y = 0.65, yend = 0.65),
      arrow = arrow(length = unit(0.12, "cm"), type = "closed"),
      linewidth = 0.35
    ) +
    geom_segment(
      aes(x = 8.85, xend = 8.85, y = 0.45, yend = 2.55),
      color = "grey65",
      linewidth = 0.25
    ) +
    annotate(
      "rect",
      xmin = 9.05,
      xmax = 11.55,
      ymin = 1.50 - 0.42,
      ymax = 1.50 + 0.42,
      fill = "white",
      color = "grey35",
      linewidth = 0.3
    )

  diff_labels <- pick_lang_pair(
    "Difference shows effect of decentralization",
    "La différence montre l'effet"
  )
  if (!is.null(diff_labels$en)) {
    p <- p +
      annotate(
        "text",
        x = 10.30,
        y = if (is.null(diff_labels$fr)) 1.50 else 1.62,
        label = diff_labels$en,
        color = en_col,
        size = 3,
        lineheight = 0.85
      )
  }
  if (!is.null(diff_labels$fr)) {
    p <- p +
      annotate(
        "text",
        x = 10.30,
        y = if (is.null(diff_labels$en)) 1.50 else 1.36,
        label = diff_labels$fr,
        color = fr_col,
        size = 3,
        lineheight = 0.85,
        fontface = "italic"
      )
  }

  p +
    coord_cartesian(xlim = c(0, 12), ylim = c(0.2, 2.8), clip = "off") +
    theme_void() +
    theme(
      plot.margin = margin(2, 8, 2, 2),
      plot.background = element_rect(fill = "white", color = NA)
    )
}
```

```{r}
#| echo: false
#| fig-align: center
#| fig-width: 12
#| fig-height: 3.4
#| out-width: 100%
plot_decentralization_rct()
```


## Why an experiment? | *Pourquoi mener une expérience ?*

::: {.columns}
::: {.column .lang-en width="50%"}

- Random assignment $\rightarrow$ highly credible evidence that there is no effect
- If politicians/bureaucrats believe results, they won't spend money on decentralization (if the goal is reduced corruption)

:::
::: {.column .lang-fr width="50%"}

- L'assignation aléatoire $\rightarrow$ une preuve très solide de l'absence d'effet
- Si les responsables politiques et les fonctionnaires croient ce que révèlent les résultats, ils ne consacreront pas de fonds à la décentralisation (si leur objectif est de réduire la corruption)

:::
:::



## Widespread use | *Utilisation répandue*

::: {.columns}
::: {.column .lang-en width="50%"}

- Clinical trials for medicine
- Political campaigns
- Tech A/B testing
- Policy trials in governments

:::
::: {.column .lang-fr width="50%"}

- Essais cliniques
- Campagnes politiques
- Tests A/B en tech
- Expérimentations de politiques publiques au sein des gouvernements

:::
:::

## Use in social science | *Utilisation en sciences sociales*

::: {.columns}
::: {.column .lang-en width="50%"}

- Corrected wrong beliefs
- Found that some things don't scale
- Encouraged good policies

:::
::: {.column .lang-fr width="50%"}

- Corrigé certaines idées fausses
- montré que certaines choses ne sont pas transposables à plus grande échelle
- favorisé la mise en place de bonnes politiques publiques

:::
:::

## Proving beliefs wrong | *Corriger certaines idées fausses*

::: {.columns}
::: {.column .lang-en width="50%"}

- Belief: Microfinance boosts poverty reduction
- Multiple studies have randomized microcredit at the group or neighborhood level
- Result: No impact on household income, consumption, or women's empowerment

:::
::: {.column .lang-fr width="50%"}

- Idée reçue : la microfinance favorise la réduction de la pauvreté
- De nombreuses études ont mis en place des programmes de microcrédit de manière aléatoire
- Résultat : aucun impact sur les revenus des ménages, la consommation ou l'autonomisation des femmes 

:::
:::

## Proving beliefs right | *Valider les croyances*

::: {.columns}
::: {.column .lang-en width="50%"}

- Belief: Conditional cash transfers improve school attendance
- Study: PROGRESA in Mexico randomized whether families were paid to keep children in school
- Result: Large increases in enrollment, especially for girls and secondary students

:::
::: {.column .lang-fr width="50%"}

- Idée reçue : Les transferts monétaires conditionnels augmentent la fréquentation scolaire
- Étude : Le programme PROGRESA au Mexique a randomisé le versement d'allocations aux familles pour maintenir leurs enfants à l'école
- Résultat : Forte hausse des inscriptions, en particulier pour les filles et les élèves du secondaire

:::
:::

## Limitations to experiments | *Limites des expériences*

::: {.columns}
::: {.column .lang-en width="50%"}

- Some things don't need an experiment (smoking and parachutes)
- Some experiments aren't ethical
- Some interventions can't be randomized

:::
::: {.column .lang-fr width="50%"}

- Certaines choses ne nécessitent pas d'expérience (le tabac et les parachutes)
- Certaines expériences ne sont pas éthiques
- Certaines interventions ne peuvent pas être randomisées

:::
:::

## Why experiments | *Pourquoi des expérimentations ?*

::: {.columns}
::: {.column .lang-en width="50%"}

- Let's put beliefs to the test
- What works? $\rightarrow$ Let's find out!

:::
::: {.column .lang-fr width="50%"}

- Mettons nos convictions à l'épreuve
- Qu'est-ce qui fonctionne ? $\rightarrow$ Découvrons-le !

:::
:::
