Question: Exercise 6 . You have measured data on the armor thickness of a particular type of crustacean at several ages. In each observatin you have

Exercise 6. You have measured data on the armor thickness of a particular type of crustacean at several ages. In each observatin you have also recorded the presence or absence of predators nearby. Each row of your data table represents one individual crustacean that you measured.
Here is how your data table looks:
| Armor Thickness (mm)| Age (months)| Predators (1= present)||--------------------|--------------------|------------------------||20.1|0|0||19.5|0|0||70.3|0|1||69.0|0|1||21.9|1|0||20.9|1|0||22.1|2|0||73.4|3|1||23.5|3|0||74.7|4|1||75.1|5|1||25.0|5|0||25.3|5|0|
In python, fit a multiple linear regression of Age and the presence of Predators using your data.
Answer the following in your response:
How much on average does the presence of Predators increase Armor thickness?
How much on average does each month of age increase armor thickness?
Is the effect of predators on armor thickness significant in these data?
Is the effect of age on armor thickness significant in these data?
Hint: it is probably easiest to build a data table in Excel (by copying the data on this page), save it as a .csv file, then load that into a pandas DataFrame using the read_csv function. From there you should be able to fit an OLS model in statsmodels by adapting the code from earlier in the chapter.
Exercise 7. Graph the data from Exercise 6. You can use the code from earlier in the chapter to help. What do you notice in the graph? Does this make sense with the statistical results you saw earlier?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!