Using the current status of mathematical operation supported by Tiddlywiki
5.1.21+ and without using third party plugins
is there any way to calculate the standard deviation?
[image: \sigma ={\sqrt {{\frac {1}{N}}\sum _{i=1}^{N}(x_{i}-\mu
)^{2}}},{\rm {\ \ where\ \ }}\mu ={\frac {1}{N}}\sum _{i=1}^{N}x_{i}.]
Use case:
I have a tiddler per student and these tiddler have a field called score
which keep the student score. I wish to calculate the class standard
deviation for this course scores.
Ref:
https://tiddlywiki.com/#Mathematics%20Operators
https://en.wikipedia.org/wiki/Standard_deviation
I can calculate the average or mean (mu in the above picture, the formula
at the right)
\define mean(filter)
<$vars
xcount ={{{ [subfilter<__filter__>count[]] }}}
xsum ={{{ [subfilter<__filter__>sum[]] }}} >
<$text text={{{ [<xsum>divide<xcount>] }}}/>
</$vars>
\end
For example
mean: <<mean filter:"[tag[student]has[score]get[score]]">>
--Mohammad
p.s:
If TW supports power operator like "1 2 +[power[2]" and "1 2 +[power[0.5]]"
then it was straight forward to compute the standard deviation.
So, the question may be how implement fractional and complete power in TW
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/97660a73-abb7-4825-b13d-b20c54658987%40googlegroups.com.