Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Standard Deviation Revisited

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Standard Deviation Revisited
 Login/Join
 
Virtuoso
posted
I had to do some STDEV calculations for a customer.
See what happens when the field is an integer:
  
TABLE FILE CAR
SUM ASQ.SALES AVE.SALES CNT.SALES
COMPUTE STD=((ASQ.SALES-AVE.SALES *AVE.SALES) **.5) /CNT.SALES ;
END

And when the field is decimal:
  
DEFINE FILE CAR
SALES/D7=SALES;
END
TABLE FILE CAR
SUM ASQ.SALES AVE.SALES CNT.SALES
COMPUTE STD=((ASQ.SALES-AVE.SALES *AVE.SALES) **.5) /CNT.SALES ;
END

This message has been edited. Last edited by: <Kathryn Henning>,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
I know the AVE. operator on an integer field yields an integer field. Whether or not same is true of ASQ., that's enough to ruin your STD's day.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
Jack,
Right as usual!
Coming back to the calculating of the STD, after looking through documentation and consulting with my colleagues, It seems that the formula I wrote down is erroneous.
The following matches with what EXCEL provides with it STDEV function.
Using LET (notice the # for a new line - apparently LET is limited in length!):
  
LET
STD = COMPUTE STD_<1>= # (((ASQ.<1> - AVE.<1> * AVE.<1>) * (CNT.<1>)/(CNT.<1> - 1))) ** 0.5;;
END

Using DEFINE FUNCTION:
  
DEFINE FUNCTION STDV/D15.2 (VAR1/D12.2,AQ/D12.2,AV/D12.2,CQ/I9)
SVAR/D12.2 =(AQ-(AV * AV))
* (CQ /(CQ -1)) ;
SSDEV/D15.2=SQRT(SVAR);
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
Dan --

Perhaps both formulae are "correct". I didn't analyze the entire expressions, but one obvious difference is (N) vs (N-1) in the denominator.


As I recall, there are two definitions [differing only by the appearance of 1/N or 1/(N-1) in the formula] for the variance of a set of real values.

The one with 1/N is the definition of population variance, for a finite population of equi-probable outcomes.

The one with 1/(N-1) is the statistic, computed from N observations from a normal distribution, that serves as an unbiased statistical estimate of the variance of the underlying distribution.

The square root of the first is then the definition of standard deviation in that context; while sqrt of the second is a (slightly biased) estimate of the population std dev.

- Jack
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Standard Deviation Revisited

Copyright © 1996-2020 Information Builders