Content uploaded by Ji Y Son
Author content
All content in this area was uploaded by Ji Y Son on Jan 27, 2021
Content may be subject to copyright.
Integrating R in a College Statistics Course Improves Student Attitudes Toward Programming
Abstract
This study aims to characterize the experiences of non-computer science majors as they
learn to use R as part of an introductory course in statistics. Participants were 677 students at
two universities who used an interactive online textbook with embedded R programming
activities as part of an introductory course in statistics. Using quantitative and qualitative
methods, we explored students’ attitudes at the beginning and end of the course and examined
how those attitudes differed based on students’ prior programming experiences and demographic
characteristics. Though students entered the course with negative attitudes toward programming,
students, regardless of demographic characteristics or prior programming experiences, developed
more positive attitudes toward programming after engaging with our course materials.
Tucker, M., Shaw, S.T., Son, J.Y., & Stigler, J.W. (Accepted). Integrating R in a college
statistics course improves student attitudes toward programming. Submitted to the Annual
Meeting of the American Educational Research Association (Orlando, Florida, April 9-12,
2021).
Integrating R in a College Statistics Course
Improves Student Attitudes Toward Programming
As STEM fields become increasingly computational in nature, more and more
instructors are integrating programming into their courses. Computational tools have been found
to support learning of domain-specific concepts in fields like biology, engineering, and statistics
(Reddy et al., 2017; Biehler et al., 2013; Son, Blake, Fries, & Stigler, under review). Aside from
supporting students’ learning STEM concepts, introducing programming in the context of
disciplinary activities has the potential to improve students’ attitudes and engender more
positive perceptions of computer programming (e.g. Bicer et al., 2018; Chilana et al., 2015,
Quin, 2009).
Recently, interest in teaching computing in the introductory statistics course has been
gathering momentum (e.g. Nolan, under review; Son, Blake, Fries, & Stigler, under review). For
example, more and more instructors are using R—an open-source programming language used
by researchers to manipulate, visualize, and analyze data—to teach basic concepts and data
analysis.
Still many instructors who teach introductory statistics worry R (and programming in
general) may be too difficult for students to learn in addition
to statistical concepts—particularly
for students who have no prior programming experience—and that requiring students to learn R
might unintentionally leave them with negative feelings about programming. In addition, there
are persistent concerns that introducing programming in non-computer science courses will
benefit some students more than others, thus potentially increasing pre-existing inequalities
across groups in math and programming experience (Chambers & Clarke, 1987).
1
Like many things in education, we believe the effects of integrating programming into the
introductory statistics course will depend on how the integration is carried out. If students
perceive R as something extra
that must be learned, over and above the already challenging
subject matter of statistics, they may feel negatively about learning R. But if students see R as a
tool for understanding
and doing
statistics, they may develop more positive attitudes toward
programming.
Here we report on our attempt to design an introductory statistics course—implemented
as an interactive online textbook—in which R is integrated in a constant and meaningful way.
We set about to determine if all students, regardless of background and programming experience,
could successfully learn R; how their attitudes towards programming changed over a quarter or
semester course; and whether the effects of learning R on attitudes differed according to
demographic characteristics.
Objectives
This work is part of a project in which we are working to develop, implement, and
improve an interactive textbook for introductory statistics. The textbook embeds R programming
activities as a tool to support student understanding, and is designed to facilitate deep
engagement with statistical concepts and to make script-based programming accessible to all
learners, regardless of background or prior programming experience. It also includes the
infrastructure to collect detailed data on students’ experiences and interactions as they learn.
We report here a study designed to answer three questions: How do students initially feel
about being required to learn R programming in an introductory statistics class? How do those
attitudes change as students progress through the course? And do these attitudes and any changes
2
in attitudes vary by student subgroups (e.g., programming experience, gender, race/ethnicity)? If
learning R feels like a burdensome addition to an already rigorous course, we might see
decreases in these attitudes. But a carefully designed integration of R might improve attitudes
toward programming. To address these questions, we examined college students’ attitudes and
experiences as they used our interactive textbook as part of an introductory course in statistics
during the 2019-2020 academic year.
Theoretical Perspectives
Experience with computational tools can change students’ beliefs about computing
(Charters et. al, 2014; Lee, 2019). Critically, the nature of the computational activities and what
the experience is like for students matters (Hasan, 2003; Moos & Azevedo, 2009; Lee & Ko,
2011). Drawing on research from psychology and the learning sciences, we integrated R into the
curriculum according to the Practicing Connections instructional design framework (Fries et al.,
in press). Our approach is grounded in the following core principles: 1) R exercises should help
students to represent ideas and make connections between concepts, rather than to simply
compute answers, 2) R exercises should be interleaved throughout the text rather than introduced
separately to provide opportunities for deliberate practice, feedback, and productive struggle
using R to connect concepts, and 3) students’ practice with R should become increasingly
sophisticated and complex, allowing students to master more advanced programming skills and
to use those skills to understand more complex concepts.
Method and Data Sources
Data were collected from two higher education institutions in the greater Los Angeles,
California area, where 766 students used our interactive online textbook as part of an
3
introductory course in statistics (see Table 1 for demographic information). A total of 680
students came from UCLA (a large competitive public university) and 86 from California State
University, Los Angeles (also called Cal State LA, a four-year regional university). As the ICCs
for all variables were less than .02 (below general convention for mutli-level modeling), we
aggregated data across institutions for analyses.
Data were collected from September 2019 to June 2020. Students completed a survey at
the beginning and at the end of each course. The pre-survey asked students about their prior
programming experience, their sentiment about learning R (rated on a five-point scale), and, in
an open response question, to describe concerns they have about the course (“When I think about
4
this course I’m concerned that...”). The post-survey asked students to again rate their sentiment
about R and to rate how confident they felt using R to analyze data and how important they felt
R was for their learning (all rated on a five-point scale).
Results
Programming Background
About half of the students (54%) reported no exposure to programming before taking the
course. Of those students, 60% had taken a programming class, 32% had been exposed to
programming in a non-programming class, and nearly 9% had tried programming on their own.
As Table 2 shows, exposure to programming varied by institution: at UCLA, 49% of students
had some form of programming experience compared to 19% of students at Cal State LA.
Among all students, programming experience was significantly associated with
race/ethnicity, X
2(2) = 40.67, p
< .001, but not gender. Asian students (59%) were more likely
than Latino/Hispanic students (29%) and White students (45%) to have previous programming
experience. Programming experience was not significantly associated with gender.
Initial R Sentiment and Concerns About Programming
5
Pre-survey data indicate students felt neutral to somewhat negative about learning R at
the beginning of the course (M
= 2.88, SD =
1.01; see Figure 1). Students without programming
experience expressed more negative sentiment toward learning R (M
= 2.71, SD
= 0.97) than
students with programming experience (M
= 3.07, SD
= 1.02), F
(1, 763) = 25.43, PRE
= 0.03, p
< .001. Females expressed more negative sentiment (M
= 2.80, SD
= 0.98) than males (M
= 3.14,
SD
= 1.09), F
(1, 747) = 15.34, PRE
= 0.02, p
< .001. Asian (M
= 2.82, SD =
1.01)
and
Latino/Hispanic students (M
= 2.78, SD
= 1.01) expressed more negative sentiment toward
learning R than White students (M
= 3.03, SD
= 1.03), F
(2, 671) = 3.75, PRE
= 0.01, p
= .024.
We also examined students’ self-reported concerns at the beginning of the course. About
one-third (32%) of students expressed concern about having to learn programming. Those
students who mentioned programming as a concern expressed more negative sentiment toward
learning R (M
= 2.58, SD
= 0.91) than students who did not mention programming as a concern
(M
= 3.02, SD
= 1.04), F
(1, 653) = 27.51, PRE =
0.04, p
< .001.
Interestingly, mentioning programming as a concern was not significantly associated with
prior programming experience, X
2(2) = 0.71, p
= 0.40. That is, students with prior programming
experience were as likely to mention programming as a concern as students without prior
programming experience. We did, however, notice different themes in the responses of students
with and without prior programming experience. Students with prior programming experience
mentioned 1) struggles learning programming in the past and 2) negative perceptions of past
programming courses. Students without prior programming experience mentioned 1) concerns
about their lack of prior programming experience, 2) assumptions about programming, 3) beliefs
6
about their ability to learn programming. Examples of student’s concerns about R programming
are provided in Table 3.
Change in R Sentiment
As hypothesized, engaging students in R programming throughout the course
significantly improved their sentiment toward R from the beginning of the course (M
= 2.87, SD
= 1.01), to the end (M
= 3.63, SD
= 1.06), t
(765) = 16.21, p
< .001 (see Figure 1). In addition, at
the end of the course, students felt somewhat confident that they could use R to analyze a new
dataset (M
= 3.38, SD
= 0.96) and felt R was important to their learning (M
= 3.97, SD
= 1.00).
7
Table 4 shows the breakdown of students’ R sentiment ratings on the post-survey by their
R sentiment ratings on the pre-survey. Most (N
= 223; 80%) of the 278 students who felt
“negative” or “extremely negative” about learning R at the beginning of the course improved
their sentiment by at least one rating point by the end of the course. The average change in
sentiment for students who initially felt negative toward R was 1.60 (SD
= 1.16). In addition,
more than half (N
= 160; 58%) of students who felt “negative” or “extremely negative” toward R
on the pre-survey, felt “positive” or “extremely positive” toward R at the end of the course.
8
Group Differences in R Sentiment Change
Table 5 shows descriptive statistics for R sentiment ratings broken down by gender,
race/ethnicity, prior programming experience, and initial course concerns. Though all
demographic groups increased R sentiment from beginning to end of the course, some groups
increased more than others. Two-way repeated measures ANOVAs revealed significant
interactions of group by pre- / post- survey R sentiment for gender, F
(1, 736) = 5.45, p
= .02,
race/ethnicity, F
(2, 671) = 4.19, p
= .016, and concern about programming, F
(1, 752) = 16.64, p
< .001(see Figure 2). Female sentiment increased more than male sentiment between pre- and
post-ratings; Asian students’ sentiment increased more than that of White or or Latino students;
and students who started out expressing concern about programming ended up with a greater
9
increase in sentiment than did students who did not mention R as a concern. There was no
significant interaction between programming experience and pre- /post- survey R sentiment.
10
Discussion
We investigated changes in students’ attitudes toward programming after using R in an
introductory statistics course. In line with research on students’ perceptions of computer
programming, students entered our course with somewhat negative attitudes toward learning R.
However, in contrast to research highlighting students’ negative experiences in traditional
introductory programming courses, we found that most students developed more positive
perceptions of R after engaging with programming in an introductory statistics course.
Importantly, subgroups of students who initially felt the most negative about learning R (e.g.
students who listed R as a concern, students without prior experience) and students traditionally
underrepresented in computational fields (e.g. females) demonstrated the most positive change in
their attitudes toward programming.
11
These findings contribute to the growing body of knowledge suggesting that students,
including those without programming experience, can develop positive attitudes toward
computing after exposure to computer programming in non-traditional contexts (e.g. Charters, et
al., 2014). Our research also has important implications for statistics teaching and learning.
Despite calls to introduce computing in the undergraduate statistics curriculum (Nolan & Lang,
2009), few studies have investigated different models for introducing computing in introductory
statistics courses. Our findings, and our online textbook, offer much-needed tools and guidance
for teachers who want to integrate computing into their courses.
12
References
Bicer, A., Lee, Y., & Capraro, R.M. (2018). Cracking the code: The effects of using
microcontrollers to code on students’ interest in computer and electrical engineering. In IEEE
Frontiers in Education Conference (FIE)
, 1-7.
Biehler, R., Ben-Zvi, D., Bakker, A., & Makar, K. (2013). Technology for enhancing statistical
reasoning at the school level. Third International Handbook of Mathematics Education
(Clements et al., Eds.). Springer International Handbooks of Education.
Chambers, S.M. & Clarke, V.A. (1987). Is inequity cumulative? The relationship between
disadvantaged group membership and students' computing experience, knowledge, attitudes,
and intentions. Journal of Educational Computing Research, 3
(4)
Charters, p., Lee, M.J., Ko, A.J., Loksa, D. (2014). Challenging stereotypes and changing
attitudes: The effect of a brief programming encounter on adults' attitudes toward
programming. In SIGCSE '14: Proceedings of the 45th ACM technical symposium on
Computer science education.
Chilana, P.K., Alcock, C., Dembla, S., Ho, A., Hurst, A., Armstrong, B., & Guo, P.J. (2015).
Perceptions of non-CS majors in intro programming: The rise of the conversational
programmer. In Proceedings of the IEEE Symposium on Visual Languages and
Human-Centric Computing
.
Fries, L., Son, J.Y., Givvin, K., Stigler, J.W. (in press). Practicing connections: A framework to
guide instructional design for developing understanding in complex domains.
13
Gambari, I.A., Gbodi, B.E., Olakanmi, E.U., Abalaka, E.N. (2016). Promoting intrinsic and
extrinsic motivation among chemistry students using computer-assisted instruction.
Contemporary Educational Technology, 7
(1), 25-46.
Givvin, K. B., Stigler, J. W., & Thompson, B. J. (2011). What community college developmental
mathematics students understand about mathematics, Part II: The interviews. The
MathAMATYC Educator
, 2
(3), 4-18.
Hasan, B. (2003). The influence of specific computer experiences on computer self-efficacy
beliefs. Computers in Human Behavior, 19
(4), 443-450.
Hansen, A.K., Dwyer, H.A., Iveland, A., Talesfore, M., Wright, L., Harlow, D.B., Franklin, D.
(2017). Assessing children’s understanding of the work of computer scientists: The
Draw-a-Computer-Scientist Test. In Proceedings of the 2017 ACM SIGCSE Technical
Symposium on Computer Science Education (SIGCSE 2017)
, 279-284.
Lahtinen, E., Mutka, K. A. & Jarvinen, H. M. (2005). A study of the difficulties of novice
programmers. In Proceedings of the 10th Annual SIGSCE Conference on Innovation and
Technology in Computer Science Education (ITICSE 2005)
, 14 18.
Lee, M.J. (2019). Exploring differences in minority students' attitudes toward computing after a
one-day coding workshop. In ITiCSE '19: Proceedings of the 2019 ACM Conference on
Innovation and Technology in Computer Science Education.
Lee, M.L. & Ko, A.J. (2011). Personifying programming tool feedback improves novice
programmers' learning. In ICER '11: Proceedings of the seventh international workshop on
Computing Education Research.
14
Mercier, E. M., Barron, B., & O’Connor, K. M. (2006). Images of self and others as computer
users: The role of gender and experience. Journal of Computer Assisted Learning, 22
(5),
335-348.
Moos, D.C. & Azevedo, R. (2009). Learning with computer-based learning environments: A
literature review of computer self-efficacy. Review of Educational Research
, 79
(2), 576-600.
Nolan, D. (under review). Computing in the Statistics Curricula.
Nolan, D. & Lang, T. D. (2009). Approaches to Broadening the Statistics Curricula. In Quality
Research in Literacy and Science Education
, eds. M. C. Shelley, L. D. Yore, and B. B. Hand,
New York: Springer, pp. 357–381.
Qin, H. (2009). Teaching computational thinking through bioinformatics to biology students.
SIGCSE '09
.
Reddy, M.V.B. & Mint, P.P. (2017). Impact of a simulation based education on biology students’
academic achievement in DNA replication. Journal of Education and Practice, 8
(15).
Son, J.Y., Blake, A.B., Fries, L., & Stigler, J.W. (Under review). Modeling first: Applying
learning science to the teaching of introductory statistics. Journal of Statistics Education.
Urban-Lurain, M. & Weinshank, D.J.(2000). Is there a role for programming in non-major
computer science courses? In Proceedings of the 30th Annual Frontiers in Education
Conference. Building on A Century of Progress in EngineeringEducation. Conference
Proceedings.
Yildirim, S. (2000). Effects of an educational computing course on preservice and inservice
teachers. Journal of Research on Computing in Education, 32
(4), 479-495.
15