Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confidence Interval

Status
Not open for further replies.

arfasih

Programmer
Dec 11, 2009
10
AT
Hello

How can I calculate Confidence Interval By MS SQL?

I have an Array of Data, and I'm looking for a method Like Confidence Interval in Excel.


Thank you very much in advance,

Regards,
Fasih
 
This is a pretty nebulous question. What are you exactly wanting to calculate? This could have hundreds of meanings.

Do you mean:
The confidence interval for a population mean, with a known standard deviation, and values assumed to come from a normal distribution?
 
To calculate the confidence interval you will need to have 3 pieces of information alpha, sigma and n...you should have that information in your excel spreadsheet.

You will probably need to build your own function to get this in MS SQL (you may want to also post in Forum183 )

You'll first have to create an algorithm for computing the inverse normal cumulative distribution function, here's a website that shows how:


Then you'll need to use that information and develop the following formula:

NORMSINV(1 – alpha/2) * sigma / SQRT(n)

where NORMSINV is the function you created above.

HTH

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top