195k views
3 votes
An article in the Journal of Sound and Vibration describes a study investigating the relationship between noise exposure and hypertension. The following data are representative of those reported in the article.

y 1 0 1 2 5 1 4 6 2 3
x 60 63 65 70 70 70 80 90 80 80
y 5 4 6 8 4 5 7 9 7 6
x 85 89 90 90 90 90 94 100 100 100
a. Draw a scatter diagram of y (blood pressure rise in millimeters of mercury) versus x (sound pressure level in decibels). Does a simple linear regression model seem reasonable in this situation?
b. Fit the simple linear regression model using least squares. Find an estimate of σ2σ2.
c. Find the predicted mean rise in blood pressure level associated with a sound pressure level of 85 decibels.
d. Find the Coefficient of correlation.
e. Set up an ANOVA table and test for the slope of the regression line.

User Kunz
by
4.9k points

1 Answer

6 votes

Answer:

(a)

import pandas as pd

import matplotlib.pyplot as plt

y = pd.Series([1,0,1,2,5,1,4,6,2,3,5,4,6,8,5,7,9,7,6])

x = pd.Series([60,63,65,70,70,70,80,90,80,80,85,59,90,90,90,94,100,100,100])

plt.scatter(x,y)

(b)

import statsmodels.api as sm

model = sm.OLS(x,y)

res = model.fit()

print(res.summary())

(c)

5

(d)

The ANOVA table is given by print(res.summary())

Explanation:

(a)

For the first part, using python you can use the pandas and matplotlib.pyplot libraries to do an scatter plot then you assign x = the values you are given and y = the values you are give and use the pyplot scatter plot command. The code would look like this. (I also attach the graph)

import pandas as pd

import matplotlib.pyplot as plt

y = pd.Series([1,0,1,2,5,1,4,6,2,3,5,4,6,8,5,7,9,7,6])

x = pd.Series([60,63,65,70,70,70,80,90,80,80,85,59,90,90,90,94,100,100,100])

plt.scatter(x,y)

(b)

For the second part you can use the statsmodel library from python and fit the model with the information given and then the summary function which will give you information about the
\sigma^2, in python
\sigma^2 would be
R^2 , the code would look like this.

import statsmodels.api as sm

model = sm.OLS(x,y)

res = model.fit()

print(res.summary())

(c)

According to the information of the problem the predicted mean rise in blood pressure level associated with a sound pressure level of 85 decibles is 5.

(d)

According to the table it would be x1 15.0084

(e)

The ANOVA table is given by print(res.summary())

An article in the Journal of Sound and Vibration describes a study investigating the-example-1
An article in the Journal of Sound and Vibration describes a study investigating the-example-2
User Yokto
by
4.7k points