EURASIA Journal of Mathematics, Science and Technology Education, 2022, 18(9), em2149
ISSN:1305-8223 (online)
OPEN ACCESS Research Paper https://doi.org/10.29333/ejmste/12309
© 2022 by the authors; licensee Modestum. This article is an open access article distributed under the terms and conditions of
the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0/).
Python-based simulations of the probabilistic behavior of random events for
secondary school students
Supot Seebut
1*
, Patcharee Wongsason
1
, Dojin Kim
2
, Thanin Putjuso
3
, Chawalit Boonpok
4
1
Department of Mathematics Statistics and Computers, Ubon Ratchathani University, Ubon Ratchathani, THAILAND
2
Department of Mathematics, Dongguk University, Seoul, SOUTH KOREA
3
School of General Science, Rajamangala University of Technology Rattanakosin, Prachaub Khiri Khan, THAILAND
4
Department of Mathematics, Mahasarakham University, Mahasarakham, THAILAND
Received 22 June 2022 Accepted 1 August 2022
Abstract
Simulation modeling is an effective tool for solving problems that cannot be explained analytically
or when data cannot be collected. This is done by simulating the observed behavior of a problem
under study using a computer program. In math education, this can develop knowledge and
fundamental competencies of simulation modeling at a higher level and foster its applications in
everyday life. This study created learning activities for secondary school students to simulate the
probabilistic behavior of random events using Python. 28 grade 12 students took part in these
activities using appropriate scaffolding strategies and a powerful mathematical tool, Python. After
completing the activities, student competency in simulating the probabilistic behavior of random
events with Python was evaluated using rubrics and the factors of student enjoyment, perceived
value, interest, and self-efficacy were determined through a Likert-scale questionnaire. The
assessment results showed that the activities had a positive effect on student competencies and
emotions. The outcomes of the study can serve guidelines for teachers who are interested in
expanding the results for further student development.
Keywords: mathematical modeling, simulating probabilistic behavior, simulation, simulation
modeling
INTRODUCTION
Mathematical model is the application of
mathematics to explain observable phenomena. If a
mathematical model accurately describes or represents
the phenomenon, it can be extraordinarily useful in any
field. Consequently, research is being conducted to
investigate the learning management process in
mathematical modeling. This endeavor began with
research on mathematical modeling in elementary
(English, 2012; Kazak et al., 2018; Patel & Pfannkuch,
2018; Shahbari & Peled, 2017) and secondary schools
(Balakrishnan et al., 2010; Krutikhina et al., 2018;
Stillman, 2010). The objective is to develop the learners
ability to create mathematical models that solve
everyday problems (Blum & Leiß, 2006; Galbraith et al.,
2020; Hartmann et al., 2021; Schukajlow et al., 2015b;
Wake, 2015), as well as developing student competency
in creating mathematical models of various types. Such
models could be deterministic (Farihah, 2019; Ortega &
Puig, 2017; Yanagimoto & Yoshimura, 2013),
probabilistic (Frejd & Ärlebäck, 2017; Greefrath & Siller,
2017; Kazak, 2010; Kotelawala, 2011), or dynamic
(Blomhøj, 2020; Kaiser et al., 2011; Leung, 2013;
Rodríguez, 2015). This leads to proficiency in applying
specific solutions that correspond to the type of model in
question and provide a foundation for studying
mathematical models at a higher level.
Simulation modeling is another fascinating modeling
technique. It is crucial in real-world situations where the
behavior of the problem cannot be explained analytically
or where data cannot be collected directly. This is
because analyzing such real-world scenarios is difficult,
expensive, and time-consuming. Using the appropriate
computer technique, modelers create simulations that
Seebut et al. / Python-based simulations of the probabilistic behavior of random events
2 / 12
mimic the behavior observed in actual problems. The
outcomes of the simulation study should then be used to
address the appropriate issues (Kin & Chan, 2011; Maria,
1997; Tobrawa et al., 2022; Volosencu & Ryoo, 2022;
Zárate Ceballos et al., 2021). Previously, simulations had
to be done manually, which was inefficient. However,
currently here are a variety of computer programs
available for simulation. This simplifies model
development. Therefore, computer simulation for
behavioral modeling is widely used (Albright & Fox,
2019; Fox, 2013; Gordon & Guilfoos, 2017).
It was discovered, however, that there were not many
school-level learning management systems that
prepared students with a foundational competency in
simulation modeling. Students may participate in
simulations of the probabilistic behavior of random
events, if deemed appropriate. It is highly likely that
such simulations will serve as a starting point for
developing fundamental competency in simulation
modeling (Giordano et al., 2013). This is because
simulating the probabilistic behavior of random events
is an important foundation for simulation modeling. It is
linked to the probability content that students have
already studied (Giordano et al., 2013).
Another factor to consider when deciding to simulate
the probability behavior of random events is the
computer program that will be used as a simulation tool.
Learning management research seeks to use a free
program to make it easier for those interested in research
findings to apply them in the classroom. Python is a
powerful mathematical tool that can be used in
simulations (Gordon & Guilfoos, 2017; Liu, 2020;
Tendeloo et al., 2019). This program is unique in that it is
free and has many useful features. It is convenient to use
without the need to install programs on the computer,
while the code and results are automatically saved in
cloud storage. Since Python can run online programs on
a variety of devices, including smartphones, tablets,
portable computers, and personal computers, its use in
learning activities based on simulating the probability
behavior of random events improves learning
management.
Moreover, the inclusion of Python in this learning
environment has alleviated some of the common
criticisms of using the program, which is that lesson
designers often create automated instructions for
learners to follow to get results, which affect the learning
efficacy of the learners relatively little. Although it is
convenient to use and has many functions to choose
from, the process of using it is not an automatic button
press, but users will have to start by analyzing problems
that require the use of Python in ways that help find
answers. It converts problems into mathematical and
logical forms. Use the mathematical and logical models
created to write an algorithm, such as pseudo-code, are
necessary before implementing the actual program code.
Running the output that will bring back the original
problem description. This, in addition to promoting on-
demand competence, is also an important motivation for
developing the initiative to adopt mathematics in a
STEM-oriented manner, enhancing mathematical and
digital literacy and fostering computational competence.
This study developed learning activities for
secondary school students that simulate the probabilistic
behavior of random events to provide them with the
knowledge and basic competency required for more
advanced studies in simulation modeling and
applications to real-world problems. Following
completion of an activity, student competency in
simulating the probabilistic behavior of random events
was evaluated using a rubric whose scores could be
analyzed and interpreted both quantitatively and
qualitatively. Furthermore, a Likert-scale questionnaire
was used to evaluate student enjoyment, values,
interests, and self-efficacy. The evaluation results will be
used to improve the activities, making them more
beneficial and applicable to those who want to apply
learner development in other contexts.
SIMULATING THE PROBABILISTIC
BEHAVIOR OF RANDOM EVENTS USING
PYTHON
Monte Carlo simulation is a popular and well-known
technique that generates results based on the probability
of an event. The probability of each event is proportional
to its likelihood. Simulations are run using a random
sampling method, but theoretical sampling based on
random numbers is used instead of sampling actual
data. In this randomization, the data distribution is
sampled to match or closely resemble that of the actual
data in the problem scenario. Random events that
Contribution to the literature
A simulation model is an important specific mathematical model for dealing with contextual problems
when the problem cannot be explained analytically or data cannot be directly collected .
The development of subject-specific competencies in simulating the probabilistic behavior of random
events with Python is one approach to introducing students to simulation modeling. This serves as basic
knowledge and competency to learn at a higher level and to apply these skills in everyday life.
Student competency in simulating the probabilistic behavior of random events with Python was enhanced
through the development of specific learning activities.
EURASIA J Math Sci Tech Ed, 2022, 18(9), em2149
3 / 12
students have already studied are highlighted for the
problem situations in this activity.
The activities listed in Table 1 were designed for
students based on a previously presented academic
concept of simulating the probabilistic behavior of
random events (Albright & Fox, 2019; Fox, 2013;
Giordano et al., 2013; Gordon & Guilfoos, 2017).
It is necessary to describe how to simulate the
probabilistic behavior of random events. A simulation of
simultaneously flipping two coins can be done according
to the steps listed below. The sample space for random
occurrences can be described as
.
A sample space is often required that has two possible
random outcomes with equal probability. This is
referred to as a fair coinrandom event that simulates
a coin toss. The function,  below, is similar.
However, it allows for four outcomes, each with a
probability of 0.25. Consider the set to create a
simulated function as




