Current location - Education and Training Encyclopedia - University rankings - Find y = a+b1x1+b2x2+b3x3.
Find y = a+b1x1+b2x2+b3x3.
I may have browsed your information,

In fact, to put it simply, it is to give you some points in the four-dimensional space:

(x 1,y 1,z 1,p 1),(x2,y2,z2,p2),……,(xn,yn,zn,pn)

Let you find the regression equation p = a+b * x+c * y+d * z.

The following process is to find a, b, c and d, so that this regression equation can satisfy the above n points to the maximum extent!

The greatest significance is to minimize the variance of p and pi when you substitute these points into the equation!

Let me explain first:

P = a+b * x1+c * y 1+d * z1may not be equal to y 1, but only an approximation of y1. Here is the closest approximation!

namely

Variance = [(a+b * x1+c * y1+d * z1)-p1] 2+[(a+b * x2+c * y2+d * z2)-p2. !

From the knowledge of mathematical analysis, you should regard a, b, c and d as unknowns and then find the minimum value, then the partial derivative of the function about a, b, c and d must be equal to 0.

Note here that when you take the partial derivative of A, you only take A as an unknown number, and all other numbers are constants, just as it is simple for you to take the derivative of a quadratic function. )

In this way, you will get four equations (take the partial derivative of a, b, c and d, and then make the partial derivative = 0). Then, you can use software to solve four unknowns!

The following is the matlab solution:

& gt& gtm =[ 1 00000 1 1.9400 0.2200 12.4 1.00

2000156 5.2600 0.290012.90 4.45%' An Su'

3 0005011.9500 0.0100 4.910.84%' Hubei Business A'

4 000507 2.7800 0.0600 5.46 0.98%' Hua Fu, Guangdong'

5 0005321.4900 0.1400 8.351.29%' Guangdong Huadian A'

6 000543 3.1700 0.1500 7.92 2.60%' universal power'

7 000550 2.3900 0.330011.231.43%' jiangling motors'

8 0005691.1980 0.0250 4.71.49%' Chuantou Changgang'

9 000693 2. 1400 0.2000 9.36 1.55% ' MySpace '

10 000782 2.3500 0.100 6.131.72%' Meida Shares'

110008031.5100 0.030013.761.54%' Meiya Shares'

12 000948 3.5000 0.290012.15 2.30%' Nantian Information'

136001491.7700 0.0950 7.81.1.75%' Xingtai Roller'

14 600175 4.3100 0.0400 8.90 4.61%'Baohua Industry'

15 600179 2.4200 0.0200 5.44 0.80%' blackening unit'

16 600180 3.2900 0.330010.93 3.33%' Jiufa Shares'

17 600237 2.5200 0.3100 9.94 2.38%' Tongfeng Electronics'

18 6002812.9030 0.0620 6.51.16%' Taihua shares'

19 600286 3.1100 0.2090 9.70 2.38%' Guoguang Porcelain Industry'

20 600292 4.7160 0.420013.57 4.72%' Kowloon Electric Power'

21600305 2.9968 0.215512.53 2.48%' Hengshun Vinegar Industry'

22 600306 2.4600 0.100010.471.40%' commercial city'

23 6003113.4990 0.243013.89 2.80%' Yangnong Chemical'

24 600486 3.4990 0.243013.89 2.80%' Yangnong Chemical'

25 600530 4.4900 0.260014.07 4.60%' Jiaotong University'

26 600599 2.21000 0.160013.922.21%'Liuyang fireworks'

27 6006141.8800 0.233016.341.77%' tape strand'

28 6006161.8500 0.170012.122.00%' first food'

29 600618 2.4220 0.005511.921.78%' chlor-alkali chemical industry'

30 600619 2.6000 0.044010.02 2.34%' Lihai Shares'

316006201.7000 0.30201.161.53%' Tianchen shares'

32 6006211.7000 0.1375 6.92 2.00%' Shanghai Jinling'

33 600630 3.9560 0.1190 5.58 4.00%' leading stock'

34 600632 3.4600 0.2400 6.53 2.35%' Hualian Department Store'

35 600636 2.5100 0.3086 8.77 2.34%' Three Love the Rich'

36 600637 4.2944 0.140412.823.12%' broadcast information'

37 600638 3.8819 0.0965 7.85 3.60%' New Huangpu'

38 600655 3.6920 0.2030 7.77 3.69%' Yuyuan Mall'

39 600662 3.2500 0.3600 8.59 3.50%' Johnson & Johnson Holdings'

40 6006651.7480 0.0120 6.051.10%' Hu Chang Special Steel'

416006731.4900 0.0200 7.86 0.96%' Liangcheng shares'

42 6006831.4300 0.1400 6.71.1.08%' Ningbo Hualian'

43 600688 2.0270 0.1260 3.901.22%' Shanghai Petrochemical'

44 600788 4.7700 0.1000 6.42 2.80%' Dahlman'

45 6008141.6400 0.0090 6.001.10%' Bai Jie, Hangzhou'

46 600819 3.4400 0.227014.05 2.7438+0%' Yaopi Glass'

47 600825 2.0190 0.434012.09 2.05%' Hualian Supermarket'

48 600827 3.3640 0.250012.18 2.80%' friendship shares'

49 6008741.3100 0.2200 7.201.42%' Entrepreneurship and Environmental Protection'

50 600889 3.0800 0.2000 9. 18 1.92]; %' Nanjing Chemical Fiber'

& gt& gtp=M(:,6); X=[ones(50, 1),M(:,3:5)];

& gt& gtb = regression (p, x);

& gt& gta=B( 1)

a =

-0.65 18

& gt& gtb=B(2)

b =

0.835 1

& gt& gtc=B(3)

c =

1.4092

& gt& gtd=B(4)

d =

0.0343

& gt& gt

There may be errors in the specific data, but it is very close to your answer, hehe, I can only do so much.

Finally, I wish you good luck in your work.