In a study of the cost of transporting milk from farms to dairy plants, a survey was taken. Summarized data on cost data on = X1 fuel, = X2 repair and = X3 capital, all measured on a per-mile basis for both 36 gasoline (X.gas) and 23 diesel trucks (X.diesel) are given below round(apply(X.gas,2,mean),1) x1 x2 x3

Assignment Task

Question 1

10 In a study of the cost of transporting milk from farms to dairy plants, a survey was taken. Summarized data on cost data on = X1 fuel, = X2 repair and = X3 capital, all measured on a per-mile basis for both 36 gasoline (X.gas) and 23 diesel trucks (X.diesel) are given below

round(apply(X.gas,2,mean),1)

x1          x2            x3

12.2      8.1          9.6

round(var(X.gas),1)

x1          x2        x3

x1        23.0    12.4         2.9

x2       12.4     17.5        4.8

x3         2.9     4 .8        14.0

round(apply(X.diesel,2,mean),1)

x1          x2        x3

10.0    10.8      18.2

round(var(X.diesel),1)

x1          x2        x3

x1    4.4       0.8       2.4

x2    0.8      25.9      7.7

x3      2.4     7.7      46.7

a. Test for a difference in the mean cost vectors of the two types of trucks. Use α = 0.05. Assume data on both types of trucks are multivariate normal and that = 1 2 Σ Σ . You may use R to find the required inverse and are encouraged to use R to check your matrix multiplications.
b. Construct 95% 2 T (only) simultaneous confidence intervals for the pairs of mean components. Which costs, if any, appear to be different?

Consider the covariance matrix

Σ = 10  2
              2     4
a. Determine the principal components Y1 and Y2 for Σ . Use may use R to compute the eigenvectors and eigenvalues of Σ .

b. Calculate the proportion of the total population variance explained by the first principal components.

Part II: Questions requiring the use of R

The R code solutions to these questions are to be submitted as a .txt document on the due date through D2L.

When you are ready to submit your assignment in D2L:

1. Go to Assessments -> Assignments (at top of page).

2. Click “Assignment #7 R Code.

3. Go to “Add a file”. Upload your assignment. Multiple files will not be accepted. Note: Your R script will be pasted into R and run. In order to earn full marks, the output must be correct and your R script must be properly commented.

Part II : Question 1

a. In R, type the command my.data iris The variable my.data now contains the well-known iris data set which is comprised of measurements on four variables for three species of iris flowers. How many observations are there for each species? Make use of Table

b. Is there a difference in average measurements between the three species? Use the default test statistic. (Carry out a MANOVA in R with α = 0.05 to obtain the pvalue. Be sure to state your hypotheses as well as your conclusion based on the p – value) as comments in your R code. Assume assumptions are met.

c. Use summary.aov() to determine if there is a difference in average petal length, and then also in petal width, between species. What do you conclude? Use an overall significance level of 0.05 but be sure to adjust your individual levels appropriately.

d. Using the subset() parameter, carry out the three pairwise multivariate tests. What do you conclude? (See comment concerning significance levels in part c.

 

Reference no: EM132069492

WhatsApp
Hello! Need help with your assignments? We are here

GRAB 25% OFF YOUR ORDERS TODAY

X