!goto $wims_read_parm

:def
title=Quadratic mean
input=data1d
!exit

:proc

cnt=!itemcnt $formula
!if $cnt>0
 result=!sum x^2 for x in $formula
 result=$[sqrt(($result)/$cnt)]
!else
 result=0
!endif

!exit

:output

<p class="wimscenter">
Quadratic mean =
!htmlmath $result
</p>
Data: $cnt numbers { $formula }
<p>
The <em>quadratic mean</em> of
\(\{x_1, x_2, ..., x_n\}\) 
is equal to
!set ins_align=middle
!insmath \sqrt{{1\over n}\sum_{i=1}^n x_i^2}
&nbsp;.
</p>
!exit
