Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Standard Deviation calculation in BIRT STDDEV (Sample vs. Population)
crowt999
<p><span>All,<br><br>
When double checking my results of STDDEV aggregation in BIRT (2.5.2), I realized the output was slightly different than the numbers I had calculated by hand in Excel. BIRT is calculating the standard deviation and treating the underlying numbers as a <u>sample</u> as opposed to an entire <u>population</u>. I need the STDDEV function to treat the data as an entire population rather than a sample. Excel has two separate functions, STDEV.P and STDEV.S. I looked around in help and settings but could not find an answer. Does anyone know if BIRT 2.5.2 supports this, or BIRT 4.4.1 (our next installation)<br><br>
Thank you in advance</span></p>
<p><span>Dean</span></p>
Find more posts tagged with
Comments
mwilliams
Unfortunately, the only BIRT standard deviation function does exactly what you're saying. I don't see any available settings to change this. You could compute the value yourself by creating a couple computed columns. I know this isn't ideal, but it'll work.<br><br>1. Create a computed column in your data set for the variance (this is based on the sample equation, so we'll have to do more work).<br>2. Create a computed column that gives you a count of your rows (aggregation count).<br>3. Create a final computed column named stdevp with an expression of:<br><br><pre class="_prettyXprint _lang-auto _linenums:0">Math.sqrt(row["variance"]/row["rowcount"]*(row["rowcount"]-1));</pre>This should give you your population variance.<br><br>You should log an enhancement request in the bugzilla at eclipse.org/birt (in the community section). If you do, please post a link to your request in here for others to vote on. Thanks.<br><br>If you have the time, you could also create a new function plugin or modify the existing one and submit it with your request (or just to use yourself). This would be the fastest way to get your request completed.