STAT 516 hw 6

Author

Karl Gregory

Each student in a statistics class, according to a random assignment, was given a sheet of paper on which was printed one of the following:

  1. A circle and the instruction to draw a circle with twice the diameter.
  2. A circle and the instruction to draw a circle with twice the area.
  3. A square and the instruction to draw a square with twice the side length.
  4. A square and the instruction to draw a square with twice the area.

After the sheets were collected they were scanned into a single PDF and uploaded to chatGPT with the prompt:

I am uploading a pdf. Each page has a set of instructions and a drawing made by a student. On pages that ask the student to draw a square, measure the side length of the square. On pages that ask the student to draw a circle, measure the diameter of the circle. The paper is 8.5 by 11 inches. Store the output in a csv file. The csv file should have three columns. One column should have the entries “square” or “circle” according to whether the student was asked to draw a square or a circle, another should have “diameter” or “area”, the former if the student was asked to double the side length or diameter of the shape and the latter if the student was asked to double the area of the shape.

The resulting comma separated values file can be read into R with the following code:

link <- url("https://gregorkb.github.io/data/STAT_516_fa_2026_square_circle_measurements.csv")
sqcirc <- read.csv(link)

The side length of the printed squares and the diameter of the printed circles were both \(2\) inches. To double the area of these shapes, one needs to multiply the side length or diameter by \(\sqrt{2}\), so the side length/diameter needed to double the area of the square/circle was \(2\sqrt{2}\). In the case of doubling the side length/diameter the target side length/diameter was \(4\).

The code below adds a column to the data set containing the difference between the side length/diameter of the drawn circle/square and the target side length/diameter, depending on the doubling instruction. Moreover, it removes a few observations in order to make the number of replicates at each combination of shape and doubling instruction equal.

sqcirc$err <- sqcirc$measurement_inches - ifelse(sqcirc$doubling_instruction == "area",sqrt(2)*2,4)
rmv <- c(1,3,4,8,14)
sqcirc_bal <- sqcirc[-rmv,]

The data set is printed here:

sqcirc_bal
    shape doubling_instruction measurement_inches        err
2  circle             diameter               2.77 -1.2300000
5  square                 area               3.49  0.6615729
6  circle             diameter               4.83  0.8300000
7  square                 area               3.65  0.8215729
9  square                 area               3.39  0.5615729
10 square                 area               3.88  1.0515729
11 circle             diameter               3.35 -0.6500000
12 square             diameter               4.54  0.5400000
13 circle                 area               3.21  0.3815729
15 circle             diameter               3.92 -0.0800000
16 square             diameter               3.93 -0.0700000
17 circle                 area               3.16  0.3315729
18 circle                 area               3.69  0.8615729
19 circle                 area               4.04  1.2115729
20 square             diameter               4.07  0.0700000
21 square             diameter               3.83 -0.1700000

Regarding the values in the newly created “error” column as the responses, consider fitting the two-way treatment effects model \[ Y_{ijk} = \mu + \tau_i + \gamma_j + (\tau\gamma)_{ij} + \varepsilon_{ijk} \] for \(k =1,\dots,n_{ij}\), \(i = 1,\dots,a\), \(j = 1,\dots,b\), where \(\varepsilon_{ijk}\) are independent error terms having the \(\mathcal{N}(0,\sigma^2)\) distribution.

1.

Visualize the data with side-by-side boxplots or dotplots.

2.

What are the two factors in the experiment and how many levels does each one have?

4.

Give the number of replicates in each treatment group.

5.

Give the means of the responses at all factor level combinations.

6.

Give \(\hat \sigma\), the estimate of the standard deviation \(\sigma\) of the error terms.

7.

Check carefully whether the assumptions of the two-way ANOVA model are satisfied.

8.

Even though the assumptions might not be satisfied, give the value of the test statistic for the overall \(F\) test as well as the associated \(p\) value. Give an interpretation of these values.

9.

Obtain the complete ANOVA table containing the \(F\) test statistics and associated \(p\) values for testing the significance of the main effects as well as the interaction effect.

10.

Generate interaction plots for the two factors. State whether you believe there is an interaction between the two factors (From here on you may assume that the model assumptions are satisfied, though you may not agree that this is so).

11.

State whether you believe there is a significant main effect associated with either of the two factors. Explain your answer.

12.

Give a confidence interval for the mean side length/diameter of squares/circles drawn under the instruction to double the side length/diameter (this is a marginal mean). Choose your own level of confidence.

13.

Which do the data suggest is more difficult, drawing a picture of a circle/square with twice the diameter/side length or with twice the area of the one shown? Provide a confidence interval in support of your answer (it should be a confidence interval comparing marginal means).