Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
If I want to use the Stdev function over more than one variable like this:
Stdev
(Total<Factory, [Package System], SizeCodeID, Variable, Year, Month>([web 1], [web 2], [web 3]))How do I make it to work??
Thanks!
Brgs
Marita
That's what I was talking about when I said, it's easy to mess around with statistics.
Well, before you try to calculate the stdev of different samples, what about creating one variable / sample from your three?
TotalSample:
LOAD ResultInformationID, [web 1] as TotalSample resident tbl_Result;
LOAD ResultInformationID, [middle web] as TotalSample resident tbl_Result;
LOAD ResultInformationID, [last web] as TotalSample resident tbl_Result;
And then just use
avg(TotalSample)
resp.
stdev(TotalSample)
This is assuming that your three samples can be combined into one.
Have you tried RangeStdev?
Thanks!
I´m sorry frankcrezee but how do you meen??
RangeStdev
([web 1],[web 2],[web 3]) dosen´t work......Are you trying to calculate in the script or in the front end?
rangeStdev(var1,var2,var3) should work.
Could you maybe upload an qvw example file?
In an expression for a chart and when I enter the RangeStdev function i dont get any results!
Now i´ve uploaded the file, it´s the chart at the bottom, Stdev column!
I believe rangestdev() expects a range of unambiguous values as arguments, no fields.
It's hard to advice you here, because its really easy to mess with statistics ![]()
It seems that your sample values are defined by
([web 1]+[middle web]+[last web])/3)
at least that's what you calculate the average from
Avg(Total<Factory, [Package System], SizeCodeID, Variable, Year, Month>([web 1]+[middle web]+[last web])/3)
I believe you don't need to use the total with fields in this case, since you are stating all your dimensions, so maybe
Avg( ([web 1]+[middle web]+[last web])/3)
is enough (it's reproducing the same results in your sample file).
So the standard deviation of your sample values should be
stdev( ([web 1]+[middle web]+[last web])/3 )
Hope this helps,
Stefan
Ok thank you Stefan for you reply. However this is the solution i hade from the beginning when i realized that the numbers i get were wrong. The reason for this is because I add all webs together and then do the Stdev function, this is not correct.
I need to bunch all webs together into one variable and then take Stdev on that variable or I need to take Stdev on several varaibles without adding them together first :-).
Hope this makes seans to someone, because i´m lost!?
That's what I was talking about when I said, it's easy to mess around with statistics.
Well, before you try to calculate the stdev of different samples, what about creating one variable / sample from your three?
TotalSample:
LOAD ResultInformationID, [web 1] as TotalSample resident tbl_Result;
LOAD ResultInformationID, [middle web] as TotalSample resident tbl_Result;
LOAD ResultInformationID, [last web] as TotalSample resident tbl_Result;
And then just use
avg(TotalSample)
resp.
stdev(TotalSample)
This is assuming that your three samples can be combined into one.