In this exercise we will test the hypothesis that the mean vector for bottle number 5 is

Question:

In this exercise we will test the hypothesis that the mean vector for bottle number 5 is not contained in a credible interval centered around the mean of the remaining observations. We can think of this as a crude equivalent of a hypothesis test for a single mean from a normal distribution. It is crude because we will not take into account the uncertainty in the measurements in bottle 5 , nor will we account for the fact that we do not know the true mean concentration. However, we can see from the plots that bottle number 5 is quite distinct from the other bottles.
i. Firstly we need to separate the measurements from bottle number 5 out and calculate the mean concentration of each element [R:]

image text in transcribed

[Minitab:] We need to divide the data into two groups in Minitab. The simplest way do this is to select the 20 rows of data where the bottle number is equal to 5 and cut (Ctrl-X) and paste (Ctrl-V) them into columns c9-c15. To calculate the column means we click on the Session window and then select Command Line Editor from the Edit menu. Type the following into Minitab:

image text in transcribed

This will calculate the column means for bottle number 5, initially store them in columns \(\mathrm{c} 17\) to \(\mathrm{c} 21\), and then transpose them and store them in column c16.

ii. Next we use the Minitab macro MVNorm or R function mvnmvnp to calculate the posterior mean. We assume a prior mean of (0,0,0,0,0)', and a prior variance of 106I5 where I5 is the 5 x 5 identify matrix as our data is recorded on ve elements. Note that to perform our calculations in Minitab we need to use Minitab's matrix commands. These can be quite verbose and tedious to deal with as Minitab cannot perform multiple matrix operations on the same line.

image text in transcribed

iii. Finally we calculate the test statistic and the the \(P\)-value.
[R:]

image text in transcribed

[Minitab:] Note that the name commands are not necessary, but it makes the commands slightly more understandable.

image text in transcribed

image text in transcribed

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Introduction To Bayesian Statistics

ISBN: 9781118091562

3rd Edition

Authors: William M. Bolstad, James M. Curran

Question Posted: