Are We Teaching Engineering in Silos? Exploring the Intersections of Statics, Statistics, and Programming for Engineering Students.

We should teach students that the classes they take are not just consecutive chapters in a book. It is important for them to understand that everything is connected! To demonstrate, I created three sophomore level engineering questions that brings three engineering topics together.

Egemen Ökte
11 min readJan 20, 2023
Photo by fauxels: https://www.pexels.com/photo/group-of-person-sitting-indoors-3184306/

Before we begin, why am I doing this?

I am a faculty member at the University of Massachusetts Amherst. I studied Civil Engineering in Turkey at Middle East Technical University and finished my PhD at University of Illinois at Urbana-Champaign.

I was a very good student. I even graduated at the top of my class (kind of, it is complicated). However, looking back, one of the skills I was missing was a deep understanding of how each topic may be connected to other topics. I was exceptional at solving assignments and passing exams. What I was not very good at was generalizing my knowledge into more complex engineering problems because I saw each class as a mountain I had to climb. Separately.

Take statistics for example. Take this with a grain of salt, as this is anecdotal, but I remember many of my classmates seeing that course as an obstacle they had to overcome to move on to the next semester. I saw similar tendencies in the sophomore class that I was teaching statics. (Yes, I am teaching statics, not statistics. It is okay, I get confused all the time as well). They see each class as separate beasts they have to fight to move on.

Sophomores here at UMass take statics, statistics and introduction to coding using MATLAB during the fall semester. What I wanted to do, at least a little bit, was to incorporate some amount of statistics and MATLAB into statics to show students that the crucial knowledge and tools they learn in these courses do not float in the universe separately. Because real engineering problems can never be solved using only knowledge from one course you take. Actually, in many real-life situations, engineering courses can only help you understand the problem but not solve it immediately.

Our Toy Examples — Probabilistic Loads in Statics!

After my rant about things being connected, I decided to create a series of examples, increasing in difficulty, showing students how to use statics, statistics and MATLAB together. Sidenote, some people may prefer Python for many reasons, but we are going with MATLAB here as that is what students learn.

Prior Knowledge

I did this fairly late in the semester, therefore, the students already learned the following in all courses

  • Statics: Equilibrium in 2D and 3D, trusses and frames, shear and moment equations/diagrams
  • Statistics: Basic set theory and probability, discrete and continuous variables, multiple variables, dependence and independence, basic sampling methods
  • MATLAB: Variables types, vector operations, conditional statements, loops, functions

I listed these because all of them are needed to understand and solve these questions. PS: I also did a recap on statistics and MATLAB for one lecture. The codes I used can be found here https://github.com/egemenokte/Statics

Question #1 — Bridge Deck

Let’s say we have a bridge deck, which can be modeled as a simply supported beam. We know the width of the bridge deck, but we do not know the lane-location and the weight of the vehicle that may pass the bridge. Let’s assume that

  • P, the weight of the vehicle, follows a normal distribution with mean 50 kN, and standard deviation of 12 kN.
  • x, location of the vehicle follows a uniform distribution between 0 m and 12 m. (It is equally likely to find a vehicle anywhere along the width)

Assuming that P and x are independent, please find

  1. An expression that gives the maximum moment M along the beam in terms of P and x.
  2. Mean values of P and x.
  3. Mean value of M.
  4. Probability of M exceeding 150 kN.m

Note for the reader: The numbers and assumptions are selected to make calculations easier, they may not be realistic as P and x may not be independent or may not follow said distributions, their values may be unrealistic, there are more cars than one, etc. It is important for us to explain this to students, as this is just an example. Real life is more complicated.

Graphical Representation of the Bridge Deck

Step 1) Finding Mmax

Given this was in statics, this is the most fun part in terms of statics. The maximum moment in a simply supported beam always occurs at the location of the point load. I derived this before in class but also during class, I gave them some time to figure this out again on their own. If you do not believe me, draw the shear and moment diagrams! I did so in class and have a code here to demonstrate https://github.com/egemenokte/Statics

With that knowledge, if you cut this beam at the point load and calculate the moment, given L=12 m, you will find that

This part is important for two reasons.

First, the location/magnitude of maximum moment and shear are crucial concepts in statics and following structural courses. You can see that when you place the load at supports, x=0 or x=L, we have no moment, as this is a simply supported beam and should have no moment at the supports. If it is loaded in the middle at x=L/2, you will get the maximum value, which makes sense because placing a load in the middle should result in maximum moment. With this equation, you can calculate the maximum moment in a beam for a given x and P.

The second reason why this is important is that this is a nonlinear function of x and P. This will become very important when we are computing the mean values and incorporate some statistics.

Step 2) Calculating Mean P and x

This part may seem trivial, but it is very important as I have observed that even students know what a mean value is, when the problem is presented slightly differently, they tend to struggle. You simply have to use the equation for calculating the mean for any random variable y

A fun thing here to mention is, this is similar to how we calculate centroids in statics. In both, in fact, the idea behind it is exactly the same. We weigh each point by how much it contributes to the overall and integrate. Similarly, variance have the same form with area moment of inertia, as they both measure average “distance” from a given axis.

For P, f(y) is the probability density function (pdf) for normal distribution. We already know the mean and the standard deviation, so this should give us E[P]= 50 kN, as we may expect.

For x, f(y) is the pdf for uniform distribution, which is 1/L or 1/12 in this case as each point along the beam is equally likely to occur. Integrating this between 0 and 12 will give E[x]= 6 m, the middle of the beam. Which is, again, expected, but it is good to confirm intuitions.

At this point, we can also use the MATLAB code to start plotting these variables

Histogram of P
Histogram of x

Step 3) Calculating Mean M

