From c9e7259735200320ba68ac04f8d36d2989489e00 Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Sun, 21 May 2023 23:06:08 +0200 Subject: [PATCH] [Ex4 - Q2] Ajout Co-authored-by: Dimitrijevic --- README.md | 2 ++ ex4/README.md | 31 +++++++++++++++++++++++++++++++ ex4/img/ex4-2.png | Bin 0 -> 12576 bytes ex4/scripts/ex4-2.sce | 22 ++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 ex4/img/ex4-2.png create mode 100644 ex4/scripts/ex4-2.sce diff --git a/README.md b/README.md index 49015cf..35875fe 100644 --- a/README.md +++ b/README.md @@ -77,3 +77,5 @@ Les réponses aux questions des exercices sont situées dans les README des doss [![](https://cdn.discordapp.com/attachments/1063856358874689558/1109941208312184862/e4.png)](ex4/) [![](https://cdn.discordapp.com/attachments/1063856358874689558/1109941195934814299/1.png)](ex4/#q1) + +[![](https://cdn.discordapp.com/attachments/1063856358874689558/1109941194202566696/2.png)](ex4/#q2) diff --git a/ex4/README.md b/ex4/README.md index 44a4301..13b5055 100644 --- a/ex4/README.md +++ b/ex4/README.md @@ -2,6 +2,7 @@ ## Table des matières 1. [Proportion de moins de 15 ans en fonction du taux de fécondité](#q1) +2. [Taux de mortalité infantile en fonction du taux de natalité](#q2) --- @@ -25,6 +26,36 @@ plot(X,a*X+b); ![Proportion de moins de 15 ans en fonction du taux de fécondité](img/ex4-1.png) +--- + +### Question 2 : Taux de mortalité infantile en fonction du taux de natalité {#q2} + +> Afficher le taux de mortalité infantile en fonction du taux de natalité. Faites (et dessiner) une regression linéaire. + Quel est le coefficient de corrélation ? Que peut-on dire ? Y'a-t-il une relation de causalité entre les deux ? + +**[Script Scilab](scripts/ex4-2.sce) :** + +```scilab +X = mtlb_t(data(:,4)); +Y = mtlb_t(data(:,7)); + +plot2d(X,Y,-1); + +[a,b] = reglin(X, Y); +plot(X,a*X+b); + +coefficient_correlation = correl(X,Y); +``` + +**Résultat :** + +![Taux de mortalité infantile en fonction du taux de natalité](img/ex4-2.png) + +- Coefficient de correlation : 0.86 + +Le coefficient de correlation, qui est à l'image du graphe obtenu, nous montre qu'il y à une causalité entre les deux. PLus le taux de natalité est élevé plus le taux de mortalité infantile est élevé, ce qui est logique. + + --- [⬅️](../ex3/ "Exercice précédent (Exercice 3)") | [🏠](../ "Retour au sommaire") diff --git a/ex4/img/ex4-2.png b/ex4/img/ex4-2.png new file mode 100644 index 0000000000000000000000000000000000000000..1b3bdfdab47781a8e10583c1e8e8dd65028660fc GIT binary patch literal 12576 zcmaib1z40@*ER?ON{u2?0^?CaK)QRxq69%b*PUXX(%4;o*_X-@U1Zhj$8vhlk%n zLIln@f5PJM@OWqBZz3MJ4la&RTIu!}%GjAmJUNn8ON6tv-G=k3+MO|%^$#;E9`+%M zeafF6oxGM_Bjm2xz)fLV zYP!@fXn7Rd^nv4&_m)*dyLY?y@sdYMEU`Uy4Ij@pO7s>r9v%sp zpdanY#}`h72Yuin_$MFe(*L;pe_Z-sp8WSgRZksn*&e5z4@IgZ#H|lIvfo~GBRa(FI0H#BbT;VkD^%admS0=v_6`GFupLXD!;h+qZM)X zbf@@b`*?@Mp6$#6TT+zqs2wGfB(3xoI#StviSl@bvM!XGv$iRgvu^olX_+^7oTa9C;>poOtA{6hc zkN2xnxO`S8zNS`HNgd4i9L;>_^FEx{r!-A+()g5-LC5UraCkAg)!u|-p24>AocAh? z4_}sEl{lA9DQ}i`3Ag0#R5aZfXJ7dnjw5}tq1B?+*4FXVV5ZkjCaAQhMiVMIxP-mo z9!-75z5V@$l;y=m@|42`)0qbmI`b??)|#4{YkLB1qE|LHHUeb!3uH*i$;sKWyQ~I# zv73Tp?(`m#Blgp3ZB~OzIx-I2&50Q!IJL9^y%a_LlqH8Y7cMd91!U<``Fw5XN5#4Z znWNQ}!(|_tO!3BT+O%cUB`SfQNhKUdI_7%FLsb|96VpB6n?_*Aj<|oG7=6GF3o*-=8%tCIzNPoYGS5WZ6sQY|&R-9PxxqEL!&oOyz ze79R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9%K7@qJVo+AJb2Z0~={PhrVkh z^J~y84F9S?dQ~piEDk1u^-e{eK)|vDXzF_jc}@$Y$a}%&fBqzql9DoXbrp4VaS1Li zE(R;eo@Zt1z__hX=eaD8%D1OKsd~(zNZ;4GJCl+U5Vv#v82q3FLb0*vQ%uW$Q0poz zO!UF+QX(=!Feh3mMQm~YCX7>^2eX5M+61C@WDaLlf=kA{B{mURpvt+MrUsQk#?QAq z${UGwmfN&RuD6(1Q~&uM<>5RX&|Yf@+G)qZl*xIj5A6SZQ{40szwU4CD+Jp2XRFV@ zb^-mT6X@4vLO$QmB9fACwyS+Wk>iG?Wo8p73c`cGjK`?+A6?jYxX@hgG;e>TM8&MK zz0DW!l@~x!d}HPyh27BsjAmM2Y<@Br^V2(cF;to}?@G&aobAlB==r?z!=KW`^RRze zQ|HO8lctjfh=Ko{nImpq23Qe2&`?AP7%EawwHW(g47DZ16fEksux~t zJBERn=qcOYTzzJU0Ev$CfOw)@@6Am47tbQuxGe#>1=XM%$7Bvx>c%4^mcH${*@8kT zU=LyfKsm?$aCiX2-8E??!wHr>bqUJ~I-eS8@1`9w5p;qE878RX&ODylGzAnhV^4XO=yKs9T#IT-ksbvpwe%$>Be@Hyg1Xg<&?l=y03+gAcN1q ziy^%Po@ff0+o$g%WdwiL;HjK+?zxZ0kadajzFwwg?!6nT8@<}L%6mgQK2MxE`r0K{ zx2mYI-E@nxV&<><@$L#Zne{ zjqAkNUlZQinT!lxZe={OPZHK?Lj|* zL2_#5kWosm)O^5UK#hNVE;E+`)YdG{|J+&{NpyfE&N}FOEEYip_yR~?&weY%KZ3%4 o0>iIM{~9y?y5t+Wag0|-^TA}s#bg)!=L4Snt$R0fZW#FeKMrE{N&o-= literal 0 HcmV?d00001 diff --git a/ex4/scripts/ex4-2.sce b/ex4/scripts/ex4-2.sce new file mode 100644 index 0000000..ed765cd --- /dev/null +++ b/ex4/scripts/ex4-2.sce @@ -0,0 +1,22 @@ +data = csvRead("data.csv"); + +// Pour réaliser la regression linaire du taux de mortalité infantile en fonction du taux de natalité +// on reprend le code la question précédente mais en utilisant les collones correspondantes + +X = mtlb_t(data(:,4)); // natalité +Y = mtlb_t(data(:,7)); // mortalité infantile + +plot2d(X,Y,-1); + +[a,b] = reglin(X, Y); +plot(X,a*X+b); +title("Regression lineaire du taux de mortalité infantile en fonction du taux de natalité"); +xlabel("Taux de natalité"); +ylabel("Taux de mortalité infantile"); +xs2png(0,"ex4/img/ex4-2.png"); + +// Calcul de coefficient de correlation + +coefficient_correlation = correl(X,Y); + +mprintf("Coefficient de correlation : %.2f\n", coefficient_correlation);