Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What is the exactly calculation of the fractile function?

Hi everybody! I am crazy with the calculation of the fractile function.

I have this table:

vendedor:

LOAD * INLINE [

vendedor, venta

1, 77

2, 79

3, 90

4, 85

5, 66

6, 100

7,88

8,97

9,100

10,87

11,90

12,92

];

when I do in object text the calculation: =fractile( total venta , 0.3) return the value: 85.6

BUT... what is the exactly calculation of the fractile function?

Because I am not statistical so I had to learn how function the fractile function and in this video:  https://www.youtube.com/watch?v=PDzLETjOlL0

the result is 84.4, different of 85.6 (value returned by Qlikview)

who is wrong? what happens?

Thank you in advance !!!

1 Solution

Accepted Solutions
sunny_talwar

Attached the logic in the Doc file with the qvw for fractile from 5% till 95% in the increments of 5%

Fractile X% = (N * X%) + (1-X%)

Where N = number of observations in your database (12 in your case)

View solution in original post

18 Replies
sunny_talwar

In a text box object, it won't matter if you use TOTAL or not, it would give the same number. But Fractile(venta, 0.3) is the 30th percentile of the data within venta. Where does this 84.4 numbers come from?

sunny_talwar

Manish what is the mystery here? Not sure I understand the issue. Can you elaborate the finding from those two links?

MK_QSL
MVP
MVP

Fractile works for values by Ascending order..

vendedor venta
566
177
279
485
1087
788
390
1190
1292
897
6100
9100

=fractile( total venta , 0.3)


1) You have total 12 Values so 12 * 0.3 = 3.6

So we need at least 3 values from result...

In fractile we need to add one in this... 3.6 + 1 = 4.6

So we need

=4th Value + (Difference Between 5th and 4th Value)*30% share

=85 + (87-85)*30%

=85 + 0.6

=85.6

Not applicable
Author

Hi Sunny T, in this video explains how works the fractile function with the same example that I use

STAT 344 &350 Fractile vs Johnson's Method for calculating Percentiles Quartiles.mp4 - YouTube

MK_QSL
MVP
MVP

Difference is Percentile works like (12+1)*30% = 3.9

=3rd Value + 0.9(4th - 3rd value)

=79 + 0.9*(85-79)

=79 + 5.4

=84.4

Not applicable
Author

Hi Manish, your result it's okay.. BUT! try this.. I can't end to understand..

I want to know the porcentage of 70%

Therefore in QV  I do =fractile( total venta , 0.7) = 91.4

But if I do the calculation the result is different.

I do:

12 x 0.7 =8.4

8.4 + 1 = 9.4 I use the 9th value

9th + (10th - 9th) x porcent

92 + (97 - 92 ) * 0.7 = 95.5

And 95.5 is different to 91.4 (QV result)

The same happens when I do the calculation with 0.25%.

Thanks for your help, I am really confuse with this issue.

MK_QSL
MVP
MVP

I will work on this and come back to you soon.

Not applicable
Author

Ok, thank you so much!

I note different behaviors between porcentage with one or two decimals. for example the calculation for 0.4 is different of 0.45, because when I do the calculation of 0.4 the result is the same that QV shows me, but when I do the same calculation with 0.45 the result that QV gives me is different that I have it.

Other thing that I noted is the position of the elements that I must to take when the porcentage are less of 0.5 or more of 0.5

Fuck!

And other issue that I noted is that I took the same values of the document: 'What exatly a fractile function does? with the same porcentages: 0.25 ; 0.5 and 0.75 and the values that QV shows me are different of the results showed in the document, so crazy!