Behavioral genetics · Interactive model

How genes and environment shape a complex trait.

Behavioral traits like temperament, cognitive ability, and risk-taking arise from many genes of small effect, layered with the family a child grows up in and the private experiences they alone encounter. Adjust the levers below to see how those forces trade off — and where the classic ACE model of behavioral genetics gets its shape.

Variance decomposition
Additive genes 40% Shared env 20% Non-shared 40%
Model summary

Trait distribution

Simulated phenotype scores across 5,000 individuals.

Population High-PRS carriers Low-PRS carriers

Polygenic score → outcome

Individual dots. Slope steepens as heritability rises; scatter widens as non-shared experience grows.

Concepts

Gene–environment correlations

A child's genotype and their environment are usually correlated — three well-described mechanisms explain why. Each one changes how you should read the sliders above.

Passive rGE

Inheriting the room, not just the DNA

Parents pass on both genes and the environment they build. A musically inclined parent gives their child predisposing alleles and a house full of instruments — inflating the apparent heritability estimate.

Evocative rGE

Eliciting the world you'll experience

A temperamentally sunny infant draws warmer responses from caregivers; an impulsive child pulls sharper reactions from teachers. The child's genotype shapes the feedback loop the environment sends back.

Active rGE

Niche-picking

As autonomy grows, people select settings that fit their dispositions — bookish teens seek quiet classrooms, sensation-seekers seek novelty. Active rGE typically strengthens across adolescence.

G × E interaction

Same environment, different response

Two children can meet the same stressor and diverge if their genotypes differ in sensitivity to it. Early claims that single variants in serotonin or dopamine pathways moderate stress largely failed to replicate in large samples; current G×E research asks whether a whole polygenic score changes how strongly an environment acts — which is what the β slider models. This is distinct from rGE: the environment doesn't have to be correlated with genes to interact with them.

Methodology

What the model actually computes

1. Polygenic risk score

For each of N simulated individuals we draw L biallelic loci (allele frequency 0.5) and sum the standardized allele counts to form a PRS with mean 0 and variance 1. Every locus carries the same weight, so this is an unweighted allele count — a real PRS weights each locus by its GWAS effect size. Larger L produces smoother Gaussian PRS distributions via the central limit theorem.

2. Shared & non-shared draws

Each individual receives a family-level draw C ~ N(0,1) and a personal draw E ~ N(0,1). Twin and adoption studies partition trait variance into these three components — the classic ACE model.

3. Phenotype equation

Standardized phenotype: P = √h² · G + √c² · C + √e² · E + β_{GxE} · G · E
rGE is induced by mixing a fraction of G back into C before scaling, so families of high-PRS children skew toward trait-enriching environments.

4. Reading the charts

The distribution curve is a kernel-density estimate of P. Highlighted curves isolate the top and bottom quintiles of G. The scatter plots each individual's PRS against their phenotype. When rGE and G×E are both zero the slope equals √h² and the residual spread reflects c² + e²; with positive rGE the slope — and the variance the PRS appears to explain — rises above the nominal . That inflation is exactly why passive rGE biases heritability estimates from family designs.

This is a teaching tool, not a clinical instrument. Real behavioral-genetic estimates come from twin, adoption, and molecular studies with far richer covariance structure — see Plomin, DeFries, Knopik & Neiderhiser (2016), Top 10 replicated findings from behavioral genetics and the Twins Early Development Study (TEDS). The full reference list lives in the project repository.