Assignment 5 - 2014
Due date(s): | 12 March 2014, in class |
(PDF) | Assignment questions |
(PDF) | Assignment solutions (full solutions) |
<rst> <rst-options: 'toc' = False/> <rst-options: 'reset-figures' = False/> Assignment objectives
=========
.. note:: Once again, I strongly recommend you submit this `assignment electronically <Electronic_submissions_-_2014>`_ (see instructions on the course website), so that you can practice using the electronic system for the course project.
.. note:: For this assignment you will benefit from studying the `R tutorial on vectors and matrices <Software_tutorial/Vectors_and_matrices>`_.
.. question:: :grading: 12
A company has 3 reactors that are identical. Typical production schedules split the raw material equally between the 3 reactors. Data `on the website <http://openmv.net/info/brittleness-index>`_ contain the brittleness values of the product produced from the three reactors for the past few days.
#. Compare the brittleness values between reactors ``TK104`` and ``TK107``, using a regular test for differences we learned about earlier. Feel free to use the ``t.test(...)`` function, but make sure you can get the same results by hand.
#. What is the interpretation of your confidence interval?
#. Next, build a least squares model where the brittleness values are predicted using a single integer variable, :math:`d`, which is a coded as 0 for ``TK104``, and coded as 1 for ``TK107``. *Hint* use the ``c(...)`` function in R to combine vectors, and use the ``numeric(..)`` function to create vectors
Report the :math:`R^2` and standard error values for the model.
#. Calculate the slope coefficient for variable :math:`d` and report a confidence interval for it.
What is your interpretation of the confidence interval?
.. question::
:grading: 12
A factorial experiment is used to investigate settings to *minimize* the production of an unwanted side product. Two factors being investigated are called **A** and **B** for simplicity, but are:
* **A** = reaction temperature: low level was 440 K, and high level was 450 K * **B** = amount of surfactant: low level was 8 kg, high level was 12 kg
A full factorial experiment was run, randomly, on the same batch of raw materials, in the same reactor. The recorded amount, in grams, of the side product was:
.. tabularcolumns:: |c|c||c|c|c|
+-----------+------------+------------+------------+---------------------+ | Experiment| Run order | **A** | **B** | Side product formed | +===========+============+============+============+=====================+ | 1 | 2 | 440 K | 8 kg | 89 g | +-----------+------------+------------+------------+---------------------+ | 2 | 1 | 450 K | 8 kg | 268 g | +-----------+------------+------------+------------+---------------------+ | 3 | 3 | 440 K | 12 kg | 179 g | +-----------+------------+------------+------------+---------------------+ | 4 | 4 | 450 K | 12 kg | 448 g | +-----------+------------+------------+------------+---------------------+
#. Write out a least squares model that will predict the amount of side product formed given the settings for **A**, **B** and the **AB** interaction.
#. Write out the :math:`\mathbf{X}` matrix and :math:`\mathbf{y}` vector that can be used to estimate the model coefficients using the equation :math:`\mathbf{b} = \left(\mathbf{X'X}\right)^{-1}\mathbf{X'y}`.
#. Solve for the coefficients of your linear model, by using :math:`\mathbf{b} = \left(\mathbf{X'X}\right)^{-1}\mathbf{X'y}` directly.
Show your calculations that you've done by hand.
Feel free though to compare your answer to R, Minitab, Excel, or other software.
#. Give a clear interpretation of the slope coefficient of **A** and the slope coefficient for **B**.
#. What happens when you try to calculate confidence intervals? Explain clearly.
.. question:: :grading: 12
We considered data from a lab-scale bioreactor, :math:`y`, earlier in the course. In class, we looked at an example where the reactor temperature, batch duration, impeller speed and reactor type (one with with baffles and one without) were used to judge the effect on yield, :math:`y`.
Here are the data once again, and `on the website <http://openmv.net/info/bioreactor-yields>`_:
.. tabularcolumns:: |C|p{5em}|C|C|C|
.. csv-table:: :header: Temp = :math:`T` [°C], Duration = :math:`d` [minutes], Speed = :math:`s` [RPM], Baffles = :math:`b` [Yes/No], Yield = :math:`y` [g] :widths: 30, 30, 30, 30, 30
82, 260, 4300, No, 51 90, 260, 3700, Yes, 30 88, 260, 4200, Yes, 40 86, 260, 3300, Yes, 28 80, 260, 4300, No, 49 78, 260, 4300, Yes, 49 82, 260, 3900, Yes, 44 83, 260, 4300, No, 59 64, 260, 4300, No, 60 73, 260, 4400, No, 59 60, 260, 4400, No, 57 60, 260, 4400, No, 62 101, 260, 4400, No, 42 92, 260, 4900, Yes, 38
#. Demonstrate that you get the same regression slope when building the following two models:
a) a model using only temperature to predict yield; b) as in part (a) above, but first mean center the temperature vector; c) as in part (b) above, but also mean center the yield vector.
#. Next, build a linear model to predict the yield from all remaining variables. See the `R tutorial <Software_tutorial/Linear_models_with_integer_variables>`_ for help to build and interpret linear models containing integer variables.
Show your model, and interpret each variable in the model. If you are using R, then the ``confint(...)`` function will be helpful as well.
#. What is the predicted yield for a new batch, operating at 95°C for 260 minutes, at a speed of 4000 rpm in a tank with no baffles?
</rst>