Beta distribution

  • Hi All,

    We have a formula called BetaDist() in MS Excel. I want to implement the same formula in SQL SERver. Is it already available in SQL Server or any function is there?

  • T-SQL does not have a native BetaDist function. You can buy statistical packages/add-ons that include it, but one that I looked at was $600.

    I'm not a statistics wizard, so exactly what BetaDist does is not clear to me, otherwise I'd try to suggest a T-SQL solution to your problem. Maybe someone else here can help.


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • "The general technique for transforming a Uniform Random Number (URN) into a non-uniform random number (NURN) is to multiply the URN by the inverse of the cumulative distribution function (CDF) for the target distribution."[/I]

    -- From Generating Non-uniform Random Numbers with SQL[/url]

    I covered a few distribution functions in that article but alas the Beta is not one of them. If you find the CDF for the Beta distribution and can make it work, I'd be interested to hear about it.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply