Packages Loaded

rm(list = ls()) # Clear the workspace
library(readxl)
library(knitr)
library(tidyverse)
library(lmtest) 
library(sandwich)
library(dplyr)
library(ggplot2)
library(fixest)  # use for regression approach + cluster-robust robust standard errors

Load data

Set up

new_directory <- "C:/Users/havil/Documents/1a Homework 1 Clinic Sales Case Study"
setwd(new_directory)


chatgpt = read.csv("chat_gpt_experiment_data.csv")

Main hypothesis / Agreeance

Individuals using ChatGPT/expert advice will have more confidence in their estimation compared to those who use no tools, even more so in the case that both answers were similar in the two guesses.

Balance Check

balance_table = chatgpt %>% group_by(condition) %>% 
summarise(N=n(), 
confidence_m = mean(confidence), confidence_sd = sd(confidence),
gpt_m = mean(use_gpt),gpt_sd = sd(use_gpt), duration_m = mean(duration) )

kable(balance_table, digits = 2)
condition N confidence_m confidence_sd gpt_m gpt_sd duration_m
0 641 2.47 0.98 2.34 1.16 206.69
1 632 2.44 0.96 2.48 1.27 241.91
2 630 2.45 0.93 2.43 1.21 261.00

Looking at the data it appears to be balanced. When we look at the conditions we can see that there is similar standard deviation, N, and previous ChatGPT use. It is important to note that for the duration condition 0 (control) was less. My conjecture on this would be that because the control group is not given extra information to read for the opinion to be swayed, then that means that their duration would naturally be shorter. Lastly, if we look confidence and variation we we that they are similar as well.

Average Treatment Effect

treat_table = chatgpt %>% group_by(condition) %>% 
  summarise(N=n(),confidence_m = mean(confidence),
  confidence_sd = sd(confidence))

ate_table = treat_table %>% mutate(ate = confidence_m - confidence_m[1], 
  se_ate = sqrt(confidence_sd^2/N + confidence_sd[1]^2/N[1]),
  lb = ate - 1.96*se_ate,
   ub = ate + 1.96*se_ate) %>% filter(condition != 0) %>% select(condition, ate, lb, ub)

kable(ate_table, digits = 2)
condition ate lb ub
1 -0.04 -0.14 0.07
2 -0.03 -0.13 0.08

For Condition 1 the estimated ATE is -0.04, indicating a negative average treatment effect in condition 1 compared to the control group. However the confidence interval is (-0.14 to 0.07)

For Condition 2 The estimated ATE is -0.03, indicating a negative average treatment effect in condition 2 compared to the control group. However the confidence interval (-0.13 to 0.08).

Because the CI is wider than the Treatment effects we can conclude that is not statistically significant.

Thus, this would go against the hypothesis.

Means for Treatment

outcome_table = chatgpt %>% group_by(condition) %>% 
  summarise(N=n(), confidence_m = mean(confidence),
  confidence_sd = sd(confidence)) %>% 
  mutate( se = confidence_sd / sqrt(N), lb = confidence_m - 1.96*se,ub = confidence_m + 1.96*se )

mean_ci_table = outcome_table %>% select(condition, confidence_m, lb, ub)
kable(mean_ci_table, digits = 2)
condition confidence_m lb ub
0 2.47 2.40 2.55
1 2.44 2.36 2.51
2 2.45 2.38 2.52
ggplot(outcome_table, aes(x=condition, y=confidence_m,
                          ymin=lb, ymax=ub)) + 
  geom_point() + 
  geom_errorbar()

If we look at the treatment mean confidence we 2.47 for condition 0, 2.44 for condition 1, and 2.45 for condition 2. They all have similar lower and upper bounds as well. This would tell us that people are simalarily confident in all 3 conditions.

Summary

Based on the results from the treatment mean and treatment effect we can conclude that the hypothesis, “Individuals using ChatGPT/expert advice will have more confidence in their estimation compared to those who use no tools, even more so in the case that both answers were similar in the two guess” was wrong. Additionally, the data was balanced so this would further support that the hypothesis is wrong.

However, I would like to say with how prevalent chatGPT has become there might be an underlying paradigm shift in how answers may be answered due to its influence on how students may be thinking.