Ajout de la question 3 exo 4
This commit is contained in:
parent
81687fe89b
commit
fedd6a94f2
17
Exo4/Question3.sce
Normal file
17
Exo4/Question3.sce
Normal file
@ -0,0 +1,17 @@
|
||||
//Revenu
|
||||
revenu = data(find(data(:,13) >=0), 13);
|
||||
|
||||
//Taux de mortalité infantile
|
||||
tauxMortaliteInfantile = data(find(data(:,13) >=0), 7);
|
||||
|
||||
//coefficient de correlation
|
||||
r = correl(revenu, tauxMortaliteInfantile);
|
||||
mprintf("Coefficient de correlation : %f\n", r);
|
||||
|
||||
[a, b] = reglin(revenu', tauxMortaliteInfantile');
|
||||
|
||||
//affichage
|
||||
plot2d(revenu, tauxMortaliteInfantile, -1);
|
||||
plot(revenu', a*revenu'+b);
|
||||
xtitle("Taux de mortalité infantile en fonction du revenu", "Revenu national brut ppa par habitant (en $US)", "Taux de mortalité infantile (pour 1000 naissances)");
|
||||
legend(["Nuage de points", "Régression linéaire"]);
|
BIN
image/tauxmortarevenu.jpg
Normal file
BIN
image/tauxmortarevenu.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
Loading…
Reference in New Issue
Block a user