# Coefficient de détermination

Le **coefficient de détermination**, noté <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msup><mi>R</mi><mn>2</mn></msup><annotation encoding="application/x-tex">R^2</annotation></semantics></math>, mesure l’ajustement d’un modèle à des observations en comparant ses erreurs à une variation de référence. Dans une régression linéaire estimée par moindres carrés avec constante, il représente la part de la somme des carrés totale associée à l’ajustement. Son interprétation dépend de la définition et des conditions de calcul ; il ne mesure pas une causalité. [^r370-s1][^r370-s2]


## Définition centrée


Pour <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>n</mi><annotation encoding="application/x-tex">n</annotation></semantics></math> observations <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msub><mi>y</mi><mi>i</mi></msub><annotation encoding="application/x-tex">y_i</annotation></semantics></math>, des valeurs prédites <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msub><mover><mi>y</mi><mo accent="true">̂</mo></mover><mi>i</mi></msub><annotation encoding="application/x-tex">\widehat y_i</annotation></semantics></math> et la moyenne des valeurs observées <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mover><mi>y</mi><mo accent="true">¯</mo></mover><annotation encoding="application/x-tex">\overline y</annotation></semantics></math>, on pose


<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>S</mi><mi>S</mi><mi>E</mi><mo>=</mo><munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover><msup><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>y</mi><mi>i</mi></msub><mo>−</mo><msub><mover><mi>y</mi><mo accent="true">̂</mo></mover><mi>i</mi></msub><mo stretchy="true" form="postfix">)</mo></mrow><mn>2</mn></msup><mo>,</mo><mspace width="2.0em"></mspace><mi>S</mi><mi>S</mi><mi>T</mi><mo>=</mo><munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover><msup><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>y</mi><mi>i</mi></msub><mo>−</mo><mover><mi>y</mi><mo accent="true">¯</mo></mover><mo stretchy="true" form="postfix">)</mo></mrow><mn>2</mn></msup><mi>.</mi></mrow><annotation encoding="application/x-tex">SSE=\sum_{i=1}^{n}(y_i-\widehat y_i)^2,\qquad SST=\sum_{i=1}^{n}(y_i-\overline y)^2.</annotation></semantics></math>


Lorsque <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>S</mi><mi>S</mi><mi>T</mi><mo>&gt;</mo><mn>0</mn></mrow><annotation encoding="application/x-tex">SST&gt;0</annotation></semantics></math>, une définition courante est


<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>R</mi><mn>2</mn></msup><mo>=</mo><mn>1</mn><mo>−</mo><mfrac><mrow><mi>S</mi><mi>S</mi><mi>E</mi></mrow><mrow><mi>S</mi><mi>S</mi><mi>T</mi></mrow></mfrac><mi>.</mi></mrow><annotation encoding="application/x-tex">R^2=1-\frac{SSE}{SST}.</annotation></semantics></math>


Elle compare la somme des erreurs au modèle de référence qui prédit la moyenne des observations. Si la variable observée est constante, le dénominateur est nul : cette définition ne fournit pas une valeur ordinaire, et les logiciels peuvent appliquer des conventions particulières. [^r370-s1][^r370-s3][^r370-s4]


## Cas des moindres carrés avec constante


Pour une régression linéaire ajustée sur les mêmes données par moindres carrés et comprenant une constante, les propriétés de projection donnent


<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>S</mi><mi>S</mi><mi>T</mi><mo>=</mo><mi>S</mi><mi>S</mi><mi>R</mi><mo>+</mo><mi>S</mi><mi>S</mi><mi>E</mi><mo>,</mo><mspace width="2.0em"></mspace><mi>S</mi><mi>S</mi><mi>R</mi><mo>=</mo><munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover><msup><mrow><mo stretchy="true" form="prefix">(</mo><msub><mover><mi>y</mi><mo accent="true">̂</mo></mover><mi>i</mi></msub><mo>−</mo><mover><mi>y</mi><mo accent="true">¯</mo></mover><mo stretchy="true" form="postfix">)</mo></mrow><mn>2</mn></msup><mi>.</mi></mrow><annotation encoding="application/x-tex">SST=SSR+SSE,\qquad SSR=\sum_{i=1}^{n}(\widehat y_i-\overline y)^2.</annotation></semantics></math>


On a alors <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>R</mi><mn>2</mn></msup><mo>=</mo><mi>S</mi><mi>S</mi><mi>R</mi><mi>/</mi><mi>S</mi><mi>S</mi><mi>T</mi></mrow><annotation encoding="application/x-tex">R^2=SSR/SST</annotation></semantics></math> et <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn><mo>≤</mo><msup><mi>R</mi><mn>2</mn></msup><mo>≤</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">0\leq R^2\leq1</annotation></semantics></math>. Un ajustement parfait donne 1. Une valeur nulle signifie que l’ajustement ne réduit pas l’erreur quadratique par rapport à la moyenne. Dans une régression simple avec constante, <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msup><mi>R</mi><mn>2</mn></msup><annotation encoding="application/x-tex">R^2</annotation></semantics></math> est le carré du coefficient de corrélation linéaire entre les deux variables. Il ne conserve donc pas le signe de cette corrélation. [^r370-s1][^r370-s2]


Par exemple, si <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>S</mi><mi>S</mi><mi>T</mi><mo>=</mo><mn>100</mn></mrow><annotation encoding="application/x-tex">SST=100</annotation></semantics></math> et <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>S</mi><mi>S</mi><mi>E</mi><mo>=</mo><mn>25</mn></mrow><annotation encoding="application/x-tex">SSE=25</annotation></semantics></math>, le coefficient vaut <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn><mo>,</mo><mn>75</mn></mrow><annotation encoding="application/x-tex">0{,}75</annotation></semantics></math>. Dans ces conditions, l’ajustement réduit de 75 % la somme des erreurs par rapport à la référence moyenne. Cet exemple est un calcul illustratif de la définition, pas le résultat d’une étude. [^r370-s1]


