Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Skew() in Qlik vs skewness() in R

Hello,
Maybe someone know why value of skewness computed by Qlik Sense different from value computed by R-studio for same data

sample.

Here is evidence :

In Qlik Sense:

RangeSkew( 35,40,12,15,21,14,46,10,28,48,16,30,32,48,31,22,12,39,19,25) gives  0.3263

RangeKurtosis( 35,40,12,15,21,14,46,10,28,48,16,30,32,48,31,22,12,39,19,25)  gives  -1.1149

In R-studio:

x <- c(35,40,12,15,21,14,46,10,28,48,16,30,32,48,31,22,12,39,19,25)

> skewness(x)

[1] 0.3012561

> kurtosis(x)

[1] 1.859267

I Wrote formulas  of skewness and kurtosis in R.

b1 <- ( ( 1 / n ) * ( sum( ( x - mean ( x ) ) ^ 3 )) ) /

( ( 1 / n ) * sum ( ( x - mean ( x ) )^2 ) ) ^ (3/2)  ##

> b1

[1] 0.3012561

b2 <- ( ( 1 / n ) * ( sum( ( x - mean ( x ) ) ^ 4 )) ) /

( ( 1 / n ) * sum ( ( x - mean ( x ) )^2 ) ) ^ (2)

> b2

[1] 1.859267

Is it really bug in Qlik Sense or i just don't know something? 

Hope for exhaustive explanation.

2 Replies
sunny_talwar
Not applicable

Re: Skew() in Qlik vs skewness() in R

I am not sure about Skewness, but I have noticed that QlikView has it own different way to calculate Fractile (or percentile). My guess is that it might have its own way to calculate Skewness also. Have you tried to replicate your expression in QlikSense to see if the calculation (rather than the function) gives the right output?

Not applicable

Re: Skew() in Qlik vs skewness() in R

Working on it

Problem that easiest way doesn't work. By the way I need kurtosis and skewness for Jarque bera test.