Standard deviation calculation using TW 5.1.21+ mathematics operators

94 views
Skip to first unread message

Mohammad

unread,
Jan 31, 2020, 4:32:01 AM1/31/20
to tiddl...@googlegroups.com
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?


std.png

 


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:


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

Mohammad

unread,
Jan 31, 2020, 4:40:46 AM1/31/20
to TiddlyWiki
For email readers
The image has been corrected.

std.png

Mohammad

unread,
Jan 31, 2020, 4:55:48 AM1/31/20
to TiddlyWiki
A feature request has been raised on GitHub



But I appreciate if anybody has idea to calculate the STD using the current math operators.

--Mohammad


On Friday, January 31, 2020 at 1:02:01 PM UTC+3:30, Mohammad wrote:

Ste Wilson

unread,
Feb 1, 2020, 8:45:08 AM2/1/20
to TiddlyWiki
Can't you do something with Evans excel plug in or mathcell.. Though that appears to have vanished from tiddly spot :( (you can probably dig it out of my tiddlywiki at stephenteachertests.tiddlyspot.com)?

Ste Wilson

unread,
Feb 1, 2020, 8:46:56 AM2/1/20
to TiddlyWiki

Ste Wilson

unread,
Feb 1, 2020, 9:03:15 AM2/1/20
to TiddlyWiki
Sorry.. You did say without plugins.. One day I'll learn to read the full question...

Mohammad

unread,
Feb 1, 2020, 9:14:33 AM2/1/20
to TiddlyWiki
Many thanks for sharing these nice wikis!

Well, yes, I try to keep it simple and if Jeremy just add the power and log operator
with current math operators I can have the summary row in dynamic tables.

Cheers
Mohammad

Ste Wilson

unread,
Feb 1, 2020, 11:36:59 AM2/1/20
to TiddlyWiki
Multiple bracketed multiplications.. Data table or a log table for log values?

Mohammad

unread,
Feb 1, 2020, 12:41:11 PM2/1/20
to TiddlyWiki
Ste,

 log for natural logrithm
 power for a^b where b is an integer or float

are the minimum Jeremy hopefully add to TW 5.1.22+

Mohammad

Ste Wilson

unread,
Feb 1, 2020, 1:16:54 PM2/1/20
to TiddlyWiki
I always think it's a shame you can't use latex mark up for actual maths :(.
Java script maths notation seems a little cumbersome.
Even better would be if you can plug the tiddly implementation into https://github.com/gt6796c/graph-tw5 and then sliders could be added and and and responsive graphs.. Like.. https://latex2js.com/.. And.. *breath...*
Reply all
Reply to author
Forward
0 new messages