Treffer: Using Practical Programming Tasks to Enhance Combinatorial Understanding
Postsecondary Education
1467-9639
Weitere Informationen
Probability theory has extensive applications across various domains, such as statistics, computer science, and finance. In probability education, students are introduced to fundamental principles which may include mathematical topics such as combinatorics and symmetric sample spaces. Students pursuing degrees in computer science possess a robust foundation in programming, software engineering, and algorithmic thinking. Despite entering probability courses with a unique perspective and learning potential, these students encounter challenges in grasping combinatorial concepts. In this experiment, we challenged first-year postsecondary computer science students to program a simulation of a practical combinatorics problem. Students commented on whether and how this task helped them internalize the basic concepts of combinatorics. We aim to show how utilizing programming tasks may empower students with a deeper grasp of combinatorics.
As Provided
AN0176608809;d8y01apr.24;2024Apr17.05:33;v2.2.500
Using practical programming tasks to enhance combinatorial understanding
Probability theory has extensive applications across various domains, such as statistics, computer science, and finance. In probability education, students are introduced to fundamental principles which may include mathematical topics such as combinatorics and symmetric sample spaces. Students pursuing degrees in computer science possess a robust foundation in programming, software engineering, and algorithmic thinking. Despite entering probability courses with a unique perspective and learning potential, these students encounter challenges in grasping combinatorial concepts. In this experiment, we challenged first‐year postsecondary computer science students to program a simulation of a practical combinatorics problem. Students commented on whether and how this task helped them internalize the basic concepts of combinatorics. We aim to show how utilizing programming tasks may empower students with a deeper grasp of combinatorics.
Keywords: combinatorial understanding; programming tasks
INTRODUCTION AND BACKGROUND
Probability theory has extensive applications across various domains such as statistics, computer science, finance, and engineering. Biology students use the Poisson distribution to model cell behavior. Economics students relate to the expected value of an investment to assess its potential profit and to the variance to assess the risk it carries. Engineers often use the Normal distribution to model material strength variability, and medical professionals use probability and statistical models to predict the odds of an individual having a certain disease and to identify predictors for it. During the initial phases of probability education, students are introduced to essential principles that form the basis for addressing intricate probabilistic challenges [[3]]. Combinatorics and symmetric sample spaces often hold importance among these principles as they allow students to quantify and assess the probabilities of different outcomes in probabilistic situations.
As part of the common methods in teaching statistics, teachers often use visual tools to explain the course material. These methods enable students to understand the course material experientially and enable connection and understanding in a conceptual way. New tools that are evolving allow students to learn from simulations and examine how changes they make affect the data. To date, there is not enough evidence of the benefits of these methods, but various studies indicate that these simulations can assist in the learning process [[10]].
Recognizing the limitations of traditional methods, educators have increasingly turned to interactive and hands‐on learning experiences as effective tools for engaging students and fostering a deeper understanding of complex subjects. Probability theory, with its intricate concepts and multifaceted applications, stands to benefit significantly from an interactive approach that actively involves students in problem‐solving scenarios. Emerging educational technologies are reshaping the landscape of probability education. They necessitate the exploration of fundamental principles within probabilistic thinking and modeling, including approaches to problem‐solving, the modeling process, and the essential elements of probabilistic thinking and modeling [[8]].
Talsma et al. [[11]] examined the studies in the literature by the meta‐analysis method to determine the effect of using the simulation technique on academic achievement. The results of the meta‐analysis application revealed that using the simulation technique had a positive and strongly significant effect on the students' academic achievement. The study concluded that the simulation technique is an effective teaching method that can improve students' academic achievement. However, more research is needed to examine the effects of simulation techniques on other variables such as attitude, motivation, and permanence [[11]].
Simulations offer a promising avenue for enhancing the teaching of probability. Simulations enable students to tackle probability problems with minimal reliance on intricate mathematical skills. Borovcnik and Kapadia [[1]] emphasize the potency of integrating simulations with technology in probability education, reducing the necessity for intricate computations while strengthening the focus on grasping core concepts [[1]]. Dos Santos Ferreira et al. [[2]] delve into the enhancement of high school students' grasp of probability through the utilization of statistical software R. Their teaching experiment, grounded in probabilistic literacy and constructionism, results in an improved understanding of essential concepts such as random experiments, probability estimation, and calculations involving tree diagrams [[2]]. Kwon and Sahin [[5]] explore the classical probability dilemma known as the "broken stick problem". Their study encompasses multiple iterations of this problem, showcasing both the mathematical solution and an approach based on simulations [[5]].
Lyford and Czekanski and Lyford et al. [[7], [6]] introduce an innovative teaching tool that leverages a web app built with R Shiny and a corresponding CRAN package, inspired by the board game "Camel Up." This tool enhances students' understanding of probability calculations, offering a more engaging and practical learning experience. It allows students to explore complex probabilistic scenarios through simulation. The authors also provide sample activities demonstrating how students can use this tool in conjunction with the Camel Up game to improve their grasp of in‐game probabilistic decision‐making [[6]].
Combinatorics is a key tool in calculating probabilities in a symmetric sample space. A symmetric sample space is a sample space in which all outcomes have an equal probability of occurring, thus enabling the calculation of probabilities by counting outcomes. It is often perceived as abstract and challenging by students. Programming exercises provide a platform for translating combinatorial principles into concrete, tangible scenarios. By coding simulations of probability experiments, students can explore concepts like permutations, combinations, and conditional probabilities in a practical context, making these abstract notions more accessible.
In the context of probability education, it is not uncommon for students pursuing degrees in computer science to possess a robust foundation in high‐level programming, software engineering, and algorithmic thinking. Armed with these skills, they enter probability courses with a unique perspective and the potential for accelerated learning. However, despite their technical acumen, these students often encounter challenges grasping combinatorial concepts, which can be fundamental to the probabilistic reasoning they may encounter.
In the realm of probability education, conventional pedagogical methods often rely heavily on theoretical explanations and mathematical formalism. While these approaches provide a foundational understanding of probability theory, they may fall short of bridging the gap between abstract concepts and their practical, real‐world applications [[4]].
An important research effort introduced an innovative teaching approach designed for higher secondary school students in Italy. The phenomenon‐inductive approach is described and implemented by the following steps: starting from some real‐world probabilistic phenomena, proceed to using simulations to gather data and make conjectures. Following that, appropriate mathematical models and rules are developed inductively, and finally the models are applied back to the real‐world setting. The authors implemented this procedure on a real‐life problem, asking students to calculate probabilities of some seating pattern where seats on a plane are randomly allocated. This approach addresses the often‐overlooked topic of probability and advocates for a pedagogical shift away from traditional methods. It emphasizes problem‐solving through computer programming tools to foster a deeper understanding of uncertainty and nurture a probabilistic mindset among students. The approach primarily employs a phenomenon‐inductive approach with simulations to stimulate hypothesis formulation and speculative thinking in the context of random phenomena [[9]].
In summary, probability education is evolving, embracing interactive, technology‐driven, and hands‐on approaches to bridge the gap between theory and real‐world applications. These innovative methods empower students to actively engage with probability concepts and develop the practical skills needed to address complex challenges in various fields.
Our approach in this study enhances previous research by requiring students to actively implement these simulations themselves. This approach aimed to foster a deeper comprehension of probability concepts among students, while relating to their major field of study and using their previously acquired skills as software programmers. Probability education extends beyond theoretical comprehension and aims to equip students with the skills necessary to tackle real‐world problems. Integrating programming tasks into probability courses plays a pivotal role in this endeavor, as it facilitates the development of problem‐solving abilities. Through these tasks, students learn to design algorithms, analyze data, and draw meaningful conclusions—skills that are essential for future professionals across various fields. Due to the vast importance of understanding the theoretical concepts, we utilized the students' practical problem‐solving abilities to help them better understand the theory. By exploring the challenges faced by computer science students, reviewing existing research in probability education, and conducting quality evaluations of our programming tasks by students, we aim to shed light on how educators can leverage programming to empower students with a deeper and more intuitive grasp of combinatorics.
CHALLENGES IN UNDERSTANDING COMBINATORICS
This study took place in a college. The participants were 31 first‐year undergraduate computer science students in an introductory course in probability theory given in the second semester of their studies. In the first year of this program, the students gradually acquire both mathematical skills (e.g., linear algebra and calculus) and computer science‐oriented skills and knowledge (e.g., an introductory course in C programming). The first basic course in probability is a mandatory course, given in parallel groups to a total of about 200 students. The students who took part in this study belonged to a group instructed by one of the authors. This course introduces the fundamental principles of probability theory. The subjects covered in this course are probability spaces, computing probabilities using combinatorics, conditional probability, independence, Bayes law, discrete random variables of one and two dimensions, expectation and variance, coefficient of correlation, continuous random variables, and families of random variables.
Students in computer science school arrive at the probability course with some knowledge of high‐level programming, software engineering, and basic concepts of algorithms and efficiency calculations.
One of the main struggles of students in the probability course involves the combinatorics topic. We have discovered that there are two main problems which arise:
The problems mentioned above present challenges for the students. When considering distributing balls into cells, it is difficult to explain to students why when working with identical balls we might result in a nonsymmetric space. For example, when distributing six balls into three cells, why there is a different probability to the two events: "There are exactly two balls in each cell" and "All the balls are in cell 1". In the problem of choosing some elements from a given set, our students don't understand that a special element has an equal probability of being selected first, second, or last.
Aiming to handle these two difficulties and exploiting our students' programming knowledge, we have developed the following programming exercise which includes two experiments. Simulation code for both experiments is provided in the appendix.
PROGRAMMING EXERCISES IN PROBABILITY EDUCATION
Experiment A – Random distribution of six distinct balls into three cells
You are asked to draw six numbers with replacement from the numbers 1, 2, and 3. The number drawn in the i‐th draw, for
The probabilities of events A through D can be calculated as follows:
Figure 1 presents an example of the results that would have been obtained by 100 students performing this task. The simulations form an approximately Normal distribution with the mean being the true probability, as expected.
Experiment B – Random selection of 17 distinct cards from a standard 52‐card deck
Initialize an array of "cards to choose from" of size 52, and store in it 52 values representing the 52 different cards in a deck of cards. In addition, initialize an empty array, an array representing the "chosen cards."
Now draw 17 different cards. Each time:
Check which of the following events occurred:
By symmetry, all probabilities in experiment B equal 0.25. Figure 2 shows that repeating this simulation 100 times indeed results in an approximately normal distribution of the observed probabilities with a mean equal to 0.25.
hSTUDENTS' FEEDBACK AND ASSESSMENT
To gather valuable insights into the students' experiences with the programming exercises and their impact on combinatorial understanding, we conducted a short survey among 31 students.
We ask two key questions:
1 Question
On a scale from 1 to 5, with 1 indicating "Not helpful at all" and 5 indicating "Extremely helpful," please rate the overall helpfulness of the programming exercises in reinforcing your understanding of combinatorics.
2 Question
What did the programming exercise contribute? How can it be improved? Please answer briefly.
In response to question 1, the mean response was 2.4. Forty‐two percent of responders stated that the task had no benefit, while thirty‐two percent commented that the task was helpful or very helpful. Figure 3 shows the bimodal distribution of the responses to Question 1. It seems that students were split in their view of the benefit of the exercise. While many students did not perceive it as helpful, others did appreciate its contribution to their understanding of the combinatorial elements it introduced.
SELECTED STUDENT COMMENTS FROM THE SURVEY
We further analyzed the comments in Question 2 with respect to their evaluation of the exercise's contribution to their understanding. Following are some examples, where the respective responses to Question 1 are shown in brackets.
Comments made by students who gave high scores:
Comments made by students who gave low scores:
In summary, some students appreciated the opportunity to have some hands‐on experience with the seemingly theoretical course material, while others resented having to spend time on a task that was not directly related to actual exam‐like questions.
CONCLUSION
The programming exercises introduced in this study are designed to provide students with hands‐on experience in applying combinatorial principles to practical probability scenarios. In Experiment A, students are tasked with simulating the random distribution of distinct balls into cells using programming code. This exercise encourages students to write code that models probabilistic events, such as balls landing in different cells, and subsequently, to analyze the relative frequencies of specific outcomes. In Experiment B, students engage in drawing distinct cards from a standard deck, employing coding skills to simulate the random selection process.
There seems to be some discrepancy between the large number of positive comments we received from our students and the relatively low mean score of their assessment of the benefit of the programming tasks. We believe this may be attributed to a perception of the task's goals the students may have, that may differ from the teachers' aims. In these tasks, we sought to enhance the students understanding and internalization of basic concepts in elementary probability. They were not aimed to improve the students' practical problem‐solving skills. Indeed, the positive comments made by the students focused mostly on the task's contribution to the understanding of the theoretical course material and concepts. Students who stated the tasks were not beneficial may have done so because of the lack of benefit to the perceived practical solving of problems they may encounter at the course's final exam. This can be seen, for example, in the first negative comment that is quoted earlier. However, this is exactly the kind of deep understanding we believe is crucial to the statistical education process our students undergo. In this sense, we believe the tasks achieved their intended goal. Nonetheless, better clarification of the task's goals should be presented to the students, emphasizing the importance of understanding probability and encouraging students to engage in investigating these theoretical concepts.
While the positive feedback from the students strengthens our belief that utilizing the students' programming skills to simulate and analyze a random experiment contributes to their understanding of combinatorial ideas, other comments suggest improving the task given to the students. Firstly, we should clarify the purpose of the exercise better and provide more accurate guidelines. Secondly, we believe that a deeper post‐submission discussion may have resulted in the students' better appreciation of the exercise. In addition, the task could be extended to tackle more advanced topics. One direction would be to instruct the students to repeat the simulation many times, thus obtaining different estimates of the required probability that can be plotted as a histogram leading to the central limit theorem. Slightly modified, big classrooms could use the results of this task as a class activity in which each student obtains one estimate, and the entire class creates a sample of estimates, the mean of which should be closer to the true probability. Such refinements may help in explaining the concept of relative frequency stability. It may be interesting to follow up on the students in future courses that require a real understanding of probability and evaluate the contribution of such exercises. All of these could be tested in future research.
A APPENDIX SIMULATION
The simulation code for both experiments is provided below. We choose to develop the code in Python using the simple data structure of a list. This choice makes it easier to convert the program to different programming languages, such as C, if the need arises.
<bold>The simulation for Experiment A – Random distribution of six distinct balls into three cells:</bold> import random random.seed() nuOfTrys=10000 nuOfBalls=6 Acount=0 Bcount=0 Ccount=0 Dcount=0 for j in range(nuOfTrys): #Randomly distribute six distinct balls into three cells. cellCount=[0,0,0] for i in range(nuOfBalls): cellNu=random.randint(1,3) cellCount[cellNu ‐1]+=1 #Determine which of the events has taken place. cellCount.sort() if (cellCount[0]==2) and (cellCount[1]==2): Acount+=1 if (cellCount[0]==0) and (cellCount[1]>0): Bcount+=1 if (cellCount[0]==1) and (cellCount[1]==1): Ccount+=1 if (cellCount[0]==1) and (cellCount[1]==2): Dcount+=1 print("A relative frequency=",Acount/nuOfTrys) print("B relative frequency=",Bcount/nuOfTrys) print("C relative frequency=",Ccount/nuOfTrys) print("D relative frequency=",Dcount/nuOfTrys)
<bold>The simulation for Experiment B – Random selection of 17 distinct cards from a standard 52‐card deck.</bold> import random random.seed() #There are 52 cards; for simplicity, we assume that the heart cards are numbered 1‐13 nuOfTrys=10000 nuOfCards=17 firstCount=0 secondCount=0 fifteenCount=0 for j in range(nuOfTrys): cardsToChooseFrom=[*range(1, 53)] chosenCards=[] currentSize=52 for i in range(nuOfCards): place=random.randint(0,currentSize‐1) chosenCards.append(cardsToChooseFrom[place]) del cardsToChooseFrom[place] currentSize‐=1 #check for hearts #First card if (chosenCards[0]<=13): firstCount+=1 #Second card if (chosenCards[1]<=13): secondCount+=1 #FifteenCard if (chosenCards[14]<=13): fifteenCount+=1 print("First place:",firstCount) print("Second place:",secondCount) print("Fifteen place:",fifteenCount)
REFERENCES
1 Borovcnik M, Kapadia R. Research and developments in probability education. Int. Electron. J. Math. Educ. 2009 ; 4 (3): 111 ‐ 130.
2 Dos Santos Ferreira R, Kataoka Y VY, Karrer M. Teaching probability with the support of the R statistical software. Stat. Educ. Res. J. 2014 ; 13 (2): 132 ‐ 147. doi: 10.52041/serj.v13i2.286
3 Guidelines for Assessment and Instruction in Statistics Education (GAISE) Reports. 2016 https://www.amstat.org/education/guidelines‐for‐assessment‐and‐instruction‐in‐statistics‐education‐(gaise)‐reports
4 Kuiper S, Sturdivant RX. Using online game‐based simulations to strengthen Students' understanding of practical statistical issues in real‐world data analysis. Am. Stat. 2015 ; 69 (4): 354 ‐ 361. doi: 10.1080/00031305.2015.1075421
5 Kwon Y, Sahin N. Teaching complex probability problems using simple simulations with applications to the broken stick problem. In: Akerson V, Shelley M, eds. Proceedings of IConSES – international conference on social and education sciences, 199–211. ISTES Organization ; 2021.
6 Lyford A, Czekanski M. Teaching students to estimate complex probabilities of board game events through simulation. Teach. Stat. 2020 ; 42 (3): 117 ‐ 125. doi: 10.1111/test.12235
7 Lyford A, Rahr T, Chen T, Kovach B. Using camels to teach probability and expected value. Teach. Stat. 2019 ; 41 (1): 18 ‐ 24. doi: 10.1111/test.12167
8 Pfannkuch M, Budgett S, Fewster R, et al. Probability modeling and thinking: what can we learn from practice? Stat. Educ. Res. J. 2016 ; 15 (2): 11 ‐ 37.
9 Serpe A, Frassia MG. Technology will solve student's probability misconceptions: Integrating simulation, algorithms and programming. CERME ; 2017.
Talan T. The effect of simulation technique on academic achievement: a meta‐analysis study. Int. J. Sci. Technol. Educ. Res. 2020 ; 5 (1): 17 ‐ 36. doi: 10.46328/ijtes.141
Talsma K, Schüz B, Schwarzer R, Norris K. I believe, therefore I achieve (and vice versa): a meta‐analytic cross‐lagged panel analysis of self‐efficacy and academic performance. Learn. Individ. Differ. 2018 ; 61 : 136 ‐ 150. doi: 10.1016/j.lindif.2017.11.015
By Sigal Levy; Yelena Stukalin and Nili Guttmann‐Beck
Reported by Author; Author; Author