Homepage › Solution manuals › James Stewart › Calculus: Early Transcendentals › Exercise 1.2.29
Exercise 1.2.29
The table shows (lifetime) peptic ulcer rates (per 100 population) for various family incomes as reported by the National Health Interview Survey.
- (a)
- Make a scatter plot of these data and decide whether a linear model is appropriate.
- (b)
- Find and graph a linear model using the first and last data points.
- (c)
- Find and graph the regression line.
- (d)
- Use the linear model in part (c) to estimate the ulcer rate for people with an income of $25,000.
- (e)
- According to the model, how likely is someone with an income of $80,000 to suffer from peptic ulcers?
- (f)
- Do you think it would be reasonable to apply the model to someone with an income of $200,000?
Answers
- (a)
-
Judging from the graph, the linear model is appropriate for this case.
- (b)
-
The linear function
that passes through points
and
can be found by the equation
- (c)
-
Using Python, we calculate the regression function
import numpy as np X = np.array([4000, 6000, 8000, 12000, 16000, 20000, 30000, 45000, 60000]) Y = np.array([14.1, 13, 13.4, 12.5, 12, 12.4, 10.5, 9.4, 8.2]) result = np.polyfit(X, Y, 1) # 1 indicates linear regression slope = result[0] intercept = result[1] print("Slope (m):", slope) print("Intercept (b):", intercept)
(Alternatively, we can use WolframAlpha). In other words, we get the regression formula:
The regression line then looks as follows:
- (d)
- For people with an income of $25,000 the ulcer rate is:
- (e)
- For people with an income of $80,000 the ulcer rate is:
- (f)
- No, that’s impossible as the rate would turn negative. The model only seems to make sense for medium-income levels. After $100,000-$150,000 income, the ulcer level probably does not depend on income anymore since all of the healthcare needs are fully covered after that.
2023-08-07 09:45