Raw Data: Rate of Temperature Change in Degrees Celsius per Minute

rate <- c(
  0.9,0.88,0.78,0.85,0.86,0.83,0.79,0.91,0.86,0.89,   # Short Thin
  0.91,0.81,0.89,0.83,0.85,0.83,0.9,0.89,0.89,0.8,    # Short Wide
  1.04,1.06,1.06,0.92,0.91,1.03,0.93,0.92,0.89,0.9,   # Tall Thin
  1.04,0.98,0.92,1.02,0.89,0.92,0.95,0.91,1.06,1.05   # Tall Wide
)

height <- factor(rep(c("Short","Short","Tall","Tall"), each=10))
width  <- factor(rep(c("Thin","Wide","Thin","Wide"), each=10))

data <- data.frame(rate, height, width)

Checking Assumptions: - Normality: Tall + Thin is not normally distributed, it is skewed right, the rest appear normally distributed.

by(data$rate, interaction(data$height, data$width), shapiro.test)
## interaction(data$height, data$width): Short.Thin
## 
##  Shapiro-Wilk normality test
## 
## data:  dd[x, ]
## W = 0.92888, p-value = 0.4369
## 
## ------------------------------------------------------------ 
## interaction(data$height, data$width): Tall.Thin
## 
##  Shapiro-Wilk normality test
## 
## data:  dd[x, ]
## W = 0.80019, p-value = 0.01458
## 
## ------------------------------------------------------------ 
## interaction(data$height, data$width): Short.Wide
## 
##  Shapiro-Wilk normality test
## 
## data:  dd[x, ]
## W = 0.88657, p-value = 0.1551
## 
## ------------------------------------------------------------ 
## interaction(data$height, data$width): Tall.Wide
## 
##  Shapiro-Wilk normality test
## 
## data:  dd[x, ]
## W = 0.89722, p-value = 0.2042
leveneTest(rate ~ height * width, data = data)
## Levene's Test for Homogeneity of Variance (center = median)
##       Df F value Pr(>F)
## group  3  1.3508 0.2733
##       36

Since: - Groups are of Equal Size - Equal Variances Can Be Assumed - Only One Skewed Group

Given: - ANOVA is robust to moderate non-normality - Equal sample sizes improve robustness - Variances are homogeneous

→ It is statistically defensible to proceed with the two-way ANOVA on the raw data.

anova_model <- aov(rate ~ height * width, data = data)
summary(anova_model)
##              Df  Sum Sq Mean Sq F value   Pr(>F)    
## height        1 0.12656 0.12656  39.438 2.94e-07 ***
## width         1 0.00042 0.00042   0.132    0.719    
## height:width  1 0.00002 0.00002   0.007    0.934    
## Residuals    36 0.11553 0.00321                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

A two-way ANOVA was conducted to examine the effects of container height and width on rate of temperature change. There was a significant main effect of height, F(1, 36) = 39.44, p < 0.001, indicating that tall containers exhibited significantly greater temperature change rates than short containers. There was no significant main effect of width, F(1, 36) = 0.13, p = 0.719, nor was there a significant height × width interaction, F(1, 36) = 0.007, p = 0.934.

Information For Grisha: Why We Used a Two-Way ANOVA Instead of a t-Test A t-test compares the means of two groups only.

Your experiment had four groups:
  - Short & Thin
  - Short & Wide
  - Tall & Thin
  - Tall & Wide

More importantly, your design included two independent variables: - Height (Short vs Tall) - Width (Thin vs Wide)

A two-way ANOVA is specifically designed for this situation because it can test: - Whether height affects temperature change - Whether width affects temperature change - Whether the effect of height depends on width (interaction)

If you ran multiple t-tests instead: - You would need several comparisons - Your Type I error rate (false positive rate) would increase - You could not properly test for interaction

Two-way ANOVA analyzes everything simultaneously in one model, which is statistically correct and more efficient.

Why We Checked the Statistical Assumptions Statistical tests rely on certain mathematical conditions. If those conditions are badly violated, the results can be misleading.

We checked: 1️⃣ Normality ANOVA assumes that the residuals (random error in the model) are approximately normally distributed.

Why this matters: ANOVA calculates probabilities based on normal distribution theory. Severe skewness can distort p-values.

In your case: - One group showed skewness - But the design was balanced - Variances were equal - ANOVA is robust under these conditions So the test remains valid.

2️⃣ Homogeneity of Variance ANOVA assumes that variability is similar across groups.

Why this matters: If one group varies much more than others, comparisons become unreliable.

Your Levene’s test showed: - No significant difference in variance - Therefore this assumption was satisfied - Checking assumptions is not optional — it ensures the mathematical validity of the conclusions.

What the Results Mean in Plain Language Here is the simplified interpretation:

Height Had a Significant Effect: Tall containers changed temperature faster than short containers. This difference is very unlikely to be due to random chance. Statistically, the probability that this difference occurred randomly is less than 0.001 (less than 0.1%). So we conclude: Height truly influences temperature change rate.

Width Did Not Have a Significant Effect: Thin and wide containers did not differ meaningfully. Any small difference observed could easily be explained by natural random variation.

There Was No Interaction: The effect of height did not depend on width.

In simple terms: Tall containers performed similarly whether thin or wide. Short containers performed similarly whether thin or wide. Width did not modify the height effect.

The Big Picture: We tested whether container height and width influence how fast temperature changes. We used a statistical method that allows both factors to be tested at the same time. The analysis showed that height clearly matters — tall containers change temperature faster — but width does not. Also, the influence of height does not depend on width.

library(ggplot2)
data$group <- interaction(data$height, data$width, sep = " & ")

data$group <- factor(
  data$group,
  levels = c("Short & Thin",
             "Short & Wide",
             "Tall & Thin",
             "Tall & Wide")
)
ggplot(data, aes(x = rate, y = group, fill = height)) +
  geom_boxplot(width = 0.6, outlier.shape = 16, outlier.size = 2) +
  labs(
    title = "Rate of Temperature Change by Container Type",
    x = "Rate of Temperature Change (°C/min)",
    y = "Container Type"
  ) +
  theme_minimal(base_size = 14) +
  theme(
    legend.position = "top",
    plot.title = element_text(hjust = 0.5)
  )

library(dplyr)
## Warning: package 'dplyr' was built under R version 4.5.2
## 
## Attaching package: 'dplyr'
## The following object is masked from 'package:car':
## 
##     recode
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
summary_stats <- data %>%
  group_by(group) %>%
  summarise(
    min_rate = min(rate),
    median_rate = median(rate),
    mean_rate = mean(rate),
    max_rate = max(rate)
  )

summary_stats
## # A tibble: 4 × 5
##   group        min_rate median_rate mean_rate max_rate
##   <fct>           <dbl>       <dbl>     <dbl>    <dbl>
## 1 Short & Thin     0.78       0.86      0.855     0.91
## 2 Short & Wide     0.8        0.87      0.86      0.91
## 3 Tall & Thin      0.89       0.925     0.966     1.06
## 4 Tall & Wide      0.89       0.965     0.974     1.06