## Valeurs négatives et conventions


La borne inférieure zéro n’est pas une propriété universelle de la définition centrée. Sur de nouvelles données, ou pour des prédictions qui ne résultent pas de l’ajustement précédent, <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>S</mi><mi>S</mi><mi>E</mi></mrow><annotation encoding="application/x-tex">SSE</annotation></semantics></math> peut dépasser <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>S</mi><mi>S</mi><mi>T</mi></mrow><annotation encoding="application/x-tex">SST</annotation></semantics></math> : le coefficient devient négatif. Les prédictions sont alors moins bonnes, au sens de cette comparaison quadratique, que la moyenne des observations évaluées. [^r370-s3][^r370-s4]


Sans constante, la décomposition centrée n’est généralement plus valable. Certains logiciels utilisent une somme des carrés non centrée, calculée par rapport à zéro. La documentation de R distingue explicitement ces conventions. Des coefficients calculés avec des références différentes ne sont donc pas directement interchangeables. [^r370-s3][^r370-s5]


## Coefficient ajusté


L’ajout de variables à une régression emboîtée par moindres carrés ne peut pas diminuer le <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msup><mi>R</mi><mn>2</mn></msup><annotation encoding="application/x-tex">R^2</annotation></semantics></math> calculé sur les données d’ajustement. Le coefficient ajusté introduit une pénalisation du nombre de paramètres. Pour un modèle de rang plein comprenant une constante et <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>p</mi><annotation encoding="application/x-tex">p</annotation></semantics></math> variables explicatives, avec <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>&gt;</mo><mi>p</mi><mo>+</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">n&gt;p+1</annotation></semantics></math>, il s’écrit


<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mover><mi>R</mi><mo accent="true">¯</mo></mover><mn>2</mn></msup><mo>=</mo><mn>1</mn><mo>−</mo><mfrac><mrow><mi>S</mi><mi>S</mi><mi>E</mi><mi>/</mi><mrow><mo stretchy="true" form="prefix">(</mo><mi>n</mi><mo>−</mo><mi>p</mi><mo>−</mo><mn>1</mn><mo stretchy="true" form="postfix">)</mo></mrow></mrow><mrow><mi>S</mi><mi>S</mi><mi>T</mi><mi>/</mi><mrow><mo stretchy="true" form="prefix">(</mo><mi>n</mi><mo>−</mo><mn>1</mn><mo stretchy="true" form="postfix">)</mo></mrow></mrow></mfrac><mo>=</mo><mn>1</mn><mo>−</mo><mrow><mo stretchy="true" form="prefix">(</mo><mn>1</mn><mo>−</mo><msup><mi>R</mi><mn>2</mn></msup><mo stretchy="true" form="postfix">)</mo></mrow><mfrac><mrow><mi>n</mi><mo>−</mo><mn>1</mn></mrow><mrow><mi>n</mi><mo>−</mo><mi>p</mi><mo>−</mo><mn>1</mn></mrow></mfrac><mi>.</mi></mrow><annotation encoding="application/x-tex">\overline R^2=1-\frac{SSE/(n-p-1)}{SST/(n-1)}=1-(1-R^2)\frac{n-1}{n-p-1}.</annotation></semantics></math>


Contrairement au coefficient non ajusté dans ce cadre, il peut diminuer lorsqu’une variable est ajoutée. Il n’est cependant pas, à lui seul, une mesure de performance sur un échantillon futur. [^r370-s3][^r370-s5]


## Interprétation et limites


Un coefficient élevé ne prouve ni la validité de toutes les hypothèses du modèle, ni une bonne précision de chaque prédiction, ni un lien causal. Les résidus, les unités de mesure, la structure des données et les performances sur des observations indépendantes restent importants. Une valeur « satisfaisante » dépend de l’objectif et du domaine étudié. [^r370-s1][^r370-s4]


Enfin, les coefficients analogues employés dans d’autres familles de modèles, souvent appelés pseudo-<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msup><mi>R</mi><mn>2</mn></msup><annotation encoding="application/x-tex">R^2</annotation></semantics></math>, peuvent reposer sur des références différentes. Leur nom commun ne permet pas de leur appliquer automatiquement l’interprétation de variance expliquée de la régression linéaire. [^r370-s3]

## Notes et références

[^r370-s1]: [Pennsylvania State University, STAT 501, The Coefficient of Determination](https://online.stat.psu.edu/stat501/lesson/1/1.5) — *1.5 - The Coefficient of Determination, \(R^2\) | STAT 501*. Consulté le 7 novembre 2026.

[^r370-s2]: [Université de Toronto, Simple Linear Regression: R², The Coefficient of Determination](https://sol.utstat.utoronto.ca/modules/module-11/12-3-The-Coefficient-of-Determination.pdf) — *Introduction to Statistical Ideas and Methods Simple Linear Regression*. Consulté le 7 novembre 2026.

[^r370-s3]: [Marco Taboga, Statlect, R squared of a linear regression](https://www.statlect.com/fundamentals-of-statistics/R-squared-of-a-linear-regression) — *R squared of a linear regression | Definition and interpretation*. Consulté le 7 novembre 2026.

[^r370-s4]: [scikit-learn, documentation de r2_score](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.r2_score.html) — *r2_score — scikit-learn 1.9.1 documentation*. Consulté le 7 novembre 2026.

[^r370-s5]: [R, documentation stats::summary.lm](https://stat.ethz.ch/R-manual/R-devel/library/stats/html/summary.lm.html) — *R: Summarizing Linear Model Fits*. Consulté le 7 novembre 2026.
