This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/11308] aggregate operations for @variance, @skew, @kurtosis


https://sourceware.org/bugzilla/show_bug.cgi?id=11308

--- Comment #3 from Martin Cermak <mcermak at redhat dot com> ---
Created attachment 9369
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9369&action=edit
working version of a patch

Attached patch computes the individual per CPU variances using the Knuth's
algorithm from Comment #1. Based on that, the aggregated variance over all the
CPUs is being computed using the "Total Variance" formula from the above paper.

This gives somewhat reasonable results for a "few" "small" integers with normal
distribution, but almost any other set of values makes it behave crazily
because of the integer arithmetic being used for the dividing.  Below I am
going to attach a little python script that helps comparing this stap variance
implementation with python's statistics.variance().

At the first glance, the floating point arithmetic inside the linux kernel
doesn't look like something usual or straightforward.  But an attempt to
implement it might be an interesting one.  Not sure about this though.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]