Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
!goto $wims_read_parm
:def
title=Moyenne arithmétique avec poids
synonyme=poids moyenne arithmetic, moyenne poids, poids moyenne
input=data2d
!exit
:proc
pari_header=dmat=Mat([$fml2]);w=sum(x=1,$cnt,dmat[x,2]);
result=!exec pari print((dmat[,1]~*dmat[,2])/w);\
print(w);
!distribute lines $result into result, totweight
!exit
:output
<center>
Moyenne arithmétique avec poids =
!htmlmath $result
</center> <p>
Données : $cnt nombres avec poids { $fml3 } (total des poids = $totweight).
<p>
!exit