455,364 Members | 1,343 Online
Need help? Post your question and get tips & solutions from a community of 455,364 IT Pros & Developers. It's quick & easy.

# Complex Calculation

 P: n/a >I'm fairly new to SQL server 2005 database. The client wants to use weighted parameters(5) or areas of a project, rated from 1-5 on a scale of 1 being the highest, and the Cost of each project. i.e. Project A Param1=1, Param2=4 , Param3=1, Param4=2, Param5=5 , Cost= \$50000Using the least squares fit they want to be able to calculate aprojected cost for a project with same weighted parameters. With this being said I was wondering what I could use to do this using the information from the SQL Server. >Example: Currently this is a formula used for calculating the least square's fit using a matrixs Each Row of completed Project Cost for a completed project ex. Matrix A = 1, u1, v1, w1, x1 Matrix b = M1 1, u2, v2, w2, x2 M2 1, u3, v3, w3, x3 M3 1, un, vn, wn, xn Mn where u,v,x are weighted parameters where M is a a project x=(A^T * A)^-1 * (A^T * b) x is the function that defines the least squares curve for the data set Mar 31 '08 #1