This part is fun. Here is why. We found E[P]= 50 kN and E[x]= 6 m. Remember that M=Px-Px²/12. The question is, can we calculate the mean value of M as M=50*6–50*6²/12=150 kN.m ??

I asked this to students and most said yes. Which was great because I feel like this is where learning happens! The short answer is no, we cannot, but let’s see why.

In general, if we have a function g, of two variables, x and y, we can calculate the mean of g(x,y) as

where [c,d] are the supports of variable x and [a,b] are supports of variable y. If x and y are independent, then we can further separate f(x,y) as individual pdf’s of x and y.

In our example, we have our equation for M, pdf of normal and uniform distributions. So we can write this expression as follows

Please note that in our case, L = 12 m, μ and σ are 50 kN and 12 kN, respectively, as they describe P. Sidenote: To solve this, we could write this as E[M]=E[P]*E[x-x²/L) as they are independent which may simplify calculations!

The crucial components of this exercise are the steps needed to write this equation combining both statics and statistics knowledge. Students have to understand that this is only true if p and x are independent. They also have to understand that our g is our moment equation, and we want to calculate it’s mean.

If you calculate this integral you will get that E[M]=100 kN.m and not 150 that we calculated before!!

Why is this? Well, let’s say we want to calculate the mean of x and x². By following the definition, we can see that the mean of x² is not simply (E[x])²

In fact, this is true for any function g(x). The mean of g is only g(E[x]) if g is a linear function of x. otherwise it is only a first order approximation. Because M=Px-Px²/L is not a linear function of P and x, our results are different!

This is an important finding that is worth repeating to students, as using the mean of variables for analysis is commonly done in engineering applications, but it may not be always appropriate.

Sidenote:

I think it is also worth mentioning that students can calculate this mean by sampling (see MATLAB code for details!). Just sample many x and P’s and then calculate M. The mean of the many M’s should be approximately 100.

This works because Monte Carlo (MC) simulations work, and the proof of why it works is a little heavy for sophomores. But the fact that we can approximate probabilistic variables by using many samples is worth repeating, as I think this is more intuitive to understand. Imagining 10,000 beams with various load placements may be easier to understand for some students rather than trying to understand what a random variable is. I think probability makes more sense when presented in the large number context. But this is my personal opinion of course.

There will be questions such as how many M’s should I calculate? I just said large enough, or around 10,000 for this application as convergence of MC is a little out of scope for what I wanted to do.

Step 4) Probability of M exceeding 150 kN.m

This part moves into the realm a reliability a little bit (not difficult but not something a sophomore learns in statistics), so I think it is best to not spend too much time on the details. But essentially, the same way students calculated the mean of M by sampling, they can calculate the P(M>150) by simply sampling. All they have to do is to count how many of the samples exceed 150 and the ratio of that to the total will give them that probability. You can easily use the provided MATLAB code to calculate that and find P(M>150)=18%. You can see the distribution of M below.

Distribution of M

A few notes here. M clearly does not follow a normal or uniform distribution. This is important to explain because sometimes students might expect that. M also does not go below zero, as expected.

I think this is one of the most important plots as it shows how structural engineering and design can take advantage of statistics to calculate probability of failure or calculate the average load on a member/structure, etc. The example is simple, but I think there are many extensions.

Main Takeaways

As I said in the beginning, I believe it is crucial that we try to connect as many engineering subjects as possible because real life problems usually require many different topics to approach and solve. The sooner we can teach that to the students, the sooner they can begin to start forming those connections.

PS: I gave the first few paragraphs to ChatGPT and asked it to give it a title. I think it did pretty well.

Extra Questions

I prepared some extra questions, some to be used in homeworks and others as extra credit. Feel free to use these as well. I will not provide their solutions as I will keep using them in class. here but feel free to reach out if you would like to discuss!

Question #2

The cantilever given is loaded with a load P=100kN. Location of the load, x, follows a uniform distribution between 0 and 10m. The angle, θ, follows a normal distribution with mean 0 and standard deviation π/8. Please

a) Write an expression for the maximum moment in this cantilever, in terms of x, θ, P

b) Write an expression for mean value of M, E[M]. Then calculate E[M] either by evaluating this expression or sampling.

c) Modify the MATLAB code covered in class (or sample using any other software such as Excel etc.) to calculate the probability of failure if the beam fails once reaches 800kNm. Please use at least 10,000 sampling points.

Visual for question #2

This question should be relatively easy to solve, after covering the first one.

Question #3

Beam IJ is supported by two ropes (DI and HJ) which are connected to a crane (truss). The crane is supported by pins at points A and B.

Beam IJ is subjected to a vertical load P_L and a horizontal wind load P_W. The beam sways with wind but the angle stays equal between the two ropes (as shown in figure)

  • P_L follows a normal distribution with mean=80kN and a standard deviation of 15kN
  • P_W follows a normal distribution with mean=0kN and a standard deviation of 20kN (it can be in both directions)
  • x follows a uniform distribution with range [0m,4m]

The maximum capacities for the members are given below. For all truss members and cables, capacity is in kN and same for both tension and compression. For beam IJ, capacity Mmax is in kNm and can be positive or negative.

Limits for members

Please find the probability of failure of this system. Please clearly indicate your final result as there are no partial credits. You must be within 1% of the actual probability of failure for full credit. Therefore, please use at least 10,000 sampling points.

Visual for question #3

I asked this question as is and there were no successful attemps. For the next semester, I gave the students a started code in MATLAB and just asked them to fill in the blanks to make it a little easier. This problem is quite different than the first two, so I believe some help, especially in the coding part is necessary.

--

--

Egemen Ökte

Machine Learning, Data Science, Pavement Engineering