Cube Explorer

Arabic Root Cube Explorer

Balanced sampling via the Cube Method (Deville & Tillé, 2004) applied to etymology — what share of the French lexicon carries an Arabic root, visible or masked by a Romance intermediary?

Theory

The Cube Method

A balanced sampling algorithm that guarantees exact Horvitz-Thompson totals on all auxiliary variables, for any population.

Principle & Formalisation
Flight Phase

Random walk in the kernel of the balancing matrix A. At each step, probabilities shift until one reaches 0 or 1 — preserving balancing constraints exactly throughout.

Landing Phase

Rounds residual fractional probabilities with minimal perturbation. Bousabaa, Lieber & Sirolli (INSEE 1999) proved the existence of such balanced roundings.

Horvitz-Thompson Estimator

Each unit k contributes yk / πk. The estimator is unbiased under any unequal-probability sampling design.

Balancing

The design satisfies Âx ≈ Ax: estimated totals of auxiliary variables equal their true values, reducing variance vs. simple random sampling.

Balancing constraint:
k∈S zk / πk = ∑k∈U zk

HT Estimator:
ŶHT = ∑k∈S yk / πk   —   E[ŶHT] = Y (unbiased)
Algorithm Steps
1
Define population U and inclusion probabilities πk
2
Choose auxiliary variables Z (balancing)
3
Flight phase: random walk in ker(A) until integrality
4
Landing phase: round residual probabilities
5
Compute HT weights and estimate totals
Fields of Application

The Cube Method applies to any problem requiring a representative sample of a population with balancing constraints.

Official surveys

Employment, consumption, partial census surveys (INSEE, Eurostat)

Clinical trials

Balanced randomisation over age, sex, comorbidities across groups

Financial audit

Transaction selection balanced on amount, type, entity

Linguistics

Corpus balanced on frequency, POS, semantic domain — this project

Ecology

Forest inventory balanced on species, altitude, aspect

Social sciences

Panel balanced on income, age, region, education level

Interactive Demo

Try It on Your Own Population

Enter your data (one unit per line: y z1 z2 …), choose sample size n and seed. The Cube algorithm draws a balanced subsample and computes the HT estimate of total(y).

Configuration
Sample size n 40% → n = 10
Random seed42
Sample & HT estimate:
Click "Draw sample" to run the Cube algorithm…
Key References
Deville & Tillé (2004)

Foundational paper. Efficient balanced sampling: the Cube method. Biometrika 91(4), 893-912.

Bousabaa, Lieber & Sirolli (1999)

Existence of balanced roundings. Working paper INSEE / CREST.

Tillé (2006)

Sampling Algorithms. Springer. Comprehensive reference on balanced designs and HT estimation.

Application

Arabic Roots in the French Lexicon

The Cube Method is applied to a corpus of French lemmas. The Horvitz-Thompson estimator quantifies the share of the vocabulary with Arabic etymology, direct or masked by a Romance intermediary.

Research Question & Methodological Bias
Dictionary bias

TLFi, Larousse and Robert cite the proximal origin (Italian, Spanish, Medieval Latin) rather than the ultimate origin. jupe is listed as Italian, but the full chain is: Arabic jubba → Spanish → Italian → French.

Masked words

A masked Arabic word is one where Arabic does not appear at the first position of the etymological chain cited by standard dictionaries, but does appear in the full chain traced to the ultimate origin.

Balanced corpus

566 French lemmas (nouns + adjectives) balanced on 5 auxiliary variables: log₁₀ frequency rank, part of speech, semantic domain, word length, al- prefix indicator.

HT estimation

Each word k contributes with weight 1/πk. The 95% confidence interval uses the Deville-Tillé variance under balanced design.

Hypothesis:
The proportion par of French lemmas with an Arabic root (full chain) is significantly higher than the proportion
cited by standard dictionaries.

Masked words: pma = P(Arabic masked | Arabic) — share of Arabic etymology invisible at surface.
Preliminary Results — Curated Database

Manually curated from TLFi, CNRTL, Corriente (2008), Devic (1876). Data from etymology_database.py.

~50
words documented
43
masked Arabic words
86%
masked / total Arabic
6
root languages
  • A
    Group A — Direct Arabic: algebra, algorithm, alcohol, alchemy, alembic, zero, cipher, zenith, nadir, almanac, saffron, amber, azure…
  • B
    Group B — Masked Arabic: jupe (jubba), artichoke (al-kharshuf), guitar (ʿūd transformed), lute (al-ʿūd), coffee (qahwa→Turkish→Italian), assassin (ḥashshāshīn), alcove, arsenal, cotton, customs, cup, caramel…
  • C
    Group C — Control (Latin/Greek/Germanic): maison, livre, guerre, père, grand, aller, voir… (no Arabic in chain)
Masked Etymological Chain Examples

Source cited by standard dictionaries vs. full reconstructed chain.

French wordCited origin (TLFi)Full chainArabic
jupeOld French / ItalianArabic jubba Sp. aljuba It. giuppa Fr. jupemasked
artichautSpanish / ItalianAr. al-kharshuf Sp. alcachofa It. articiocco Fr.masked
caféItalianAr. qahwa Turkish kahve It. caffè Fr. cafémasked
arsenalItalianAr. dār aṣ-ṣināʿa It. arsenale Fr.masked
assassinItalianAr. ḥashshāshīn Med. Lat. It. assassino Fr.masked
luthSpanish / ProvençalAr. al-ʿūd Sp. laúd It. liuto Fr. luthmasked
cotonItalianAr. quṭun It. cotone Fr. cotonmasked
douaneSpanish / TurkishAr. dīwān Turkish It. dogana Fr.masked
algèbreMedieval LatinAr. al-jabr (al-Khwarizmi) Med. Lat. algebra Fr.direct
algorithmeMedieval LatinAr. al-Khwarizmi (latinised proper name) Lat. algorismus Fr.direct
Live Study

Run the Full Study via the Claude API

The Cube algorithm draws a balanced sample from the corpus, then queries Claude (Sonnet) word by word to trace full etymological chains.

Etymological Study — Cube Sampling

Cube Method · Deville & Tillé (2004) · Horvitz-Thompson Estimator · Claude Sonnet
🔑 Anthropic API Key (stored locally in session, never transmitted)
⚑ Unit test — test 1 word before running

Unit test result will appear here…

Configuration
Sample n
200
Batch
Pause (s)
Retries
Corpus
words with 5 auxiliary variables
Cube Method
Waiting…
z₁ freq · z₂ POS · z₃ domain · z₄ length · z₅ al-
Progress
Ready
0 words0%
Analysed
0
Arabic ✓
0
Masked ⚠
0
Errors
0
🔍 Debug — Raw API response
Arabic Root Cube Explorer · Pr. Abdelkader · Cube Method (Deville & Tillé, 2004)