Asee peer logo

Integration by Gambling

Download Paper |

Conference

2023 ASEE North Central Section Conference

Location

Morgantown, West Virginia

Publication Date

March 24, 2023

Start Date

March 24, 2023

End Date

March 25, 2023

Page Count

8

DOI

10.18260/1-2--44693

Permanent URL

https://peer.asee.org/44693

Download Count

96

Request a correction

Paper Authors

biography

Murat Tanyel Geneva College

visit author page

Murat Tanyel is a professor of engineering at Geneva College. He teaches upper level electrical and biomedical engineering courses. Prior to Geneva College, Dr. Tanyel taught at Dordt College (now Dordt University) in Sioux Center, IA.

visit author page

Download Paper |

Abstract

In modern science and engineering, numerical methods play an important role. Scientific exploration is often supplemented by computers and sometimes conducted on computers rather than laboratory equipment. Even some of the laboratory equipment such as spectrum analyzers employ digital algorithms to produce test results. Thus, our department requires our budding mechanical and biomedical engineers to take CPE 111, Intro to Engineering Computation, in which they learn how to solve problems using MATLAB®. Our electrical and computer engineers, on the other hand, are introduced to the world of computing in CSC 101 using the C programming language with the added bonus of LabVIEW® in EGR 325, the Signals & Systems course. Overseeing both CPE 111 and EGR 225, I am always on the lookout for fun examples in which students can learn programming concepts while trying to solve what they will perceive as real-world problems. Having taught MAT 350, Numerical Methods, this semester I came across Monte Carlo integration which is a good candidate for teaching about for loops and, because of the number of calculations involved, about timing issues. Methods that simulate natural phenomena based on probabilities make extensive use of random numbers and are called Monte Carlo methods. Monte Carlo integration involves generating random values for the independent and dependent variables, checking to see if the function applied to the randomly generated independent variables is less than or equal to the value of the randomly generated dependent variable (a success). After a large number of such trials, the count of successes divided by the total number of trials, with appropriate scaling, is an estimate of the area or volume under the function, i.e., the integral of the function. This paper will describe Monte-Carlo integration and provide examples that can be used in CPE 111 with MATLAB and in EGR 225 with LabVIEW. We will also observe the execution timing of the same problems on both platforms.

Tanyel, M. (2023, March), Integration by Gambling Paper presented at 2023 ASEE North Central Section Conference, Morgantown, West Virginia. 10.18260/1-2--44693

ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2023 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015