Rationale

This study asks a simple question: does the actor’s body type in a sandwich ad nudge calorie estimates? That visual serves as the cue.

Hypothesis

Average calorie estimates differ between versions of the ad (buff vs dad bod).

Variables & method

One hundred participants were randomly split into two groups of 50 and shown one ad version. After viewing, each person estimated the sandwich’s calories. We compare group means with an independent‑samples t‑test (Welch).

Results & discussion

The graph contrasts the groups. The table shows the t‑test.

# Packages
if (!require("dplyr")) install.packages("dplyr")
if (!require("ggplot2")) install.packages("ggplot2")
if (!require("gt")) install.packages("gt")

library(dplyr); library(ggplot2); library(gt)
options(scipen = 999)

# Load data (expects SandwichAd.csv in the project folder)
mydata <- read.csv("SandwichAd.csv")

# Prepare variables
mydata <- mydata %>% mutate(DV = Calories, IV = Actor)

# --- Graph ---
group_means <- mydata %>% group_by(IV) %>% 
  summarise(mean_DV = mean(DV, na.rm = TRUE), .groups = "drop")

ggplot(mydata, aes(x = DV)) +
  geom_histogram(binwidth = diff(range(mydata$DV, na.rm = TRUE))/30,
                 color = "black", fill = "#1f78b4", alpha = 0.7) +
  geom_vline(data = group_means, aes(xintercept = mean_DV),
             color = "red", linetype = "dashed", linewidth = 1) +
  facet_grid(IV ~ .) +
  labs(title = "Calories distributions by ad condition",
       x = "Estimated calories", y = "Count") +
  theme_minimal()
# --- Welch t-test and summary table ---
t_res <- t.test(DV ~ IV, data = mydata, var.equal = FALSE)

t_summary <- tibble(
  Group1 = levels(as.factor(mydata$IV))[1],
  Group2 = levels(as.factor(mydata$IV))[2],
  Mean1  = t_res$estimate[1],
  Mean2  = t_res$estimate[2],
  t      = as.numeric(t_res$statistic),
  df     = as.numeric(t_res$parameter),
  p      = as.numeric(t_res$p.value),
  CI_low = t_res$conf.int[1],
  CI_high= t_res$conf.int[2]
)

t_summary %>%
  gt() %>%
  fmt_number(columns = c(Mean1, Mean2, CI_low, CI_high), decimals = 2) %>%
  fmt_number(columns = c(t, df, p), decimals = 3) %>%
  tab_header(
    title = "Independent samples t-test results",
    subtitle = "Welch's t-test (unequal variances)"
  ) %>%
  cols_label(
    Group1 = "Group 1",
    Group2 = "Group 2",
    Mean1  = "Mean (Group 1)", 
    Mean2  = "Mean (Group 2)",
    t      = "t statistic",
    df     = "Degrees of freedom",
    p      = "p-value",
    CI_low = "95% CI (Lower)",
    CI_high= "95% CI (Upper)"
  )

Group differences follow the pattern expected by the hypothesis: viewers of the dad bod ad give higher calorie estimates. The t‑test indicates that the difference is statistically significant.