Shown below are ages (𝑥) and the systolic blood pressures (𝑦) of 9 patients in a certain hospital. Find the regression equation.
Age (𝑥) 26 40 35 50 45 55 28 30 52
Blood pressure (𝑦) 110 140 120 145 130 150 150 125 142
Linear regression: "y=\\theta_0+\\theta_1x", where "\\theta_1 = \\frac{\\overline{xy}-\\overline{x}\\cdot\\overline{y}}{\\overline{x^2}-(\\overline{x})^2}", "\\theta_0=\\overline{y}-\\theta_1\\overline{x}".
"x=[26, 40, 35, 50, 45, 55, 28, 30, 52]"
"y=[110, 140, 120, 145, 130, 150, 150, 125, 142]"
"x^2 = [676, 1600, 1225, 2500, 2025, 3025, 784, 900, 2704]"
"xy=[2860, 5600, 4200, 7250, 5850, 8250, 4200, 3750, 7384]"
"\\overline{x}= \\frac{1}{9}(26+40+ 35+ 50+ 45+ 55+ 28+ 30+ 52)= \\frac{361}{9}"
"\\overline{y}= \\frac{1}{9}(110+ 140+ 120+ 145+ 130+ 150+ 150+ 125+ 142) = \\frac{403}{3}"
"\\overline{x^2}= \\frac{1}{9}(676+ 1600+ 1225+ 2500+ 2025+ 3025+ 784+ 900+ 2704) = \\frac{15439}{9}"
"\\overline{xy}= \\frac{1}{9}(2860+ 5600+ 4200+ 7250+ 5850+ 8250+ 4200+ 3750+ 7384) = \\frac{16448}{3}"
"(\\overline{x})^2= \\frac{130321}{81}"
"\\overline{x^2}-(\\overline{x})^2 = \\frac{15439}{9}-\\frac{130321}{81}=\\frac{8630}{81}"
"\\overline{xy}-\\overline{x}\\cdot\\overline{y}=\\frac{16448}{3}-\\frac{361}{3}\\cdot\\frac{403}{3}=-\\frac{96139}{9}"
"\\theta_1=\\frac{8630}{81}:(-\\frac{96139}{9})=-\\frac{69040}{7787259}"
"\\theta_0=\\frac{403}{3}+\\frac{69040}{7787259}\\frac{361}{9}=\\frac{9439719571}{70085331}"
"y=\\frac{9439719571}{70085331} -\\frac{69040}{7787259}x"
"y=40.111-0.009x"
Comments
Leave a comment