Averages/Arithmetic mean: Difference between revisions
Content added Content deleted
m (→{{header|dc}}) |
m (→{{header|dc}}) |
||
Line 763:
3.6</lang>
An expanded example, identifying an empty sample set, could be created as a file, e.g., amean.cd:
<lang dc>[[Nada Mean: ]Ppq]sq
zd0=qsn [stack length = n]sz
1k [precision can be altered]sz
[+z1<+]ds+x[Sum: ]Pp
ln/[Mean: ]Pp [Sample size: ]Plnp</lang>▼
ln/[Mean: ]Pp
By saving the sample set "1 2 3 5 7" in a file (sample.dc), the routine, listing summary information, could be called in a command line:
|