Department of Statistics, Virginia Tech

This homework is due on **Tuesday, November 14th at 2pm** (the start of class). Please turn in all your work. This homework primarily covers on statistical tests based on ranks (via variances) and measures of rank correlation.

**Calculations by hand**: Throughout this homework, and beyond, “by hand” means either (1) you utilize quantile/distribution tables, and/or Gaussian approximations, as appropriate, and otherwise do all of your calculations with pen and paper (and a calculator); or (2) you write code, say in R, building up all of the steps yourself, i.e., not using a library function that automates the entire procedure (see next bullet).**Using a software library**: Through this the homework, and beyond, “using a software library” means you can feed your data into a built-in function, like`t.test`

and`binom.test`

in R, and interpret the output as appropriate. Be sure to provide details on the library you used, how you used it, what the output was, and what it means.

Test the following data to see if the variation in high temperature in Des Moines is higher than the that for the high temperature in Spokane, for randomly sampled days in the summer.

```
desmoines <- c(83, 91, 94, 89, 89, 96, 91, 92, 90)
spokane <- c(78, 82, 81, 77, 79, 81, 80, 81)
```

- (10 pts) Perform the test “by hand”: show the ranking, clearly state the hypotheses, test statistic and conclusion.
- (5 pts) Perform the test “using a software library”.

In a controlled environment laboratory, 10 men and 10 women were tested to determine the room temperature they found to be the most comfortable. There results were:

```
men <- c(74, 72, 77, 76, 76, 73, 75, 73, 74, 75)
women <- c(75, 77, 78, 79, 77, 73, 78, 79, 78, 80)
```

Assuming that these temperatures resemble a random sample from their respective populations, is the variation in comfortable temperature the same for men and women?

- (10 pts) Perform the test “by hand”: show the ranking, clearly state the hypotheses, test statistic and conclusion.
- (5 pts) Perform the test “using a software library”.

The tensile strength of silicone rubber is thought to be a function of curing temperature. A study was carried out in which samples of 12 specimens of the rubber were prepared using curing temperatures of 20 degrees Celsius and 45 degrees Celsius. The data below show the tensile strength values in megapascals.

```
c20 <- c(2.07, 2.14, 2.22, 2.03, 2.21, 2.03, 2.05, 2.18, 2.09, 2.14, 2.11, 2.02)
c45 <- c(2.52, 2.15, 2.49, 2.03, 2.37, 2.05, 1.99, 2.42, 2.08, 2.42, 2.29, 2.01)
```

You should perform all the following tasks using software.

- (5 pts) Calculate numerical summaries of your data, this includes at least finding the mean, the median and standard deviation for each type of fabric.
- (5 pts) Construct a helpful plot to compare your data, I suggest a boxplot. If you can create a single boxplot to summarize both curing temperatures, even better. Comment on the plots in terms of mean/median values and variability.
- (10 pts) Perform a two sided test comparing the mean value of tensile strength at both temperatures. You should provide the hypotheses, and values for the test statistic and \(p\)-value.
- (10 pts) Perform a two sided test comparing the variability of tensile strength at both temperatures. You should provide the hypotheses, and values for the test statistic and p-value.

Random samples from each of three different types of light bulbs were tested to see how long the light bulbs lasted, with the following results:

```
bulbs <- list(
A=c(73, 64, 67, 62, 70),
B=c(84, 80, 81, 77),
C=c(82, 79, 71, 75))
```

Do these results indicate a significant difference in the variability between brands?

An investment class was divided into three groups of students. One group was instructed to invest in bonds, the second in blue chips stocks, and the third in speculative issues. Each student “invested” $10,000 and evaluated the hypothetical profit or loss at the end of 3 months with the following results.

```
invest <- list(bonds=c(146, 180, 192, 185, 153),
bluechip=c(176, 110, 212, 108, 196),
speculative=c(-540, 1052, 642, -281, 67))
```

Is the difference in variance significant?

A husband and a wife go bowling together and they kept their scores for 10 games to see if there was a correlation between their scores. The scores were recorded in order as follows.

```
bowling <- data.frame(husband=c(147, 158, 131, 142, 183, 151, 196, 129, 155, 158),
wife=c(122, 128, 125, 123, 115, 120, 108, 143, 124, 123))
```

- (10 pts) Compute \(\rho\).
- (10 pts) Test the hypothesis of independence using a two-tailed test.