Thursday, May 25, 2023
Some perspective for students on these times and how to reflect about life in the classroom
Algorithms, big-O and number theory
Tuesday, April 25, 2023
Sequences, series, Zeno's Paradox and Donald Duck
Friday, April 14, 2023
Cross Validation lecture for joint BYU-City Tech undergraduate data science seminar
Today, I delivered a lecture on cross-validation and Bootstrap, which are resampling methods used to evaluate machine learning algorithms' test error. I based my lecture on a resampling chapter from Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani's book, "An Introduction to Statistical Learning: with Applications in R" (2013).
During the lecture, we first discussed the bias-variance trade-off and how the training error cannot accurately predict the testing error as the model's complexity increases. We then explored the performance of various ways of spltting the data, such as splitting the data into two equal parts and performing leave-one-out splitting.
Next, we discussed k-fold cross-validation, which involves splitting the data into K subsets of equal size, and iteratively selecting a validation set and training on the remaining folds K times. The cross-validation score is the weighted average of the mean squared error (MSE) for each fold. We demonstrated an experiment with 10-fold MSE and found that K=5 or 10 is a good compromise in terms of the variance-bias trade-off.
Finally, we discussed an example of two-class classification with 5000 predictors and 50 samples, where the wrong way to perform K-fold CV was to apply it after filter 1, while the right way was to apply CV on both filter 1 and filter 2. We stressed the importance of understanding the correlation between each K-fold split and the variance-bias trade-off in determining the optimal choice of K for the CV folds.
Overall, the lecture was well-received, and there were many interesting questions from colleagues and students. This is a topic that is frequently discussed in data science forums, and it is important to emphasize the importance of balancing the variance-bias trade-off and the impact of data splitting on the results of cross-validation.
![]() |
| Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani's book, "An Introduction to Statistical Learning: with Applications in R" (2013). |
Thursday, April 6, 2023
Functions before Spring break!
So here we are, a few days since our last class in the middle of Spring break. I announced that I was pushing the exam to the Wednesday after Spring break. I could perceive the joy after the news.
This Monday 4/3, we continued talking about functions. We stressed key definitions related to functions such as:
- domain
- codomain
- range
- image
- preimage
- one-to-one functions
- onto functions
- bijection
- inverse functions
![]() |
| https://www.teacherspayteachers.com/Product/Spring-Break-Math-Practice-Packet-Common-Core-Aligned-622786 |
Wednesday, March 29, 2023
More sets...math in our minds during the Spring break!
So today I was on the bus and the subway reflecting about the best review exercises for the exam I was supposed to give this coming Monday...right before the long Spring break. I noticed that we have just discussed the basics of sets. So today I decided that the exam will be on Wednesday after Spring break.
I wanted to give students the opportunity to mature the different methods to prove a proposition, and also finish with the section of sets to then start such an important topic as functions. The student felt relieved after I made this announcement (I did not have big expectations since sometimes they don't want to study during breaks.)
We had a simple class activity where two sets A and B were given (as well as a specific universal set U) and the questions consisted of finding intersections, complements, differences, etc.
I was able to at least introduce functions and examples of a function mapping the set of students in a class to the set of final grades. They agreed that we can't assign two different grades to any particular student we choose.
Well, this is taking the classic path: domain, range, one-to-one, onto, bijections, etc., etc.
It brings so peace of mind to know that the class will have math preset during the Spring break.
Monday, March 27, 2023
End of induction..."it's cold or hot, not lukewarm", sets and "The Fly in the Ceiling"
Another Monday. Many of us were on campus before 7:30 am. The subway was not bad, I enjoyed my reading.
Some students arrived with a cup of coffee in hand.
We continued discussing mathematical induction. I asked them what they remember about proving by induction. Phrases such as basis step and inductive hypothesis were heard.
We picked up on the example we left of proving the formula for the geometric series. Everyone got that P(0) was true.
The step of using the inductive hypothesis P(k) to show P(k+1) was explained several times. We wrote the inductive step on a green box and what we needed to prove P(k+1) on a pick box (yes, with my colorful Japanese chacks.) I then stressed that if they really understand that they need to use the inductive hypothesis to show P(k+1), they pretty much got the concept. I encouraged them vehemently to ask questions now, in the present. One student said that he was trying to understand how I used the formula of the inductive hypothesis on the sum involved in P(k+1). I explained it, and he said "ok, so so". I replied that "this step has to be hot or cold in terms of understanding, not lukewarm" This is something that you either understand or you don't. I believe this shocked them somehow, but in a good way. I also asked: "would be able to reproduce this proof in the future without memorizing it?". Once I got an affirmative answer from the class, I did not move on.
I started introducing the basic definition of sets and then:
- empty set
- power set
- size of a set or cardinality
- finite and infinite sets
- Venn diagrams
- Cartesian products. Mentioned Rene Descartes (sorry for missing the accents), yes! Remember this book for children's book "The Fly on Ceiling"...it would be nice if I can get some copies for them!
- Operation of sets (unions and intersections)
![]() |
| https://www.mathsthroughstories.org/the-flying-on-the-ceiling-reneacute-descartes.html |
Swimming, Statistics, and the Normal Distribution
As we enter the final stretch of our accelerated summer statistics course, I find it hard to believe that there are only seven class mee...





