From fa41be966063d2a591bdf6bc1317dd2caef9b88f Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Sun, 21 May 2023 23:33:18 +0200 Subject: [PATCH] [Ex4 - Q4] Ajout Co-authored-by: Dimitrijevic --- README.md | 2 ++ ex4/README.md | 30 ++++++++++++++++++++++++++++++ ex4/img/ex4-4.png | Bin 0 -> 11108 bytes ex4/scripts/ex4-4.sce | 20 ++++++++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 ex4/img/ex4-4.png create mode 100644 ex4/scripts/ex4-4.sce diff --git a/README.md b/README.md index 9a94a5b..2a3f91b 100644 --- a/README.md +++ b/README.md @@ -81,3 +81,5 @@ Les réponses aux questions des exercices sont situées dans les README des doss [![](https://cdn.discordapp.com/attachments/1063856358874689558/1109941194202566696/2.png)](ex4/#q2) [![](https://cdn.discordapp.com/attachments/1063856358874689558/1109941194429055067/3.png)](ex4/#q3) + +[![](https://cdn.discordapp.com/attachments/1063856358874689558/1109941194731036672/4.png)](ex4/#q4) diff --git a/ex4/README.md b/ex4/README.md index 3ae5710..90bf72b 100644 --- a/ex4/README.md +++ b/ex4/README.md @@ -4,6 +4,7 @@ 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) 3. [Taux de mortalité infantile en fonction du revenu](#q3) +4. [Linéarité des dépendances](#q4) --- @@ -83,6 +84,35 @@ coefficient_correlation = correl(XX,YY) On trouve donc une coefficient de correlation négatif de -60 globalement et cela montre un lien entre le revenus et le taux de martalité infantile, plus le revenus est élevé moins il y auras de mortalité infantile, ce qui est assez logique car un plus haut revenus sous entend un pays plus developpé. +--- + +### Question 4 : Linéarité des dépendances {#q4} + +> Cette dépendance vous semble-t-elle linéaire ? Comment la qualifiriez-vous ? Essayez de déterminer une relation mathématiques entre les deux. + +**[Script Scilab](scripts/ex4-4.sce) :** + +```scilab +X = find(data(:,13)>=0); + +mortalité_infantile = data(X,7); +revenu = data(X,13); +plot(revenu, mortalité_infantile,"+"); + +x=gsort(revenu); +[a, b]=reglin((revenu**0.1)', ((mortalité_infantile)**(0.5))'); +coeff_correlation = correl(((revenu)**0.1), ((mortalité_infantile)**(0.5))); +plot(x, (a*x**0.1+b)**2, "r"); +``` + +**Résultat :** + +![Mortalité infantile en fonction du revenu](img/ex4-4.png) + +Après quelques essais, nous trouvons une relation de la forme suivante qui semble être la plus adaptée, avec une corrélation de -0.85 : + +$$y^{0.5} = a \times x^{0.1} + b$$ + --- diff --git a/ex4/img/ex4-4.png b/ex4/img/ex4-4.png new file mode 100644 index 0000000000000000000000000000000000000000..5ccea44b29ccb3521224a0ccf1857fd9f5badbfb GIT binary patch literal 11108 zcmbt)c|6qH|37u36sCk!XxhsbimX#4?QY80sj(%4kacFvZ9^%v7+bh4bY*L-F_@MS zHI`%@hN)~>#~6$;nBRHN=zj0*^ZP!&-^b(YpP4b|%=?_z@;uMi^L1|je#TrJQTyN=h6Uua)ZnHs4aeo)`QU<9R*xcX4kTP=2`Zsndi9*@0fUv9X7(MwKA zImt6K7%Qq6^dP0KzqseaiL&l8dN2b=L{;B;-S^<+-h#UxJsg@+uVwaBZyHm}_L2Nl zbH(!;up5^*jPmW_3lxj_BNg+L)Mj;MMa6rm2El~NcYCMF>0@)zW#3O}K6vViLZRMT z&$X`qEk2yyy4l2J&CLzxPe*kJb$JtmnLVBfoayOm<%K5Y)AkoLWUrQ^-$zIi!={IS zjE~3g7n%IDAp2Ou$zw&u#cuX5zc2zUKI)RW^|Kkya~U14{akV!%Ct(nyW}_wJibS^ zuaAo@eK`Lyeg1fkGufDgAoF=-WfT9R&6hg0vL zk?>xt(yv(`xM0FjVN524BBDd9R(CJ5dTV++z4GrBd$oVKCGWH$7O@y|minBYZg9?S zCz+c^=w9V}rq4Y0>W^r9BYr+WXt`xd?rEhbwPe*j5c}o8bj< zxR{k3iqBH!uT5|Y8!DnQCJCh!?M6fGu@wt9l;I3Q7py8q9GS^M z_Tlqy%Ldb;t(`*ME+^2@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83J&ms!$%NAI5xR_a*So9av|@DN?8LXx*F<1`BlW7;?+34ZebW*s z4X$V?S`(zI($D{xtFF*40BW1TEP}(RnkmkAV-ik*-VfL3F?M1;<}xEQ5eY! SF5vd8$Z@kXNAgTAT>pP<^zhCA literal 0 HcmV?d00001 diff --git a/ex4/scripts/ex4-4.sce b/ex4/scripts/ex4-4.sce new file mode 100644 index 0000000..a1a68a9 --- /dev/null +++ b/ex4/scripts/ex4-4.sce @@ -0,0 +1,20 @@ +data = csvRead("data.csv"); + +// La dépendance n'est clairement pas linéaire , elle suis une la courbe d'une fonction inverse + +X = find(data(:,13)>=0); + +mortalité_infantile = data(X,7); +revenu = data(X,13); + +title("Mortalité infantile en fonction du revenu"); +xlabel("Revenus"); +ylabel("Mortalité infantile"); +plot(revenu, mortalité_infantile,"+"); + +x=gsort(revenu); +[a, b]=reglin((revenu**0.1)', ((mortalité_infantile)**(0.5))'); +coeff_correlation = correl(((revenu)**0.1), ((mortalité_infantile)**(0.5))); +plot(x, (a*x**0.1+b)**2, "r"); + +xs2png(0, "ex4/img/ex4-4.png");