You will need to have Excel sheet and put in the data points by column. One column should be the number of people complained and another column is the number of cups of coffee.
a.) Go to Data Analysis and click on Regression. You should have number of people complained as the y-value and the number of cups of coffee as the x-value.
P(n) = 13.1848739495798 - 2.15126050420168*n
b.) Correlation Coefficient: r = 0.930274812627754
c.) This is a strong linear trend because r is closed to +1. There is a strong relationship between the number of cups of coffee and the number of people complained about their teacher's attitude.
d.) For every cup of coffee drank, about 2 people complained less about their teacher's attitude.
e.) If the teacher didn't drink any cups of coffee to start with, then about 13 people will complain about the teacher's attitude.
f.) P(10) = 13.1848739495798 - 2.15126050420168*(10) = -8.327731092437
If he drinks 10 cups of coffee, then 8 people will complain less about his attitude.
g.) This is not reasonable because you can't have a negative number of people complaining.
h.) 13.1848739495798 - 2.15126050420168*n = 0
- 2.15126050420168*n = -13.1848739495798
n = 6.128906249999987071533203124996
He should drink about 6 cups of coffee so that no one will complain about his teacher.