[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.9

Anyone have the  EXCEL NORMSDIST Funtion in TSQL - USER DEFINED Function

Asked by ITUCIRL in SQL Server 2005

I have got code fomr the Net to replicate the NORMSDIST function VB that i converted to TSQL, however it close to EXCEL until the higher negative numbers.  all positive number come back with the same a excel and on the negative side it close but starts to deviate aroun -1.5 and completely different to the EXCEL function by -2.   Any help would be very very very helpfuly.

CREATE FUNCTION UCI_FN_STANDARD_NORM_CUMUL_DISTRIB (@X NUMERIC(19,16))

RETURNS NUMERIC(19,16)

AS
BEGIN

 DECLARE       @Z NUMERIC (19,16),
            @P  NUMERIC (19,16),
             @T  NUMERIC (19,16),  
            @B1  NUMERIC (19,16),
            @B2  NUMERIC (19,16),
            @B3  NUMERIC (19,16),      
            @B4  NUMERIC (19,16),
            @B5  NUMERIC (19,16)
   
      
               SET @Z = 1 / SQRT(2 * 3.14159265359) *  EXP((POWER(-@X,2) / 2)*-1)
            SET @P = 0.2316419
              SET @B1 = 0.31938153
               SET @B2 = -0.356563782
               SET @B3 = 1.781477937
               SET @B4 = -1.821255978
               SET @B5 = 1.330274429

            SET @T = 1 / (1 + @P * @X)

            RETURN  1 - @Z * (@B1 * @T + @B2 * POWER(@T, 2) + @B3 * POWER(@T,3) + @B4 * POWER(@T, 4) + @B5 * POWER(@T, 5)      )

END
[+][-]11/05/09 09:46 AM, ID: 25751956Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: SQL Server 2005
Sign Up Now!
Solution Provided By: prabhakaranbk
Participating Experts: 1
Solution Grade: A
 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625