The impact of AI-assisted pair programming on student motivation, programming anxiety, collaborative learning, and programming performance: a comparative study with traditional pair programming and individual approaches
A study of 234 undergraduates in one Chinese university's Java course, with whole classes assigned at random, suggests that students who paired with an AI assistant reported higher intrinsic motivation than students who worked alone (d = 0.35) and a mean anxiety rating of 2.355 on a 1 to 7 scale at the end of the course. Students in human pairs rated collaboration and social presence slightly higher than students paired with an AI (d = 0.298 and d = 0.425).
Fan et al., International Journal of STEM Education (2025) 12:16, 2025. AI used: GPT-3.5 Turbo and Claude 3 Opus
Verdict
Verdict: Medium
Model vintage
GPT-3.5 Turbo and Claude 3 Opus
Model: GPT-3.5 Turbo (2022) in the 2023 class and Claude 3 Opus (2024) in the 2024 class, named in the study
Undergraduates new to Java, in one web development course at one university in China.
So what for leaders
- If you pair new hires or juniors with an AI assistant, test it against human pairing on your own team, and measure what they ship as well as how they feel about the work.
- Keep human pairing in place while you test: students here rated collaboration and social presence higher with a person, but those are self-ratings from one course, so check them against your own team's output.
Keep track of this study
Watch it and I'll email you if it's corrected, re-run or retracted, or a new study on the same kind of work is published. Nothing else. Save it to a pack for your next deck. Alerts aren't switched on yet. Your watches are kept, and the first email goes out when they are.
Just want the newsletter? Subscribe on Substack
The receipts
- Setting
- Real work
- Number studied (sample size)
- 234
- Design
- Non-random comparison (quasi-experiment)
- Publication
- Journal article
- Model vintage
- GPT-3.5 Turbo and Claude 3 Opus
How far it generalizes
Undergraduates new to Java, in one web development course at one university in China. It travels weakly to professional developers, to onboarding programs at work and to teams with review and deadlines.
- AI-assisted pair programmingCLS, with human-human pairing slightly higher, lower is better
- AI-assisted pair programmingIntrinsic motivation
- AI-assisted programmingProgramming performance
- AI-assisted pair programmingSPQ scores, with human-human pairing slightly higher, lower is better
Standard deviations (SD)
Show as table
| Arm | Outcome | Estimate | Interval | Unit | Better when | Source |
|---|---|---|---|---|---|---|
| AI-assisted pair programming | CLS, with human-human pairing slightly higher | +0.298 | No interval reported | Standard deviations (SD) | Lower | p. 11, Results, RQ3 |
| AI-assisted pair programming | Intrinsic motivation | +0.35 | No interval reported | Standard deviations (SD) | Higher | p. 1, Abstract, Results |
| AI-assisted programming | Programming performance | +0.355 | No interval reported | Standard deviations (SD) | Higher | p. 11, Results, RQ3 |
| AI-assisted pair programming | SPQ scores, with human-human pairing slightly higher | +0.425 | No interval reported | Standard deviations (SD) | Lower | p. 11, Results, RQ3 |
Levels as reported, not effects of AI
- The average AI-assisted group (combining GPT-3.5 and Claude 3)Lower is better2.355 PAS scores range from 1 to 7
Show as table
| Arm | Outcome | Estimate | Interval | Unit | Better when | Source |
|---|---|---|---|---|---|---|
| The average AI-assisted group (combining GPT-3.5 and Claude 3) | Anxiety levels at T3 | 2.355 | No interval reported | PAS scores range from 1 to 7 | Lower | p. 8, Results, RQ1; p. 9, Table 4 note |
Design
- Design
- Non-random comparison (quasi-experiment)
- Number studied (sample size)
- 234
- Setting
- Real work
- How I found it
- Mined from Maier et al. 2026 (scout batch 6, round 2), 2026-11-15
Who it applies to
- Functions
- Education and training
- Roles
- Students
Critique
What the study did well. Classes were assigned by a random number generator, supervised by a researcher not involved in data collection, and each year ran an AI pair class, a human pair class and a solo class side by side. The authors checked that the groups started level on grade point average, and they repeated the design with a second cohort on a different model. The study ran at the authors' own university, with the course instructors.
Hole 1: assigned by class, analysed as 234 students. Assignment was by whole class, so the randomized units are classes, not students. The analysis treats every student as independent, which makes the results look more precise than a class-level design can support.
Hole 2: self-ratings from students who knew their group. Motivation, anxiety, collaboration and social presence are all questionnaires, and no student was blind to condition. The AI classes also got extra training on using the assistant, so part of any gain may come from that attention, not from the AI.
Hole 3: the performance result reads two ways. The abstract says the AI groups outperformed human pairs. The results text says that gap was not statistically significant, while a separate comparison in Table 9 puts it at p = 0.015 (d = 0.355), which the authors call marginally better (p. 11). I do not treat the edge over human pairs as settled.
Hole 4: no registration mentioned and no open data. The paper mentions no registered plan, and its data are available only on request. The authors call the design quasi-experimental themselves.
Business significance
Against students working alone, the AI pair classes reported higher intrinsic motivation, a small-to-moderate effect by the usual yardstick (d = 0.35, p < .001; p. 1, Abstract). Their mean anxiety score at the end of the course was 2.355 on a 1 to 7 scale (p. 8, Results). Against human pairs, they rated collaboration (d = 0.298, p = 0.034) and social presence (d = 0.425, p = 0.005) lower (p. 11, Table 9).
For a team lead, the useful point is the trade: an AI partner may lift how a learner feels about the work, but in this study it did not replace the sense of working with a person. These are students in one course, rating themselves, so it is not a productivity or staffing number, and the paper measures no cost.
Does it still hold?
I have not re-run it. The AI classes used GPT-3.5 Turbo (2023) and Claude 3 Opus (2024), and the paper reports no significant difference between them, a comparison of one class per model. Both are older than today's coding assistants and agents, so whether the motivation difference or the collaboration gap holds now is untested.
Cite this
The paper
Plain
Fan, Guangrui, Liu, Dandan, Zhang, Rui, and Pan, Lihu (2025). The impact of AI-assisted pair programming on student motivation, programming anxiety, collaborative learning, and programming performance: a comparative study with traditional pair programming and individual approaches. International Journal of STEM Education (2025) 12:16. https://doi.org/10.1186/s40594-025-00537-3
APA
Fan, Guangrui, Liu, Dandan, Zhang, Rui, & Pan, Lihu. (2025). The impact of AI-assisted pair programming on student motivation, programming anxiety, collaborative learning, and programming performance: a comparative study with traditional pair programming and individual approaches. International Journal of STEM Education (2025) 12:16. https://doi.org/10.1186/s40594-025-00537-3
BibTeX
@article{fan-ai-pair-programming-2025,
author = {Fan, Guangrui and Liu, Dandan and Zhang, Rui and Pan, Lihu},
title = {The impact of AI-assisted pair programming on student motivation, programming anxiety, collaborative learning, and programming performance: a comparative study with traditional pair programming and individual approaches},
journal = {International Journal of STEM Education (2025) 12:16},
year = {2025},
doi = {10.1186/s40594-025-00537-3},
}My scorecard
Plain
New Baseline (2026). A study of 234 undergraduates in one Chinese university's Java course, with whole classes assigned at random, suggests that students who paired with an AI assistant reported higher intrinsic motivation than students who worked alone (d = 0.35) and a mean anxiety rating of 2.355 on a 1 to 7 scale at the end of the course. Students in human pairs rated collaboration and social presence slightly higher than students paired with an AI (d = 0.298 and d = 0.425). Verdict: Medium; Undergraduates new to Java, in one web development course at one university in China. It travels weakly to professional developers, to onboarding programs at work and to teams with review and deadlines. https://www.newbaseline.ai/studies/fan-ai-pair-programming-2025 Accessed December 5, 2026.
APA
New Baseline. (2026). A study of 234 undergraduates in one Chinese university's Java course, with whole classes assigned at random, suggests that students who paired with an AI assistant reported higher intrinsic motivation than students who worked alone (d = 0.35) and a mean anxiety rating of 2.355 on a 1 to 7 scale at the end of the course. Students in human pairs rated collaboration and social presence slightly higher than students paired with an AI (d = 0.298 and d = 0.425). Retrieved December 5, 2026, from https://www.newbaseline.ai/studies/fan-ai-pair-programming-2025
BibTeX
@misc{fan-ai-pair-programming-2025-newbaseline,
author = {{New Baseline}},
title = {A study of 234 undergraduates in one Chinese university's Java course, with whole classes assigned at random, suggests that students who paired with an AI assistant reported higher intrinsic motivation than students who worked alone (d = 0.35) and a mean anxiety rating of 2.355 on a 1 to 7 scale at the end of the course. Students in human pairs rated collaboration and social presence slightly higher than students paired with an AI (d = 0.298 and d = 0.425).},
year = {2026},
howpublished = {\url{https://www.newbaseline.ai/studies/fan-ai-pair-programming-2025}},
note = {Verdict: Medium; Undergraduates new to Java, in one web development course at one university in China. It travels weakly to professional developers, to onboarding programs at work and to teams with review and deadlines. Accessed December 5, 2026.},
}A result
Cite a result
AI-assisted pair programming (CLS, with human-human pairing slightly higher): +0.298 SD, no interval reported, p. 11, Results, RQ3. In Fan et al. 2025.
The average AI-assisted group (combining GPT-3.5 and Claude 3) (Anxiety levels at T3): 2.355 PAS scores range from 1 to 7, no interval reported, p. 8, Results, RQ1; p. 9, Table 4 note. In Fan et al. 2025.
AI-assisted pair programming (Intrinsic motivation): +0.35 SD, no interval reported, p. 1, Abstract, Results. In Fan et al. 2025.
AI-assisted programming (Programming performance): +0.355 SD, no interval reported, p. 11, Results, RQ3. In Fan et al. 2025.
AI-assisted pair programming (SPQ scores, with human-human pairing slightly higher): +0.425 SD, no interval reported, p. 11, Results, RQ3. In Fan et al. 2025.