Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

20. doctors are trying to determine the relationship between the amount…

Question

  1. doctors are trying to determine the relationship between the amount of time a person exercises per week and their resting heart - rate, as measured in beats per minute. they survey eight people to find out how many hours they exercise per week and measured their resting heart rates. the data is shown below.
exercise time, x (hours)1.52.85.50.51.27.24.310.1
resting heart rate, y (beats per minute)7266618974545948

(a) determine a linear function of the form y = ax + b that best fits this data set. round all parameters to the nearest tenth.
(b) give an interpretation within the context of the problem for the values of both a and b from part (a). use proper units in your explanation.

  1. a company is tracking the number of visits to its website as a function of the number of days since the website was launched. the data is shown in the table below.
days since launch, x2815223540
number of visits, y254901086162225903012

(a) determine a linear regression model in the form y = ax + b that best fits this data. round all coefficients to the nearest tenth.
(b) what does your model predict to be the number of visits by the 60th day after the website was launched?
(c) is the prediction in (b) an example of interpolation or extrapolation? explain.

Explanation:

Step1: Recall linear - regression formula

The formulas for the slope $a$ and intercept $b$ of the least - squares regression line $y = ax + b$ are:

$$a=\frac{n\sum_{i = 1}^{n}x_iy_i-\sum_{i = 1}^{n}x_i\sum_{i = 1}^{n}y_i}{n\sum_{i = 1}^{n}x_i^{2}-(\sum_{i = 1}^{n}x_i)^{2}}$$
$$b=\overline{y}-a\overline{x}$$

where $n$ is the number of data points, $\overline{x}=\frac{1}{n}\sum_{i = 1}^{n}x_i$ and $\overline{y}=\frac{1}{n}\sum_{i = 1}^{n}y_i$.

Step2: Calculate sums for first data set (exercise time and resting heart rate)

Let $n = 8$.
For the exercise - time data $x$: $\sum_{i=1}^{8}x_i=1.5 + 2.8+5.5 + 0.5+1.2+7.2+4.3+10.1 = 33.1$
$\sum_{i = 1}^{8}x_i^{2}=1.5^{2}+2.8^{2}+5.5^{2}+0.5^{2}+1.2^{2}+7.2^{2}+4.3^{2}+10.1^{2}$
$=2.25 + 7.84+30.25+0.25+1.44+51.84+18.49+102.01=214.37$
For the resting - heart - rate data $y$: $\sum_{i = 1}^{8}y_i=72 + 66+61+89+74+54+59+48=523$
$\sum_{i = 1}^{8}x_iy_i=1.5\times72+2.8\times66+5.5\times61+0.5\times89+1.2\times74+7.2\times54+4.3\times59+10.1\times48$
$=108+184.8+335.5+44.5+88.8+388.8+253.7+484.8=1889.9$

$\overline{x}=\frac{33.1}{8}=4.1375$ and $\overline{y}=\frac{523}{8}=65.375$

$$a=\frac{8\times1889.9-33.1\times523}{8\times214.37-(33.1)^{2}}$$
$$=\frac{15119.2 - 17311.3}{1714.96 - 1095.61}=\frac{- 2192.1}{619.35}\approx - 3.5$$
$$b=65.375-(-3.5)\times4.1375=65.375 + 14.48125\approx79.9$$

The linear function is $y=-3.5x + 79.9$

Step3: Interpret $a$ and $b$

The slope $a=-3.5$ means that for every additional hour of exercise per week, the resting heart rate decreases by approximately $3.5$ beats per minute. The $y$ - intercept $b = 79.9$ represents the estimated resting heart rate (in beats per minute) when a person exercises $0$ hours per week.

Step4: Calculate sums for second data set (website visits)

Let $n = 6$.
$\sum_{i=1}^{6}x_i=2 + 8+15+22+35+40=122$
$\sum_{i = 1}^{6}x_i^{2}=2^{2}+8^{2}+15^{2}+22^{2}+35^{2}+40^{2}=4 + 64+225+484+1225+1600=3602$
$\sum_{i = 1}^{6}y_i=25+490+1086+1622+2590+3012=8825$
$\sum_{i = 1}^{6}x_iy_i=2\times25+8\times490+15\times1086+22\times1622+35\times2590+40\times3012$
$=50+3920+16290+35684+90650+120480=267074$

$\overline{x}=\frac{122}{6}\approx20.33$ and $\overline{y}=\frac{8825}{6}\approx1470.83$

$$a=\frac{6\times267074-122\times8825}{6\times3602-(122)^{2}}$$
$$=\frac{1602444-1076650}{21612 - 14884}=\frac{525794}{6728}\approx78.2$$
$$b=1470.83-78.2\times20.33=1470.83 - 1589.81=-118.98\approx - 119.0$$

The linear regression model is $y = 78.2x-119.0$

Step5: Predict number of visits for 60th day

Substitute $x = 60$ into $y = 78.2x-119.0$
$y=78.2\times60-119.0=4692-119.0 = 4573$

Step6: Determine interpolation or extrapolation

The data points range from $x = 2$ to $x = 40$. Since $x = 60$ is outside this range, the prediction in part (b) for the 60th day is an example of extrapolation.

Answer:

For the exercise - time and resting - heart - rate data:
(a) $y=-3.5x + 79.9$
(b) The slope $a=-3.5$ means the resting heart rate decreases by about 3.5 beats per minute for each additional hour of exercise per week. The $y$ - intercept $b = 79.9$ is the estimated resting heart rate (in beats per minute) when a person exercises 0 hours per week.

For the website - visits data:
(a) $y = 78.2x-119.0$
(b) 4573
(c) Extrapolation, because the value of $x = 60$ is outside the range of the data points ($2\leq x\leq40$).