flowchart LR
A[Research Question] --> B[Theory and Design]
B --> C[Measurement and Sampling]
C --> D[Data Collection]
D --> E[Wrangling and Visualization]
E --> F[Modeling and Uncertainty]
F --> G[Interpretation in Context]
G --> H[Reproducible Communication]
Course Intro
Statistics, Data Science, and R for HCI Research
First Week Orientation
Weekly content | Course description & communication
By the end of this week, you should be able to:
- explain how statistics and data science support HCI research;
- distinguish a research question, research design, measurement, and analysis;
- describe why this course uses R, RStudio, and Quarto;
- set up a reproducible R project and run a first analysis; and
- use generative AI as a learning and debugging aid without outsourcing statistical judgment.
Today’s Roadmap
- Course overview and learning expectations
- About the lecturer
- How the course is organized
- Research, statistics, and statistical thinking
- Data science for HCI
- Why R—and how it relates to Python
- Software setup and first R practice
- Responsible use of generative AI
Course Description
This course introduces foundational concepts in statistics and data science for Human–Computer Interaction (HCI) research. Using R and Quarto, students will learn how to design studies, manage and visualize data, select and evaluate statistical models, interpret uncertainty, and communicate results reproducibly.
The central question of the course is:
How can we turn an HCI research question into credible, interpretable, and reproducible evidence?
This course emphasizes four connected capabilities:
- Research design: translating a substantive question into a study that can answer it;
- Statistical reasoning: reasoning about variation, uncertainty, assumptions, and evidence;
- Data workflow: importing, cleaning, transforming, visualizing, and modeling data in R; and
- Communication: explaining what the results mean, what they do not mean, and how they were produced.
This is not a course in memorizing formulas or mechanically matching a research question to a statistical test. Coding is an important tool, but the final goal is defensible research reasoning.
See the full course description, evaluation, schedule, and communication channels.
About the Lecturer
Changjun LEE
- Position: Associate Professor and Head of Culture & Technology
- Affiliation: School of Convergence, College of Computing and Informatics, Sungkyunkwan University (SKKU)
- Home: https://changjunlee.com/
- Research areas: Human–AI Interaction, media and innovation, immersive media and user experience, computational social science, and technology management
- Teaching areas: Statistics for HCI, machine learning for understanding humans and society, culture and technology, and applied data science
I am a computational social scientist who uses statistical and computational methods to study how people, technologies, media, firms, and institutions interact. My academic background spans biology, chemistry, economics, technology management, and policy. This interdisciplinary path shapes the way I approach HCI: begin with a meaningful real-world question, design the study carefully, and use data to build a transparent argument.
Things I enjoy: research, conversations over coffee, MBTI, travel, and playful experiments with technology and data.
Weekly Design
The course progresses from design, to data, to inference, and finally to application and communication.
| Phase | Weeks | Main Focus |
|---|---|---|
| Foundations | 1–4 | HCI research design, measurement, data types, and R workflows |
| Explore | 5–8 | Visualization, descriptive statistics, probability, and statistical inference |
| Model | 9–12 | Experimental analysis, regression, mediation/moderation, SEM, and clustering |
| Apply & Communicate | 13–16 | Additional methods, paper reconstruction, final report, and individual consultation |
See the detailed weekly content.
Because Week 2 coincides with participation in Ars Electronica, the core research-design perspective will also be introduced during Week 1. The full Week 2 materials remain available online for review and self-study.
Research & Statistics
Statistics is not merely a collection of tests. It is a disciplined way to design studies, learn from noisy data, and communicate uncertainty.
Graduate research repeatedly asks us to make decisions with incomplete information. We observe a sample, but want to understand a broader population, process, or theoretical mechanism. Statistics helps us connect what we observed to what we want to know—while being explicit about uncertainty and assumptions.
Why Is Statistics Important in Graduate School?
1. Reading Research Critically
To evaluate a paper, you need to look beyond whether a result is “significant.” Ask:
- What was the research design?
- How were the key concepts measured?
- What population or process is the study trying to describe?
- What is the estimated effect, and in what unit?
- How uncertain is the estimate?
- Which assumptions support the conclusion?
- Is the result theoretically or practically meaningful?
Regression, ANOVA, chi-square tests, mediation models, and machine-learning models are easier to understand once you see them as different tools for answering different questions under different assumptions.
2. Designing the Study Before Collecting Data
Statistical reasoning begins before analysis. It informs:
- the unit of analysis;
- experimental conditions or comparison groups;
- sampling and recruitment;
- operationalization and measurement;
- sample size and statistical power;
- exclusion and missing-data rules; and
- the claims that the design can reasonably support.
A sophisticated analysis cannot repair a poorly defined construct, an inappropriate sample, or a design that does not match the research question.
3. Reasoning Under Uncertainty
Research data contain variation due to individual differences, measurement error, context, and sampling. Statistics helps us distinguish a stable pattern from noise, but it does not eliminate uncertainty.
Instead of asking only:
Is p < .05?
also ask:
- How large is the effect?
- What range of values is compatible with the data and model?
- Would the effect matter in an actual HCI setting?
- How sensitive is the conclusion to alternative specifications or assumptions?
4. Communicating Evidence
Strong reporting includes more than a binary significant/non-significant conclusion. Depending on the study, report:
- descriptive statistics and visualizations;
- effect sizes;
- confidence or uncertainty intervals;
- model assumptions and diagnostics;
- robustness or sensitivity checks;
- limitations and scope conditions; and
- enough information for another researcher to reproduce the analysis.
Statistics Across the Research Workflow
Statistics plays a role at every stage:
- Research question and estimand: What exactly do we want to learn or estimate?
- Theory and design: What comparison would provide relevant evidence?
- Measurement: How will an abstract construct become observable data?
- Sampling: From whom, when, and under what conditions will data be collected?
- Analysis: Which model represents the design, outcome, and assumptions?
- Interpretation: What do the estimates mean in the substantive HCI context?
- Communication: Can another person inspect, understand, and reproduce the analysis?
From a Vague Idea to a Testable HCI Hypothesis
Vague statement: “AI explanations affect user trust.”
This is difficult to evaluate because it does not specify:
- the type of AI system;
- the explanation format or comparison condition;
- the target users and task;
- how trust will be measured;
- the expected direction of the relationship; or
- the time point at which the outcome is observed.
Improved research question: “Among first-time users of an AI decision-support interface, how does an example-based explanation, compared with a feature-importance explanation, affect post-task trust measured on a validated 1–7 scale?”
Directional hypothesis: “Users who receive an example-based explanation will report higher mean post-task trust than users who receive a feature-importance explanation after completing the same decision task.”
A useful hypothesis is theoretically motivated, operationalized, linked to a feasible design, and directional when theory justifies a direction. Avoid writing “statistically significantly” into the substantive hypothesis; statistical significance is an analysis result, not the phenomenon being predicted.
Three Common Statistical Misunderstandings
- A p-value is not the probability that the null hypothesis is true.
- “Statistically significant” does not necessarily mean large, important, or practically useful.
- A large dataset does not compensate for poor measurement, biased sampling, confounding, or an unsuitable research design.
How to Learn Statistics as a Graduate Student
1. Learn the Question Before the Function
Before searching for an R command, state:
- what you want to know;
- what each variable represents;
- which observations are being compared; and
- what result would answer the question.
2. Apply Every Concept to Data
Statistics is learned by doing. Use your own research data, class datasets, or openly available data. Each concept should eventually become:
- a research question;
- a small piece of code;
- a table or figure; and
- a sentence that interprets the result.
응용 없는 배움은 고급 취미입니다. A statistical concept becomes useful when you can apply it to data and explain the result in ordinary language.
3. Work From Scripts and Quarto Documents
The Console is useful for quick experiments, but analyses should live in a script or .qmd document. This creates a record of what you did and makes it possible to rerun the work from the beginning.
4. Seek Help—but Diagnose First
Study groups, documentation, online communities, instructors, and AI tools can all help. Before asking for help, record:
- the code you ran;
- the complete error message;
- what you expected to happen; and
- a small reproducible example when possible.
5. Explain Every Result
Running a model is not the end. You should be able to explain:
- what was estimated;
- which group or unit is the reference;
- what the coefficient or comparison means;
- how uncertainty is represented; and
- what conclusion is and is not justified.
The Importance of “Daily Grinding”
Small, frequent practice is more effective than a single end-of-semester coding marathon. A sustainable routine might include 20–30 minutes of practice several times per week.
Regular practice improves:
- Retention: concepts and syntax become easier to retrieve;
- Pattern recognition: common data structures and error messages become familiar;
- Problem solving: you learn to break an analysis into manageable steps;
- Independence: you become less dependent on copied code; and
- Confidence: statistical and coding anxiety decreases as the workflow becomes familiar.
Useful habits include:
- typing and modifying examples instead of only copying them;
- predicting the output before running code;
- keeping one RStudio Project for each analysis;
- using clear object names and comments that explain why, not only what;
- restarting R and rendering the document from a clean session; and
- saving versions with Git/GitHub when appropriate.
Data Science & R
Data science is an iterative practice of asking questions, acquiring and structuring data, exploring patterns, building and evaluating models, and communicating results responsibly.
For HCI researchers, data science connects theory and design to increasingly diverse forms of evidence.
Common Data Sources in HCI
| Data Source | Example | Typical Question |
|---|---|---|
| Experiment | Alternative interface or explanation conditions | Does changing a design feature cause a difference in behavior or experience? |
| Survey | Trust, usability, presence, satisfaction, or privacy-concern scales | How are perceptions and attitudes related? |
| Behavioral log | Clicks, dwell time, errors, navigation paths | How do people actually use a system over time? |
| Text, image, audio, or video | Reviews, chat logs, interviews, screen recordings | What themes, meanings, or interaction patterns appear in unstructured data? |
| Sensor or contextual data | GPS, eye tracking, physiological signals | How does behavior change across contexts or states? |
Why Learn Data Science?
Data-Informed HCI Decisions
Data science helps researchers and designers move from intuition alone to evidence. It can reveal where users struggle, which design alternatives perform differently, and how effects vary across users and contexts.
Cross-Disciplinary Integration
HCI draws on psychology, communication, design, computer science, sociology, business, and engineering. Data science provides a shared workflow through which these disciplines can combine theories, measurements, and computational methods.
Reproducibility and Scale
Modern datasets can be large, messy, longitudinal, multimodal, or repeatedly updated. A coded workflow makes it easier to clean data consistently, document decisions, rerun analyses, and detect mistakes.
Transferable Problem-Solving
The ability to frame a question, inspect data quality, evaluate evidence, and communicate uncertainty is useful in academic research, product analytics, UX research, policy, and many other settings.
Responsible Innovation
Data science also creates responsibilities. Researchers must consider consent, privacy, fairness, representativeness, measurement validity, and the downstream consequences of models and visualizations.
So, What Does a Data Scientist Do?
A data scientist creates a defensible path from a question to evidence.
That path requires more than coding:
- Domain expertise: understanding the phenomenon, users, technology, and context;
- Research design: knowing what comparison or data would answer the question;
- Statistics: quantifying patterns, relationships, uncertainty, and model performance;
- Computation: managing data and automating a transparent workflow;
- Communication: translating technical output into a clear substantive argument; and
- Ethics: recognizing risks, limitations, and people affected by the analysis.
This course uses coding to support statistical and research reasoning. The code is not the final product; the final product is a credible interpretation supported by a reproducible analysis.
Why We Use R in This Course
R is not the only language for data science, but it is especially well matched to this course.
1. Designed for Statistical Analysis
R was developed for statistical computing and graphics. Its functions, modeling conventions, and package ecosystem support the kinds of estimation and inference commonly used in HCI and social-science research.
2. A Coherent Data Workflow
The tidyverse ecosystem provides a consistent grammar for importing, transforming, summarizing, and visualizing data. Packages such as dplyr, tidyr, readr, and ggplot2 allow us to focus on the logic of an analysis rather than low-level programming details.
3. Strong Visualization
ggplot2 supports layered, publication-ready graphics. Visualization is not merely decoration: it is an essential tool for checking data quality, understanding distributions, discovering patterns, evaluating models, and communicating uncertainty.
4. Reproducible Documents With Quarto
Quarto combines narrative text, citations, equations, code, figures, tables, and model output in a single .qmd file. The same source can be rendered to HTML, PDF, Word, slides, and other formats.
5. Open and Extensible
R is free and open source. Its packages support classical statistics, causal inference, psychometrics, network analysis, machine learning, Bayesian modeling, text analysis, spatial analysis, and many other methods relevant to HCI.
6. Strong Research Community
R is widely used in academia, public policy, health research, economics, psychology, communication, and data science. This creates extensive documentation, examples, books, and community support.
How About Python?
R and Python are complementary rather than mutually exclusive.
| Dimension | R | Python |
|---|---|---|
| Core strength | Statistical analysis, inference, visualization, and research reporting | General-purpose programming, machine learning, deployment, and system integration |
| Common workflow | tidyverse, ggplot2, tidymodels, Quarto |
pandas/polars, scikit-learn, PyTorch, Jupyter |
| Often preferred when | The main task is statistical modeling, exploratory analysis, or publication-ready reporting | The analysis is part of a larger application, production system, or deep-learning pipeline |
| Role in this course | Primary language | Complementary language and transferable reference point |
We use R because the course prioritizes statistical reasoning, visualization, and reproducible research. The deeper skills—defining variables, understanding assumptions, evaluating models, and interpreting evidence—transfer to Python and other analytical environments.
Setup: R, RStudio, and Quarto
1. Install R
Install the current release of R using the default installation options.
2. Install RStudio Desktop
Install the latest compatible open-source release of RStudio Desktop. R should be installed before opening RStudio for the first time.
3. Check Quarto
Recent RStudio releases provide integrated support for editing and previewing Quarto documents. After installing RStudio, open the Terminal pane and run:
quarto checkIf Quarto is unavailable or outdated, follow the official Quarto installation guide.
4. Rtools for Windows: Optional at First
Rtools is required only when Windows users need to build R packages from source that contain compiled C, C++, or Fortran code. Most students can begin the course without it because CRAN normally provides precompiled Windows binaries.
If R specifically reports that Rtools is required:
- choose the Rtools version that matches your installed version of R;
- use the default installation location; and
- do not manually edit environment variables unless the official instructions or a specific error requires it.
Recommended Project Folder
Create a short, local project path such as:
- Windows:
C:/r-projects/grad-stat/ - macOS/Linux:
~/r-projects/grad-stat/
Then create an RStudio Project in that folder.
Cloud-synced folders are not prohibited, but active synchronization can occasionally lock files, create conflicting copies, or produce long path names while R or Quarto is rendering. For class exercises, a short local project folder is the safest choice. Back up or synchronize the project after closing RStudio, or use Git/GitHub for version history if you are comfortable with it.
Additional recommendations:
- Prefer project-relative paths rather than absolute paths.
- Avoid repeatedly using
setwd()inside scripts. - Use
here::here()when building file paths. - If an installation or rendering error occurs, test the project in a short path without spaces or non-ASCII characters before changing your Windows account name or system configuration.
Install the Starter Packages
Run the following code once in the R Console:
starter_packages <- c(
"tidyverse",
"here",
"janitor",
"skimr",
"palmerpenguins",
"broom",
"knitr"
)
installed <- rownames(installed.packages())
new_packages <- setdiff(starter_packages, installed)
if (length(new_packages) > 0) {
install.packages(new_packages)
}You install a package once, but load it again in each new R session with library().
First R Practice
Create an RStudio Project, open a new Quarto document, and run the following code.
library(tidyverse)
library(palmerpenguins)
penguin_summary <- penguins |>
filter(!is.na(body_mass_g)) |>
group_by(species) |>
summarise(
n = n(),
mean_body_mass_g = mean(body_mass_g),
sd_body_mass_g = sd(body_mass_g),
.groups = "drop"
)
penguin_summaryThen answer:
- What is the unit of analysis in the original dataset?
- What does each row of
penguin_summaryrepresent? - Why are
n, the mean, and the standard deviation all useful? - Which species has the highest mean body mass in the observed sample?
- What additional information would you need before generalizing beyond this dataset?
Finally, render the .qmd file to HTML. The goal is not only to obtain output, but to confirm that the complete workflow—R, packages, code, and Quarto rendering—works on your computer.
Using Generative AI Responsibly
Generative AI may be used as a tutor, explainer, and debugging partner. It should not replace your responsibility for research design, statistical judgment, or interpretation.
Productive Uses
- asking for a plain-language explanation of an error message;
- requesting alternative ways to write the same R code;
- asking why a model or function behaves in a particular way;
- generating a small example to clarify a concept;
- checking whether your interpretation is logically consistent; and
- improving comments, labels, or the readability of code.
Your Responsibilities
- Run and verify all suggested code.
- Be able to explain every submitted line and analytical choice.
- Check package documentation and original sources when accuracy matters.
- Disclose substantial AI assistance when required by the assignment.
- Never upload identifiable participant data, confidential research files, unpublished proprietary data, or information restricted by IRB/consent conditions.
Unacceptable Uses
- submitting code or interpretations that you cannot explain;
- inventing references, data, results, or diagnostics;
- asking AI to select an analysis without checking the research design and assumptions; or
- treating fluent output as evidence that an answer is statistically correct.
A useful rule: AI can help you write and debug code, but you remain accountable for the question, data, assumptions, evidence, and conclusion.
Week 1 Completion Checklist
Before moving on, confirm that you can: