From e5cd2180810fc0b7e03ccaeebc29eccbf77b615a Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Sat, 20 May 2023 19:19:37 +0200 Subject: [PATCH] [Ex2 - Q4] Ajout Co-authored-by: Dimitrijevic --- README.md | 1 + ex2/README.md | 20 ++++++++++++++++++++ ex2/img/ex2-4.png | Bin 0 -> 12531 bytes ex2/scripts/ex2-4.sce | 7 +++++++ 4 files changed, 28 insertions(+) create mode 100644 ex2/img/ex2-4.png create mode 100644 ex2/scripts/ex2-4.sce diff --git a/README.md b/README.md index 131a3c8..4a51def 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ Les réponses aux questions des exercices sont situées dans les README des doss - [Moyenne](ex2/#q1) - [Médiane, variance et écart-type](ex2/#q2) - [Espérence de vie minimale et maximale](ex2/#q3) + - [Histogramme](ex2/#q4) 3. [Taux d'accoissement naturel](ex3/) 1. [Acroissements minimaux et maximaux](ex3/#q1) 2. [Pays ayant un taux d'accroissement négatif](ex3/#q2) diff --git a/ex2/README.md b/ex2/README.md index 8a9e9a3..7dc9012 100644 --- a/ex2/README.md +++ b/ex2/README.md @@ -6,6 +6,7 @@ 1. [Moyenne](#q1) 2. [Médiane, variance et écart-type](#q2) 3. [Espérence de vie minimale et maximale](#q3) +4. [Histogramme](#q4) --- @@ -100,6 +101,25 @@ pays_esperance_vie_max_femme = pays(find(data(:,12) == esperance_vie_max_femme)) - Homme : 85 ans (Saint-Marin) - Femme : 89 ans (Saint-Marin) +--- + +## Question 4 : Histogramme {#q4} + +> Représenter l’histogramme de l’espérance de vie des hommes par pays sur l’intervalle [0, 100] avec 20 classes. + Quelle est la classe modale de l’espérance de vie des hommes par pays ? + +**[Script Scilab](scripts/ex2-4.sce) :** + +```scilab +histplot(20,data(1:100,11),normalization=%f) +``` + +**Résultat :** + +![](img/ex2-4.png) + +Par simple observation on voit que la classe modale de l’espérance de vie des hommes par pays est celle comprise entre 71.75 et 73.20 ans, soit la 16ème classe. (le 16ème baton du graphe est le plus élévé). + --- diff --git a/ex2/img/ex2-4.png b/ex2/img/ex2-4.png new file mode 100644 index 0000000000000000000000000000000000000000..5ee79f85ed5943a581bd6ee0a9e8a102f315efd1 GIT binary patch literal 12531 zcmb7q2Ut^Cw>HQp&I~qW1QaQvf>O;OAl(8eO~yhm(SRU?BGN&?GHU25(whZDr3M6~ zC5}?0ODEJ3qyz{^FM;r{6Y9*J@BYu7d5k7!pS{<5*SlBS+xPbi=XU(E{}%=Zh8=3> zl`kMsCvn$hH%ga|z^9d<$`G)?_e;OHt zeu~?_w*;e{q7@MJy8pd(BPW++qE?ht+-uQPTZ-CZyefY1?uj^k@)}Jquyl#clb~8!7`VyTMluy-Q3;Mpvy%&j@ty-URb^X1 z7Vb}F+Zo|+Rwf1pJ`i!`LwP&=3;DQ%gNO8w-6;5p{=tvvfP9=PhJWBV*FKOb{;%`U zr}&q7J~AG|EKj4C`)*K@Zs}w8U4=4)9}mQfUp(U3U*s|E=Pyn;+2u9c={J^J z`r5iLcZ&Ta5gKXP#uIKVD4W1h>8uLo;q26UCOsCqHh~{=Ytq$3xILAl(u1z~k z8w{qs5pwj!Ip4wUrTL6@Kij(*j#Nu`SEYD=eSX^E%fUy* zU!EK?>ne2D^0sVFF{n$@jvs8#weRp*UK+1mUaWN}W<6&fET=$gUbN}4U!Jkgir1n} zhWpHiUqqwPw~QOSd=|@mVwOfe-eu|)RGKe0HH+0tZ#)_PGCRB8EDB|&dVA<{ykA$5 zXPI-035T4^$eRx?*xV zhvyZuluhg7CE6oi@7C{BqZ}LGi?39#6C0xPxl!T!gR1dmJVsNk&nlhH^`(cE6(y1u zDcv;6+}JX0>?M|Bl@!aKPFS!G$#ZHpu++KjgYOLwAHcY$9_|&Dd2MSTXDF*TIg{Ne zJJp6wzdo#vmr#$VO(jYAT9x-6&5l)XesIg|ik+y)VTGA11$VWgrAh=9$9;8c6ANuQ zcm{3_dv)oDaShB=ee*to+3{z4k*8}_q=cYq0O!TbW-aN?#v6m=nfttpd}74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