Purpose of Document
This document will have all the steps to dynamically calculate kurtosis and skewness of a distribution (or data set) that report authors can use in Report Studio along with charts as part of descriptive statistics. Computations which are generally shown in descriptive statistics table such as mean, median, standard deviation, min and max have readily available functions/operators in Report Studio and hence can be created easily. But kurtosis and skewness which were part of the summary descriptive statistics in Cognos Statistics are not available in Report Studio. So if a report author wants to show this information along with others in a descriptive statistics table similar to the ones which were readily available in Cognos Statistics then they are left with Report Studio to work with and design these query calculations manually.
This document applies to IBM Cognos BI 10.2 and higher.
Target readers should be an IBM Cognos BI report author and have good knowledge on IBM Cognos Report Studio 10.2.1.1. In addition, this document makes use of the IBM Cognos BI samples, in particular the GO Data Warehouse (analysis) package.
Creating kurtosis and skewness measures
Descriptive statistics quantitatively summarizes the main features of a data set. Measures of distribution, such as kurtosis and skewness, characterize the shape and symmetry of the distribution.
Kurtosis characterizes the relative peakedness or flatness of a distribution. Positive kurtosis indicates a relatively peaked distribution. Negative kurtosis indicates a relatively flat distribution.
Skewness is a measure of the asymmetry of a distribution. A distribution with a significant positive skewness has a long right tail. A distribution with a significant negative skewness has a long left tail.
In this example, we used the Returned Items namespace under the Sales and marketing (analysis) folder of GO Data Warehouse (analysis) package. The Return quantity fact against calendar date is used in the report. The remainder of this document lists the steps to be used for creating kurtosis and skewness calculated data items.
- Open IBM Cognos Report Studio and create a new Column Chart report using the GO Date Warehouse (analysis) package.
- Drag Date from the following location to the x-axis of the chart (Figure 1),
[go_data_warehouse].[Sales and Marketing (analysis)].[Returned items].Time].[Time].[Day].[Date]
- Add Return quantity from the following location to the Series of the chart (Figure 1),
[go_data_warehouse].[Sales and Marketing (analysis)].[Returned items].[Returned items].[Return quantity]
Figure 1 - Returned items namespace showing the Return quantity and Date query items
- From Toolbox tab, add a Data Item to Query1 in Query Explorer for each of the 13 items listed in Table 1.
Table 1 - The 13 Data Items to add to the Query1 query Data Item Name Expression Mean average([Return quantity] for report) SD standard-deviation-pop ([Return quantity] for report) Obs-mean [Return quantity]-[Mean] Power(Obs-mean,4) power ([Obs-mean],4) Power(Obs-mean,3) power([Obs-mean],3) Power(Obs-mean,2) power([Obs-mean],2) Avg(Power(Obs-mean,3)) average([Power(Obs-mean,3)] for report) Avg(Power(Obs-mean,2)) average([Power(Obs-mean,2)] for report) Power(Avg(Power(Obs-mean,2)),3/2) power([Avg(Power(Obs-mean,2))],3/2) Skewness [Avg(Power(Obs-mean,3))]/[Power(Avg(Power(Obs-mean,2)),3/2)] Avg(Power(Obs-mean,4)) average([Power(Obs-mean,4)] for report) Power(SD,4) power([SD],4) Kurtosis [Avg(Power(Obs-mean,4))]/[Power(SD,4)]-3
- In Page Explorer, go back to Page1. Drag a 2x1 table from the Toolbox under the Column Chart. Then place the Column Chart into the first cell. In the second cell drag a 2x2 table from the Toolbox so that it’s nested inside the first table.
- Drag Text Items from the Toolbox to each cell of the first row of the nested table. Give these Text Items the names Skewness and Kurtosis respectively as shown in Figure 2.
- Create singletons using the Skewness and Kurtosis Data Items from Query1 in the second row of the nested table (Figure 2).
Figure 2 – Shows Skewness and Kurtosis singletons
- Set the Trendlines property by selecting the Column Chart and from the Properties pane under the Chart Annotations section, click on Trendlines.
- In the Trendlines window, click the New button and select Polynomial as shown below in Figure 3. Click OK.
Figure 3 – Properties pane of chart showing trendline of type polynomial
- When report is executed, skewness and kurtosis values will get calculated based on the data set.
Figure 4 – Shows report upon execution