Write a program to calculate the linear regression size-estimating parameters for two arrays, each of n numbers. Enhance program 1 to work for the new calculations with minimal duplication.
Given a set of historical data for variables x and y, you want to determine if a likely value yk based on a known or estimated new value xk. An example would be the relationship between the estimated object LOC in a program and the actual new and changed program LOC.
The historical x and y data must demonstrate a relationship.
There must be sufficient data produce a statistically significant result (at least three items and preferably five or more.)
Determine the beta0 and beta 1 parameters that best represent the relationship between these x and y data, and then calculate yk using the following formula and the available data.
Thoroughly test the program. At a minimum, use this program to calculate the beta parameters for the three provide data sets.
|Program Number||Estimated Object LOC||Estimated New and Changed LOC||Actual New and Changed LOC|
- Use the data in above for estimated object LOC and actual new and changed LOC. The resulting values should be beta_0 = -22.55 and beta_1 = 1.7279.
- Calculate the beta_0 and beta_1 parameters for the regression fit of estimated new and changed LOC to actual new and changed LOC columns in Table D8. The answer in this case should be beta_0 = -23.92 and beta_1 = 1.4310.
- Calculate the beta_0 and beta_1 parameters for the estimated new and changed LOC and the actual new and changed LOC for the programs 2A, 3A and 4A that you have developed.
|Program Number||Estimated Object LOC||Estimated New and Changed LOC||XiYi||Xi2|