Homework 12

CHE 116: Numerical Methods and Statistics

4/18/2019


1. Conceptual Questions (22 Points)

Answer in Markdown 2 Points each

  1. What do we assume about noise in linear regression? Why is that often a reasonable assumption?

  2. Why are there no equations for an intercept for multidimensional ordinary least-squares regression?

  3. How could you justifiy using this simpler model $y = \beta_1 x + \beta_0 + \epsilon$ over this one $y = \beta_2 x^2 + \beta_1 x + \beta_0 + \epsilon$

  4. What two ways can you assess correlation before doing a regression?

  5. How might you justify correlation after regression?

  6. What is the model equation for a linearized version of $r = A e^{-E / RT}$ where you have $T$ and $r$ measurements?

  7. Is it valid to use OLS-ND for this linearized model?

  8. Write a model equation for how smoking affects someone's life expectancy. Indicate smoking with $s$.

  9. Write a model equation for how smoking and drinking affects life expectancy. Indicate drinking with $d$

  10. You can drink only coke, diet coke, diet pepsi, or pepsi. Write a model equation for choice of soda on IQ.

  11. What is attenuation error?

2. Linear Regression (25 Points)

Report the p-values, confidence intervals, and justify your regression for the following linear data: Break your answer into three parts:

  1. [5 Points] Compute Regression
  2. [5 Points] Plot Regression
  3. [5 Points] Evaluate Fit
  4. [10 Points] Error (p-values and confidence intervals)
x = [0.5,1.3, 2.1, 1.0, 2.1, 1.7, 1.2, 3.9, 3.9, 1.5, 3.5, 3.9, 5.7, 4.7, 5.8, 4.6, 5.1, 5.9, 5.5, 6.4, 6.7, 7.8, 7.4, 6.7, 8.4, 6.9, 10.2, 9.7, 10.0, 9.9]
y = [-1.6,0.5, 3.0, 3.1, 1.5, -1.8, -3.6, 7.0, 8.6, 2.2, 9.3, 3.6, 14.1, 9.5, 14.0, 7.4, 6.4, 17.2, 11.8, 12.2, 18.9, 21.9, 20.6, 15.7, 23.7, 13.6, 26.8, 22.0, 27.5, 23.3]

3. More Regression (25 Points)

Using this model equation: $y = \beta_1 \ln x + \beta_0$, regress the following data. Break your answer into three parts:

  1. [5 Points] Compute Regression
  2. [5 Points] Plot Regression
  3. [5 Points] Evaluate Fit
  4. [10 Points] Error (p-values and confidence intervals)
x = [1.4,2.3, 3.7, 5.3, 6.6, 8.2, 10.2, 11.8, 12.7, 13.3, 14.6, 17.3, 18.6, 19.5, 21.6, 22.7, 23.6, 24.1]
y = [1.0,0.3, -0.1, -0.1, -0.3, -0.4, -0.4, -0.5, -0.4, -0.5, -0.4, -0.6, -0.8, -0.8, -0.6, -0.9, -0.7, -1.1]