Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

stddev?

what is this use of this function how it works

can anyone give simple examples to understand this  ?

7 Replies
datanibbler
Champion
Champion

Hi Commonqlik,

it is a statistical function. Not something you are going to use every day I guess.

Basically, if you have a large nr. of items, you can calculate an average of whatever measure.

However, none of the items will exactly match that average, or only very seldom. Most will deviate from it - that is the standard_deviation.

Can't explain exactly how it works in QlikView, however. I haven't yet had any need for it.

Best regards,

DataNibbler

pokassov
Specialist
Specialist

Hi!

Theory is:

For a finite set of numbers, the standard deviation is found by taking the square root of the average of the squared differences of the values from their average value. For example, the marks of a class of eight students (that is, a population) are the following eight values:

2,\  4,\  4,\  4,\  5,\  5,\  7,\  9.

These eight data points have the mean (average) of 5:

    \frac{2 + 4 + 4 + 4 + 5 + 5 + 7 + 9}{8} = 5.

First, calculate the difference of each data point from the mean, and square the result of each:

 \begin{array}{lll} (2-5)^2 = (-3)^2 = 9  &&  (5-5)^2 = 0^2 = 0 \\ (4-5)^2 = (-1)^2 = 1  &&  (5-5)^2 = 0^2 = 0 \\ (4-5)^2 = (-1)^2 = 1  &&  (7-5)^2 = 2^2 = 4 \\ (4-5)^2 = (-1)^2 = 1  &&  (9-5)^2 = 4^2 = 16. \\ \end{array}

The variance is the mean of these values:

\frac{9 + 1 + 1 + 1 + 0 + 0 + 4 + 16}{8} = 4.

and the population standard deviation is equal to the square root of the variance:

\sqrt{ 4 } = 2.
Practice is:
You can use stddev in load with group by cause to calculate standard deviation.
You also can use it in the chart.
buzzy996
Master II
Master II

From reference manual,

stdev( [ distinct ] expression )

Returns the standard deviation of expression over a number of

records as defined by a group by clause. If the word distinct occurs

before the expression, all duplicates will be disregarded.

Example:

Load Month, stdev(Sales) as

SalesStandardDeviation from abc.csv group by

Month;

Anonymous
Not applicable
Author

try to write own

dont copy and paste from help file

everyone knows it will be there in help file

sunny_talwar

To be fair to buzzy996, not everyone actively seek help from reference manual or help. They tend to directly come here for help. and its not that you mentioned in your post that you have already looked into the reference manual or help. So I feel that instead of pointing it out in this manner, you could have choose to ignore his message.

I have nothing good or bad against either of you, but I hope you will understand my good intentions here

Best,

Sunny

buzzy996
Master II
Master II

I'm so happy if his "COMMONQLIK" , able to explain in which scenario with example his trying to implement?

if I'm not wrong ppl are simply posting the queries (might be interview query) with out referring the basic books to understand the important of the function ,

the question from "COMMONQLIK" " is

what is this use of this function how it works

can anyone give simple examples to understand this  ?

so,I strongly believe the information which I shared most and most sufficient then I put my self explanation,because I believe for most of them here/me the reference manually is GURU.

what did you say Сергей Покасов? (not sure y he liked tht comment)

I'm extremely sorry if some one hurt here.

Anonymous
Not applicable
Author

Hi siva readdy ,

Thanks for ur reply,

i mean every one will look into the help file if not understanding with that data then will ask in community

No one herted here ,

Please dont hurt after reading this .

konchem kopam tagginchukondi