Then apply the simulation function to write the
simulation algorithm as follows in Figure 1.
Table 1. Activities for learning about simulation of probabilistic behavior of random events. Each activity yields a number
of occurrences and a probabilistic proportion of each outcome of the simulation
Simulation activity
Description
Type of activity
Tossing dice
Create a simulation of the probabilistic behavior of tossing a die
using Python.
Demonstration by a
teacher
Flipping two coins
Create a simulation of the probabilistic behavior of flipping two
coins with Python.
Demonstration by a
teacher
Tossing a coin & a die
Create a simulation of the probabilistic behavior of tossing a
coin and a die with Python.
Teachers led students to
practice.
Determining a random event
Create a simulation of the probabilistic behavior of random
events as determined by each group of students with Python.
Group activity
Picking a card
Create a simulation of the probabilistic behavior of randomly
picking a card numbered 0-9 with Python.
Individual activity
Flipping three coins
Create a simulation of the probabilistic behavior of flipping
three coins with Python.
Evaluation of
competency in
simulating probabilistic
behavior of random
events with Python
Figure 1. An algorithm for simulating a simultaneous flip
of two coins
Seebut et al. / Python-based simulations of the probabilistic behavior of random events
4 / 12
During the simulation, Python commands can be
used for simulation as shown in Figure 2.
After executing the program, the following
simulation results in Figure 3 for a two-coin flip can be
obtained.
From this example, the sub-competencies in
simulating the probabilistic behavior of random events
with Python are analyzed and summarized in Figure 4.
SCAFFOLDING
Since students are unfamiliar with the learning
activities that involve simulating the probabilistic
behavior of random events, the instructor must
incorporate a support process into the learning
management activities to increase student abilities to
achieve the set goals. Scaffolding is an effective learning
management technique when students must learn
something new or difficult. We can help our students
help one another by demonstrating, acting out, or using
prompting questions to promote learning. A rescue goal
is set to help learners who are unable to work alone at
first, until they are able to finish a task independently.
When learners gradually improve their ability to
complete activities on their own, the complementary
learning process shifts and declines (Schukajlow et al.,
2015a; Stender & Kaiser, 2015; Tropper et al., 2015). A
scaffolding process for learning activities to simulate the
probabilistic behavior of random events can be thought
of as discussed below.
Classroom Scaffolding
Classroom scaffolding involves simultaneously
augmenting learning by everyone in the classroom. The
instructor explains the concepts and procedures for
simulating the probabilistic behavior of random events
with Python. Then, he demonstrates how to use Python
to simulate probabilistic behavior and walks learners
through the process. Learning is arranged utilizing a
Facebook group as a host of the M30225 Mmodeling
technology course while performing research on the
spread of COVID-19. After all students have joined the
Facebook page, they are able to get news and crucial
information regarding the courses here. Instructors post
instructional materials and a link to a Zoom classroom
on the Facebook group as part of the learning
management process. The teacher then administers the
course using Zoom, which makes emulating the Python
process simple using Google Collaboratory. While the
teacher instructs, shows, and guides the students in
practice, every phase of simulating the probabilistic
behavior of random events with Python is recorded from
Zoom. The teacher posts the recorded video on the
Facebook group for learners to review after the session.
Figure 2. Python code for a computer simulation of flipping
two coins
Figure 3. Simulation results of two coins being
simultaneously flipped
EURASIA J Math Sci Tech Ed, 2022, 18(9), em2149
5 / 12
Group Scaffolding
Group scaffolding involves augmenting learning
through group activities. Here, the teacher guides
groups of learners. The outcome of this cooperative
learning exercise will be shared so that students may
learn together. Instructors publish instructional
materials and post a Zoom classroom link on the
Facebook group, after which he runs the course using
Zoom. An instructor introduces students to objects that
behave in a probabilistic manner such as coins, dice, and
cards. The learners are place in groups in the Zoom break
out room, each with its own set of probabilistic situations
to simulate. Probabilistic media is supplied by the
instructor or other probabilistic media encountered by
the learner is used design a simulation. Students show
their work via video clips and submit it using Google
forms, which the instructor then posts to the Facebook
group. Then, he fixes the presentation footage and posts
it to the Facebook group for everyone to learn. Students
work in the Zoom break-out room to define a random
event, create a sample space, and create simulation
functions during this portion of the learning process.
Writing a simulation method, coding it in Python for
simulation, and generating video presentations are all
outside-of-class activities.
Individual Scaffolding
Individual scaffolding is intended to supplement the
learning of individuals in this setting. Since the students
have previously learned about simulating the
probabilistic behavior of random events with Python,
the instructor is prepared to examine each student
individually in this step to determine which students
require additional instruction. A small number of
students will require assistance at some point during the
simulation, so the teacher will personally assist them.
Instructional materials are posted as is a link to the Zoom
classroom in the Facebook group as part of the learning
management process. After that, instructors schedule
their lessons through Zoom. Probabilistic behavioral
occurrences are identified. Then, using Python, each
student should create a method for simulating the
probabilistic behavior of a given random event. When
they finish, they present video recordings of worksheets
based on the instructors assignments and submit them
via a Google form that includes a link to submit the
assignment to the Facebook group. After that, he goes
over the work one-on-one with students to provide
feedback and information. In this section, learners use
Zoom to complete the learning process, which includes
designing a random event, building a sample space, and
developing a simulation function. Throughout the
lesson, students request additional assistance via
Facebook Messenger.
Evaluation Criteria
Considering the previously presented academic
concept of assessing modeling competency (Ferri, 2017;
Hidayat et al., 2022; Lingefjärd & Holmquist, 2005), an
assessment framework demonstrating competency and
student thinking is proposed for simulating the
probabilistic behavior of random events with Python. At
each level of the procedure, there should be evidence of
competency and critical thinking. Evaluation is
separated into five sub-competency phases, as follows:
1. S1: Competency in analyzing sample space of
random events.
2. S2: Competency in generating simulation
functions from a sample space.
3. S3: Competency in writing algorithms to simulate
the probabilistic behavior of random events.
4. S4: Competency in coding Python to simulate the
probabilistic behavior of random events.
5. S5: Competency in presenting the results of
simulating the probabilistic behavior of random
events.
Since this is an evaluation of an activity, rubric
scoring is used, which reflects each students level of
competency based on their performance. A Likert-scale
questionnaire was employed as an instrument for
analyzing the enhancement of enjoyment, perception of
value, interest, and self-efficacy of each learner. Based on
the previously presented academic concepts (Krawitz &
Schukajlow, 2018), four questions were used to
summarize these factors as follows:
1. Q1: I enjoy solving the problem of simulating the
probabilistic behavior of random events with
Python.
2. Q2: I think it is important to be able to solve
problems by simulating the probabilistic behavior
of random events with Python.
3. Q3: It would be interesting to solve problems of
simulating the probabilistic behavior of random
events with Python.
4. Q4: I am confident that I can solve problems of
simulating the probabilistic behavior of random
events with Python.
Figure 4. The process of simulating probabilistic behavior
of a random event and the sub-competencies required
Seebut et al. / Python-based simulations of the probabilistic behavior of random events
6 / 12
RESEARCH METHODOLOGY
Participants in the Research
The participants in this investigation were secondary
school students who were enrolled in a science
classroom in a university-affiliated school project. There
was a total of 28 students in grade 12 who were between
the ages of 17 and 18 years old.
Research Instruments
The research tools used in the current study included
three instruments. The first was a learning activity plan
for simulating the probabilistic behavior of random
events with Python. A competency test with an
evaluation rubric criterion was used for simulating the
probabilistic behavior of random events with Python.
Finally, a Likert-scale questionnaire was employed to
assess the enjoyment, perceived value, interest, and self-
efficacy of the activities.
Methods of Data Analysis
Our approach to data analysis uses the results of a
rubric assessment of competency in simulating the
probabilistic behavior of random events with Python.
The frequency of students at each level of competency
for each sub-competency is presented. Students mean
scores are used to summarize the overall level of
competency in each sub-competency. The mean scores
and standard deviations from the Likert-scale
questionnaire are presented to determine the impact of
the activity on learner enjoyment, perceived value,
interest, and self-efficacy.
Procedure
The study started with developing and preparing
research tools. This was followed by preparing the target
audience, running the activity by simulating the
probabilistic behavior of random events with Python
with the target audience according to the scaffolding
strategy. Finally, the results were evaluated and
analyzed to draw conclusions.
RESULTS AND DISCUSSION
The following results of a competency test and
questionnaire evaluation are presented. This is to
establish that the developed activities can enhance
learner competency in simulating probabilistic
behaviors of random events with Python in a way that
students find enjoyable, valuable, interesting, and
supportive of their self-efficacy. Students were
evaluated in their ability to simulate probabilistic
behavior of random events with Python. They simulated
the probabilistic behavior of a three-coin toss to
determine the probability of all three tosses being heads.
The rubric evaluation results can distinguish the level of
competency for each sub-competency, as depicted in
Figure 5.
From Figure 5, it can be surmised that the
competency assessment of S1 showed that most students
had excellent competency, followed by good
competency, while the satisfactory and needs
improvement levels were almost nonexistent. As for S2,
most of the students had excellent competency, followed
by the good level, with a small number of students at the
satisfactory and needs improvement levels. For S3, many
students were at the needs improvement and
satisfactory level, while only a few were good or
excellent. In S4, almost all students were at the good
level. A few students were at excellent and satisfactory
levels. Finally, in S5, the majority of students were at the
good level, followed by excellent, with only a few
students scoring satisfactory and none scoring needs
improvement.
The scores generated by individual rubrics can be
used to provide an overview of the student competency
in each of the sub-competencies needed for simulating
the probabilistic behavior of random events with
Python, as shown in Figure 6.
Figure 5. Number of students at each competency level for
each sub-competency of simulating probabilistic behavior
of random events with Python
Figure 6. Mean score for each sub-competency of
simulating probability behavior of random events with
Python
EURASIA J Math Sci Tech Ed, 2022, 18(9), em2149
7 / 12
Figure 6 shows that the mean sub-competency scores
for S1 were 3.68. Those for S2, S4, and S5 were 3.11, 2.93,
and 3.25, respectively. For S3, the mean was 2.07. Based
on the mean scores, the overall level of learner
competency in each sub competency for simulating the
probabilistic behavior of random events with Python
could be described as follows. The competency in
analyzing sample spaces of random events was excellent
while that for generating simulation functions from a set
of sample spaces was good. Writing algorithms to
simulate the probabilistic behavior of random events
was satisfactory and competency in coding Python to
simulate the probabilistic behavior of random events
was good. Finally, the competency in presenting the
results of random events was good.
Figure 7 depicts an illustration of the outcomes of
analyzing a sample space from random events. The letter
H depicts an instance of a heads coin toss while T
represents tails. The students work in the figure is
completely accurate. In accordance with the criteria of
the rubric, the assessment results were given a score of
4, which corresponds to the level of excellent.
Figure 8 depicts an example of the output of
generating a simulation function from a set of sample
spaces. It is a satisfactory level for student work because
assigning 7/8≤x<1 values of the HHH simulation
function based on remark 1 may result in errors since the
simulation function cannot produce a result at x=1. So, it
should be revised to 7/8≤x≤1, and for the same reason,
x<1/8 should be revised to 0≤x≤1/8 in remark 2. As a
result, its score is 2 according to the rubric criteria.
However, the majority of the student assessments were
at a good level. This reflection is presented as a guideline
for making suggestions for improving student
performance.
Figure 9 depicts an example of the outcomes of
writing algorithms to simulate the probabilistic behavior
of a random event. Considering remark 3, the algorithm
is written in steps ordered to generate a random number
x_i but lacks a specified range for x_i. This should be
revised in step 3 to generate a random number, x_i,
where x_i [0, 1] evaluates the result. Its score is 2 points
on according to the rubric, which is a satisfactory level.
This is due to a lack of explainability indicating that
additional practice and development is required. Aside
from that, students are unaware of the significance of
writing algorithms. They are unaware that a good
algorithm can be used to develop other programming
languages and improve programming skill. As a result,
there is a lack of attention to detail in writing good
quality algorithms. When teachers bring the importance
of writing good algorithms to the attention of students,
it should lead to development of improved algorithms.
Figure 7. A graphical representation of a sub-competency
in analyzing a sample space for random events
Figure 8. A schematic representation of sub-competency in
generating a simulation function from a set of sample
spaces
Figure 9. A schematic representation of the sub-competency
in writing algorithms to simulate the probabilistic behavior
of random events
Seebut et al. / Python-based simulations of the probabilistic behavior of random events
8 / 12
Figure 10 depicts an example of coding Python to
simulate the probabilistic behavior of a random event.
Given the position of remark 4, the code should be
changed from (0, n) to (1, n+1) so that the emulation
begins at 1 and ends at n due to Pythons unique
functionality that does not iterate a loop for the last
number of a specified range. The rank, (0, n), is evaluated
as 0, 1, 2, ..., n-1. So, index must be adjusted to (1, n+1) so
that the simulation sequence is 1, 2, 3, ..., n. The statement
y=THT and counterTHT=counterTHT+1 can be
left in the remark 5 condition. The other positions in the
if …, elif …, and else conditions can be modified in the
same way. Finally, the position of Remark 6 should be
changed from (1, n) to (1, n+1) because (1, n) will execute
loops 1, 2, 3, ..., n-1, failing to execute that last cycle.
However, this is a minor error. As before, when we
simulate large n values, better simulation results are
achieved. This is completely an aesthetic factor, so, the
assessment results in a score of 3 points according to the
rubric, which is at a good level.
Figure 11 depicts an example of presenting the results
of simulating the probabilistic behavior of a random
event. Remark 7 reveals that students used only 20
simulations to reach a conclusion. A greater number of
simulations with large n values will result in better
results. As a consequence, the assessment score is 3
points based on the rubric criteria, which is a good level.
The results reflect the success of activities to promote
learners competency in simulating the probabilistic
behavior of random events with Python. The factors that
led to this result include, first and foremost, the learners
ability to perform activities. This is because only
academically gifted students are chosen to participate
the science classrooms in a university-affiliated school
project. Therefore, they are academically exceptional.
The second critical aspect is scaffolding strategic
planning, which involves pre-planning scaffoldings,
both at the micro- or macro-levels.
Figure 10. A schematic representation of the sub-competency of coding Python to simulate the probabilistic behavior of
random events
Figure 11. A schematic representation of sub-competency in
presenting results of simulating the probabilistic behavior
of random events
EURASIA J Math Sci Tech Ed, 2022, 18(9), em2149
9 / 12
Anticipating the challenges that students will face
when simulating the probabilistic behavior of random
events with Python is necessary. It has a significant
impact on increasing competence to achieve goals. As a
result, the success of promoting competency in
simulating the probabilistic behavior of random events
with Python is affected by the development of a good
scaffolding strategy. This is consistent with research on
the significance of scaffolding strategies in promoting
mathematical modeling competencies (Geiger et al.,
2022; Greefrath & Vorhölter, 2016; Schukajlow et al.,
2015a). The final, but very important element is Python,
a mathematical tool used to simulate the probabilistic
behavior of random events. Greefrath and Siller (2017)
emphasized the significance of embracing digital
technology. It is used in mathematical modeling
processes, particularly simulation modeling, which
takes advantage of Pythons ease simulating the
probabilistic behavior of random events. Furthermore,
Rodríguez Gallegos (2015) and Rodríguez Gallegos and
Quiroz Rivera (2015) concluded that selecting the
appropriate digital technology for mathematical
modeling activities can improve the modeling
performance of learners. The use of Python for
simulating the probabilistic behavior of random events
resulted in positive outcomes for learner competency, as
data analysis of the activities revealed. All of these
elements are essential to learning activities designed to
promote learner competency in simulating the
probabilistic behavior of random events with Python.
The mean and standard deviation of the analysis of
the developed activities on enjoyment, perceived value,
interest, and self-efficacy from the Likert scale
questionnaire were computed to determine the effect of
this activity on these four domains, as shown in Table 2.
Based on their responses to the questionnaire, the
students agreed that the activity was enjoyable. In terms
of value, the majority of students strongly agreed that
this activity was worthwhile. The majority of students
agreed that the practical activities piqued their interest.
When asked about their self-efficacy, they all agreed that
the activities gave them confidence in their ability to use
Python to simulate the probabilistic behavior of random
events. The results of the questionnaire indicate the
success of the activities in simulating the probabilistic
behavior of random events with Python. Additionally, it
positively affected student enjoyment, perceived value,
interest, and self-efficacy. Instructional management
that focuses on learners is very important. These
characteristics are consistent with organizing learning
activities through group processes, learning assistance,
and empowerment strategies (Davadas & Lay, 2018;
Schukajlow et al., 2012).
CONCLUSIONS
The goal of developing learners with fundamental
competency and knowledge for simulating the
probabilistic behavior of random events with Python
was achieved. This is a significant model with unique
characteristics that require effective application to real-
world problems. In these cases, there is uncertainty
regarding the probability of the observed behavior. To
drive the required baseline competency for students to
accomplish simulation modeling at a higher level,
learning activities about simulating the probabilistic
behavior of random events with Python were
developed. These activities encourage students to
practice the simulation process until it becomes a
competency so that they can continue in the study of
simulation modeling at a higher level and to apply
simulation modeling in real-life situations. The 28 grade
12 students in the science classrooms of a university-
affiliated school project served as the studys target
group for examining the effects of activities on
competency development. Students completed a
subjective test using a rubric at the end of the activity to
assess how well the activity affected their competency in
simulating the probabilistic behavior of random events
with Python. Additionally, the students provided
information via a Likert-scale assessment that asked
them to reflect upon how the activity affected their
enjoyment, perceived value, interest, and self-efficacy.
The assessment results revealed that learning activities
involving simulating probabilistic behavior with Python
were positively evaluated in both the cognitive and
affective domains. Student competency in simulating the
probabilistic behavior of random events using Python
was more than satisfactory. They agreed that practicing
activities increases their enjoyment, perceived value,
interest, and self-efficacy. All of these are necessary for
continued development of learners in simulation
modeling. The activities of the current study are deemed
successful because they achieved the goal of developing
learners.
Table 2. The results of the questionnaire on learning activities for simulating the probabilistic behavior of random events
with Python on learner enjoyment, perceived value, interest, and self-efficacy
Item for evaluation
SD
Implication
I enjoy solving problems simulating the probabilistic behavior of random events with Python.
0.95
Agree
I think it is important to be able to solve problems by simulating the probabilistic behavior of
random events with Python.
0.72
Strongly
agree
It is interesting to solve problems simulating probabilistic behavior of random events with Python.
1.06
Agree
I am confident that I can solve problems simulating probabilistic behavior of random events with
Python.
1.31
Agree
Seebut et al. / Python-based simulations of the probabilistic behavior of random events
10 / 12
Author contributions: All authors have sufficiently contributed to
the study and agreed with the results and conclusions.
Funding: This study was supported by Faculty of Science, Ubon
Ratchathani University.
Declaration of interest: No conflict of interest is declared by
authors.
Data sharing statement: Data supporting the findings and
conclusions are available upon request from the corresponding
author.
REFERENCES
Albright, B., & Fox, W.P. (2019). Mathematical modeling
with Excel. Chapman and Hall/CRC.
https://doi.org/10.1201/9780429487132
Balakrishnan, G., Yen, Y. P., & Goh, E. L. E. (2010).
Mathematical modelling in the Singapore
secondary school mathematics curriculum. In
Mathematical applications and modelling: Yearbook
2010 (pp. 247-257). Association of Mathematics
Educators. https://doi.org/10.1142/97898143133
53_0013
Blomhøj, M. (2020). Characterising modelling
competency in students’ projects: Experiences from
a natural science bachelor program. In G. Stillman,
G. Kaiser, & C. Lampen (Eds.), Mathematical
modelling education and sense-making. International
perspectives on the teaching and learning of
mathematical modelling. Springer. https://doi.org/
10.1007/978-3-030-37673-4_34
Blum, W., & Leiß, D. (2006). How do students and
teachers deal with modelling problems? In C.
Haines, P. Galbraith, W. Blum, & S. Khan (Eds.),
Mathematical modelling (ICTMA12): Education,
engineering and economics (pp. 222-231).
https://doi.org/10.1533/9780857099419.5.221
Davadas, S. D., & Lay, Y. F. (2018). Factors affecting
students attitude toward mathematics: A
structural equation modeling approach. Eurasia
Journal of Mathematics, Science and Technology
Education, 14(1), 517-529. https://doi.org/10.
12973/ejmste/80356
English, L. D. (2012). Data modelling with first-grade
students. Educational Studies in Mathematics, 81(1),
15-30. https://doi.org/10.1007/s10649-011-9377-3
Farihah, U. (2019). Student modelling in solving the
polynomial functions problems using GeoGebra
approach. IOP Conference Series: Earth and
Environmental Science, 243(1), 012104.
https://doi.org/10.1008/1755-1315/243/1/012104
Ferri, R. B. (2017). Learning how to teach mathematical
modeling in school and teacher education. Springer.
https://doi.org/10.1007/978-3-319-68072-9
Fox, W. P. (2013). Mathematical modeling with Maple.
Cengage Publishing.
Frejd, P., & Ärlebäck, J. B. (2017). Initial results of an
intervention using a mobile game app to simulate a
pandemic outbreak. In G. Stillman, W. Blum, & G.
Kaiser (Eds.), Mathematical modelling and
applications. International perspectives on the teaching
and learning of mathematical modelling. Springer.
https://doi.org/10.1007/978-3-319-62968-1_43
Galbraith, P., Holton, D., & Turner, R. (2020). Rising to
the challenge: Promoting mathematical modelling
as real-world problem solving. In G. Stillman, G.
Kaiser, & C. Lampen (Eds.), Mathematical modelling
education and sense-making. International perspectives
on the teaching and learning of mathematical modelling.
Springer. https://doi.org/10.1007/978-3-030-
37673-4_22
Geiger, V., Galbraith, P., Niss, M., & Delzoppo, C. (2022).
Developing a task design and implementation
framework for fostering mathematical modelling
competencies. Educational Studies in Mathematics,
109(2), 313-336. https://doi.org/10.1007/s10649-
021-10039-y
Giordano, F. R., Fox, W. P., & Horton, S. B. (2013). A first
course in mathematical modeling. Cengage Learning.
Gordon, S. I., & Guilfoos, B. (2017). Introduction to
modeling and simulation with MATLAB® and Python.
Chapman and Hall/CRC. https://doi.org/10.
1201/9781315151748
Greefrath, G., & Siller, H. S. (2017). Modelling and
simulation with the help of digital tools. In G.
Stillman, W. Blum, & G. Kaiser (Eds.), Mathematical
modelling and applications. International perspectives
on the teaching and learning of mathematical modelling.
Springer. https://doi.org/10.1007/978-3-319-
62968-1_44
Greefrath, G., & Vorhölter, K. (2016). Teaching and
learning mathematical modelling: Approaches and
developments from German speaking countries. In
Teaching and learning mathematical modelling. ICME-
13 topical surveys. Springer. https://doi.org/10.
1007/978-3-319-45004-9_1
Hartmann, L. M., Krawitz, J., & Schukajlow, S. (2021).
Create your own problem! When given
descriptions of real-world situations, do students
pose and solve modelling problems? ZDM
Mathematics Education, 53, 919-935.
https://doi.org/10.1007/s11858-021-01224-7
Hidayat, R., Adnan, M., & Abdullah, M. F. N. L. (2022).
A systematic literature review of measurement of
mathematical modeling in mathematics education
context. Eurasia Journal of Mathematics, Science and
Technology Education, 18(5), em2108.
https://doi.org/10.29333/ejmste/12007
Kaiser, G., Schwarz, B., & Buchholtz, N. (2011).
Authentic modelling problems in mathematics
education. In G. Kaiser, W. Blum, R. Borromeo
Ferri, & G. Stillman (Eds.), Trends in teaching and
learning of mathematical modelling. International
EURASIA J Math Sci Tech Ed, 2022, 18(9), em2149
11 / 12
perspectives on the teaching and learning of
mathematical modelling. Springer. https://doi.org/
10.1007/978-94-007-0910-2_57
Kazak, S. (2010). Modeling random binomial rabbit
hops. In R. Lesh, P. Galbraith, C. Haines, & A.
Hurford (Eds.), Modeling students mathematical
modeling competencies. Springer. https://doi.org/
10.1007/978-1-4419-0561-1_49
Kazak, S., Pratt, D., & Gokce, R. (2018). Sixth grade
students emerging practices of data modelling.
ZDM Mathematics Education, 50, 1151-1163.
https://doi.org/10.1007/s11858-018-0988-3
Kin, W., & Chan, V. (2011). Foundations of simulation
modeling. In Wiley encyclopedia of operations research
and management science. John Wiley & Sons.
https://doi.org/10.1002/9780470400531
Kotelawala, U. (2011). Stochastic case problems for the
secondary classroom with reliability theory. In G.
Kaiser, W. Blum, R. Borromeo Ferri, & G. Stillman
(Eds.), Trends in teaching and learning of mathematical
modelling. International perspectives on the teaching
and learning of mathematical modelling. Springer.
https://doi.org/10.1007/978-94-007-0910-2_59
Krawitz, J., & Schukajlow, S. (2018). Do students value
modelling problems, and are they confident they
can solve such problems? Value and self-efficacy
for modelling, word, and intra-mathematical
problems. ZDM, 50(1), 143-157. https://doi.org/
10.1007/s11858-017-0893-1
Krutikhina, M. V., Vlasova, V. K., Galushkin, A. A., &
Pavlushin, A. A. (2018). Teaching of mathematical
modeling elements in the mathematics course of
the secondary school. Eurasia Journal of Mathematics,
Science and Technology Education, 14(4), 1305-1315.
https://doi.org/10.29333/ejmste/83561
Leung, I. K. C. (2013). Beyond the modelling process: An
example to study the logistic model of customer
lifetime value in business marketing. In G. Stillman,
G. Kaiser, W. Blum, & J. Brown (Eds.), Teaching
mathematical modelling: Connecting to research and
practice. International perspectives on the teaching and
learning of mathematical modelling. Springer.
https://doi.org/10.1007/978-94-007-6540-5_52
Lingefjärd, T. & Holmquist, M. (2005). To assess
students attitudes, skills and competencies in
mathematical modeling. Teaching Mathematics and
Its Applications: International Journal of the IMA, 24(2-
3), 123-133. https://doi.org/10.1093/teamat/
hri021
Liu, J. (2020). Simulus: Easy breezy simulation in python.
In 2020 Winter Simulation Conference (WSC) (pp.
2329-2340). IEEE. https://doi.org/10.1109/
WSC48552.2020.9383886
Maria, A. (1997). Introduction to modeling and
simulation. In Proceedings of the 29
th
Conference on
Winter Simulation (pp. 7-13). https://doi.org/
10.1145/268437.268440
Ortega, M., & Puig, L. (2017). Using modelling and
tablets in the classroom to learn quadratic
functions. In G. Stillman, W. Blum, & G. Kaiser
(Eds.), Mathematical modelling and applications.
International perspectives on the teaching and learning
of mathematical modelling. Springer.
https://doi.org/10.1007/978-3-319-62968-1_47
Patel, A., & Pfannkuch, M. (2018). Developing a
statistical modeling framework to characterize year
7 studentsreasoning. ZDM Mathematics Education,
50, 1197-1212. https://doi.org/10.1007/s11858-
018-0960-2
Rodríguez Gallegos, R. & Quiroz Rivera, S. (2015).
Developing modelling competencies through the
use of technology. In G. Stillman, W. Blum, & M.
Salett Biembengut (Eds.), Mathematical modelling in
education research and practice. International
perspectives on the teaching and learning of
mathematical modelling. Springer. https://doi.org/
10.1007/978-3-319-18272-8_37
Rodríguez Gallegos, R. (2015). A differential equations
course for engineers through modelling and
technology. In G. Stillman, W. Blum, & M. Salett
Biembengut (Eds.), Mathematical modelling in
education research and practice. International
perspectives on the teaching and learning of
mathematical modelling. Springer. https://doi.org/
10.1007/978-3-319-18272-8_46
Schukajlow, S., Kolter, J., & Blum, W. (2015a).
Scaffolding mathematical modelling with a
solution plan. ZDM, 47(7), 1241-1254.
https://doi.org/10.1007/s11858-015-0707-2
Schukajlow, S., Krug, A., & Rakoczy, K. (2015b). Effects
of prompting multiple solutions for modelling
problems on students performance. Educational
Studies in Mathematics, 89, 393-417.
https://doi.org/10.1007/s10649-015-9608-0
Schukajlow, S., Leiss, D., Pekrun, R., Blum, W., Müller,
M., & Messner, R. (2012). Teaching methods for
modelling problems and students task-specific
enjoyment, value, interest and self-efficacy
expectations. Educational Studies in Mathematics,
79(2), 215-237. https://doi.org/10.1007/s10649-
011-9341-2
Shahbari, J.A., & Peled, I. (2017). Modelling in primary
school: Constructing conceptual models and
making sense of fractions. International Journal of
Science and Mathematics Education, 15, 371-391.
https://doi.org/10.1007/s10763-015-9702-x
Stender, P., & Kaiser, G. (2015). Scaffolding in complex
modelling situations. ZDM, 47(7), 1255-1267.
https://doi.org/10.1007/s11858-015-0741-0
Seebut et al. / Python-based simulations of the probabilistic behavior of random events
12 / 12
Stillman, G. (2010). Implementing applications and
modelling in secondary school: Issues for teaching
and learning. In Mathematical applications and
modelling: Yearbook 2010 (pp. 300-322). Association
of Mathematics Educators. https://doi.org/10.
1142/9789814313353_0016
Tendeloo, Y. V., Vangheluwe, H., & Franceschini, R.
(2019). An introduction to modeling and simulation
with (Python (P)) DEVS. In 2019 Winter Simulation
Conference (WSC) (pp. 1415-1429). IEEE.
https://doi.org/10.1109/WSC40007.2019.9004690
Tobrawa, S., Münch, G. V., Denkena, B., & Dittrich, M.
A. (2022). Design of simulation models. In J.
Stjepandić, M. Sommer, & B. Denkena (Eds.),
DigiTwin: An approach for production process
optimization in a built environment. Springer.
https://doi.org/10.1007/978-3-030-77539-1_9
Tropper, N., Leiss, D., & Hänze, M. (2015). Teachers
temporary support and worked-out examples as
elements of scaffolding in mathematical modeling.
ZDM, 47(7), 1225-1240. https://doi.org/10.1007/
s11858-015-0718-z
Volosencu, C., & Ryoo, C. S., (Eds.). (2022). Simulation
Modeling. IntechOpen. https://doi.org/10.5772/
intechopen.95666
Wake, G. (2015). Preparing for workplace numeracy: a
modelling perspective. ZDM Mathematics
Education, 47, 675-689. https://doi.org/10.1007/
s11858-015-0704-5
Yanagimoto, A., & Yoshimura, N. (2013). Mathematical
modelling of a real-world problem: The decreasing
number of bluefin tuna. In G. Stillman, G. Kaiser,
W. Blum, & J. Brown (Eds.), Teaching mathematical
modelling: Connecting to research and practice.
International perspectives on the teaching and
learning of mathematical modelling. Springer.
https://doi.org/10.1007/978-94-007-6540-5_20
Zárate Ceballos, H., Parra Amaris, J. E., Jiménez Jiménez,
H., Romero Rincón, D. A., Agudelo Rojas, O., &
Ortiz Triviño, J. E. (2021). Introduction to
simulation. In Wireless network simulation. Apress.
https://doi.org/10.1007/978-1-4842-6849-0_1
https://www.ejmste.com