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 f that passes through points ( 4000 , 14 . 1 ) and ( 60000 , 8.2 ) can be found by the equation x [ 0 , 139808 ] : x 4000 60000 4000 = f ( x ) 14 . 1 8.2 14 . 1 .

x 4000 56000 = f ( x ) 14 . 1 5.9 .

5.9 x + 23600 = 56000 f ( x ) 789600 .

f ( x ) 14 . 5214 + 0.000105357 x .

(c)
Using Python, we calculate the regression function
    import numpy as np 
    X = np.array([400060008000120001600020000300004500060000]) 
    Y = np.array([14.11313.412.51212.410.59.48.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:

T : [ 0 , 139808 ) , T ( x ) = 0.00009978545618789518 x + 13 . 950764077085212 .

The regression line then looks as follows:

(d)
For people with an income of $25,000 the ulcer rate is: 0.00009978545618789518 25000 + 13 . 950764077085212 = 11 . 4561276723878325 11 . 5 .

(e)
For people with an income of $80,000 the ulcer rate is: 0.00009978545618789518 80000 + 13 . 950764077085212 = 5.9679275820535976 6 .

(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.
User profile picture
2023-08-07 09:45
Comments