Become a Creator today!Start creating today - Share your story with the world!
Start for free
00:00:00
00:00:01
68: LOL!!! SO RANDOM (Random Variables) image

68: LOL!!! SO RANDOM (Random Variables)

Breaking Math Podcast
Avatar
655 Plays3 years ago

The world is often uncertain, but it has only been in the last half millennium that we've found ways to interact mathematically with that concept. From its roots in death statistics, insurance, and gambling to modern Bayesian networks and machine learning, we've seen immense productivity in this field. Every way of looking at probability has something in common: the use of random variables. Random variables let us talk about events with uncertain outcomes in a concrete way. So what are random variables? How are they defined? And how do they interact? All of this, and more, on this episode of Breaking Math.


Interact with the hosts:

@SciPodSofia

@TechPodGabe


Or the guest:

@KampPodMillie


Patreon here: patreon.com/breakingmathpodcast


Featuring music by Elliot Smith. For info about music used in ads, which are inserted dynamically, contact us at breakingmathpodcast@gmail.com


[Featuring: Sofía Baca, Gabriel Hesch; Millicent Oriana]



Recommended
Transcript

Introduction to Probability and Statistics

00:00:00
Speaker
The world is often uncertain, but it has only been in the last half millennium that we've found ways to interact mathematically with that concept. From its roots in death statistics, insurance and gambling, to modern Bayesian networks and machine learning, we've seen immense productivity in the field of probability and statistics. Every way of looking at probability has something in common, the use of random variables. Random variables let us talk about events with uncertain outcomes in a concrete way. So what are random variables?
00:00:29
Speaker
How are they defined and how do they interact? All of this and more on this episode of Breaking Math, episode 68, LOL So Random. I'm Sophia. And I'm Gabriel. And this is Breaking Math.

Guest Introduction: Millie Oriano

00:00:49
Speaker
And with us, we have on Millie Oriano, who's a host of the Nerd Forensics podcast.
00:00:53
Speaker
Hello, and I'm happy to be on you guys show again. If you haven't heard, I'm the host of Nerd Forensics. We discuss things like why Transformers was made the way it was and stuff like that. But you know, we try to keep it smart.
00:01:10
Speaker
I think nerd forensics is actually a very good is the word palette cleanser for breaking math. Breaking math, of course, we talk about very deep topics about mathematics and engineering and science and the physical world. And it nerd forensics is lighter. It's made by the same folks. Well, of course, you know, too.
00:01:28
Speaker
Yeah, maybe the same folks. I mean, you've probably heard my voice on a lot of advertisements lately. Yes. Breaking that. I have continuously told this is a quick little side tangent. I've continuously told Millie that she needs to go into professional advertising. I think your voice is so good for it. So this is just me giving you a little plug and a vote of confidence on the show.
00:01:46
Speaker
So for our breaking math listeners, obviously there's more to life than just math and empiricism, believe it or not. And Nerd Forensics is a chance to hear some deep dive analysis about pop culture and even some niche facts that you may not know about Batman or Power Rangers or Star Trek or anything niche at all.

Nerd Forensics: A Pop Culture Dive

00:02:09
Speaker
or failed presidential assassins if you're history buff. Yeah. So, uh, again, I just wanted to put that out there and I suggest that you all give it a listen for a nice, uh, for a change of pace and some interesting facts that you may not know. Oh yeah. And what's your latest episode about again? I mean, I was on that one. Uh, the latest episode is called episode four, a new Pope, and it's about how Mel Gibson and his father tried to start their own Catholic church.
00:02:33
Speaker
Yeah. And just for listeners who are thinking about this show, it's great. I recommend it just for anyone out there who might be a little bit young. It is explicit. So, you know, avoid that. Yes. I like the fact that we're talking about random variables and that show itself seems quite random as well. So can I encourage our listeners also send us your favorite random topic that we may wish to talk about or that you'd like to hear us talk about on nerd forensics?

Understanding Random Variables

00:02:56
Speaker
Who knows? Perhaps we'll just do it. Oh, yeah. Actually, I had some guy ask about basketball earlier.
00:03:03
Speaker
on my messages and we're going to do an episode about David Robinson and the 92 dream team. Nice. Nice. All right. So now we're going to talk about random variables. And Gabriel, I know we've talked about random variables on the show before in passing as part of a statistics, but I thought we'd, you know, go into random variables per se. So Gabriel, during your graduate degree in electrical engineering, did you ever run into random variables?
00:03:29
Speaker
Oh, absolutely. Absolutely. This was one of the hardest classes. I feel like I say that about all my classes and I'm not meaning to scare away any engineering students. No, no, it's great. It's great. It's a great class. But yes, we had classes in stochastic methods. Goodness. I'm trying to think of the name of the class. It was a huge part of one of my classes. In fact, the class where I wrote a program to simulate the Monty Hall problem. We use these every single day in that class.
00:03:57
Speaker
Oh yeah, and Millie, have you heard of a random variable? Yes, I've heard of a random variable. And what's your experience with that term? My experience with that term is random variables basically constitute things that can happen in life at random, like winning the lottery. That's a random variable.
00:04:19
Speaker
See, in the field of probability and statistics, it has a very similar meaning. But what it is, is it's a way of relating outcomes with probabilities, right? Well, I mean, that's more of the technical definition, but an example of a random variable would be the outcome of a coin toss, right? Yeah. Or like you said, the winner of a lottery could be a random variable, right? So the social security number of the winner of the lottery could even be the random variable that you could define it as an integer, you know?
00:04:49
Speaker
Yeah, exactly.

Types of Random Variables: Discrete vs Continuous

00:04:51
Speaker
So yeah, coins and dice are examples of discrete random variables because they each have one outcome, right? Coins either heads or tails. Dice is one through six, but you don't get like you can't roll pie. Yeah. Well, I mean, not entirely one through six. It might be, you know, you might have a D 60, D 30. Oh, yeah. Well, yeah. Do you have a certain range of numbers? Right. Yeah. You'll have a certain range of numbers.
00:05:17
Speaker
But there's not an infinite one, which is in contrast to continuous random variables, which have an infinite range, so like a spinner basically. You know, I kind of noticed this is like the last episode I was in, but we're not going to be talking about anybody being, you know, gruesomely like killed.
00:05:34
Speaker
Oh yeah, you have been on two episodes that are about kind of like probability and statistics. Yeah. Oh goodness. Yeah. Anyways, to keep us on task here, other examples of continuous random variables, things like height, obviously.
00:05:48
Speaker
Oh, yeah, they are like the height of a population. Yes. Yeah, and that is actually also a bell curve. Well, that's what's called colloquially, less colloquially a standard normal distribution. But we'll talk about that in due time. And of course, there's mixed random variables, which can be seen as a sum of a discrete and a continuous variable. And this is something like, let's say you had a die, but if it rolls a six, then you flick a spinner.
00:06:15
Speaker
and then you use that as the outcome. That would be a mixed random variable. Or if you had a population you wanted to measure their height versus their sitting height versus their standing height, people who either couldn't stand or didn't have legs, the difference would be zero. So there'd be a bunch with that one difference in height, but then everything else would be a real number.

Random Variables in Pop Culture

00:06:36
Speaker
If you are a blue collar worker in New York, in the Marvel universe, and you lose your job, there is a 100% chance that you're gonna take it out on Spider-Man.
00:06:46
Speaker
And that's actually, you can actually view each person, each blue collar worker, right? You can actually model that as a random variable, right? As a Poisson process, something that's continuously likely. So everybody has a certain likelihood of being fired. And when they are fired, each one of those events, which are distributed evenly, will be times that Spider-Man has to fight. So the expected value of the amount of people that Spider-Man has to fight in a given week
00:07:15
Speaker
can be calculated using random variables. And we'll talk about those kind of methods. Wow. His life must really suck if he just has to fight every unemployed blue collar guy in New York. My goodness. Yeah. Is he a friend of the working people? He is a friend of the working people. It's just OK. It's totally you remember that guy from the jerk that just lost his job and decided to kill Steve Martin for no reason. Oh, yeah. That's basically what they all do to Spider-Man or New York.
00:07:43
Speaker
That's right. In the case of Venom in the original series, didn't Eddie Brock? That's exactly what happened. He lost his job. His job as a journalist. He lost his job as a journalist. And then you have. Yeah. Yeah. Just you lose your job. You go after Spider-Man. That's the first thing you do. It's like a mental derangement. People in New York have. Yeah.
00:08:06
Speaker
All right, so how are random variables defined? So they're written like any other variable, like x, y, whatever, z. But a measurable function is how they're actually defined. So what a measurable function, we've talked about measure theory before, and we can't really go totally over it. But you go from one space to another. The function maintains a measurability. So basically, outcomes are distinct from one another. So they are discretely measurable.
00:08:35
Speaker
Yeah, so for example, let's say that there's like a 10% chance of rain tomorrow, 2% chance of snow and 88% chance of sunniness. And that one isn't from, you know, like, it's not from numbers to numbers. It's from a cat, like a list of things to numbers from a set to numbers, right? So the thing about random variables is Millie. So if there's a 10% chance of rain and a 2% chance of snow, what's the chance of either rain or snow?
00:09:05
Speaker
12%. Right. Yeah. I mean, that's one of the things about a measurable function is that since you're adding outcomes together, you also have to add their measures together because the measure of any individual outcome is that probability of that outcome. And the measure of a group of those is the measure of its union where a union is basically everything that either one or both encompasses.
00:09:30
Speaker
You know, it kind of makes me think about that book of swindles that you showed me, the Chinese book of swindles, um, with like all the people in ancient China. Cause this sounds like the kind of scam they would run where they'd bet somebody on the weather and they would be using it to like blindside him with something else. They'd just keep losing every day. It's sunny. And then like, yeah. Also, I think your mind is on that because we've been listening to behind the bastards where they talk about grifters continuously. Yeah. And also that book of swindles, I'm just imagining somebody like gambling on the weather now.
00:10:00
Speaker
Yeah, they just get enough people to gamble everyday for rain.
00:10:03
Speaker
Yeah. And then they just like they're like, you know, just robbing them blind. Well, they're actually gambling. They're like breaking into their houses. So it seems like it's going to be like a convoluted mathematical scheme. But then it just turns out to be just theft, theft, just theft. Yeah. Well, I mean, it works. I mean, and that book you showed me people that like stole cloth and like would like claim they were catching a thief by stealing the cloth from the guy's store.
00:10:32
Speaker
Oh yeah. Yeah. Um, Gabriel, have I shown you the book as windows? No, that sounds like a great book though. And it's basically steal this book from the 17th century China. Okay. Whoa. Interesting. That'd be a great episode for nerd, nerd forensics. I think that would do very well.

Historical Grifters and Gambling Scams

00:10:45
Speaker
It would do. Yeah. I think we should definitely do an episode about the book. We're actually planning on doing an episode about the three kingdoms, the war of the three kingdoms pretty soon.
00:10:52
Speaker
OK, cool. I'm not even aware of that. I'll look forward to hearing that one as well. And then China, in ancient China, they used a lot of dice, and dice are part of random variables, which is what we are talking about to segue. Take us back home. Yeah, take us back home. But no, definitely. So I'm just going to say that a die is an example of a random variable that you could go from numbers to numbers, right? Yes. Because if you have a D20, each
00:11:18
Speaker
Probability through 1 through 20 has a certain likelihood, right? Yes of 1 20th. Yep. All right. Now we're gonna talk about real valued random variables So real valued random variables is we're gonna talk about next and they're defined on the real line right from negative infinity to infinity they usually talked about in terms of their probability density function and what the probability density function is is like Okay, like million, you know bell curves, right?
00:11:46
Speaker
Vaguely yeah, it's like it's like um so like for height about the bell curve so like the the the horizontal the x-axis Yes, I would be like the height so like at around like 5 foot 8 for for at least Like women in the United States. I believe there would be a small bump like that. You know I mean yeah, I
00:12:08
Speaker
The value of the probability density function is the relative likelihood that someone has that height. Because you can think about each value is like, so the likelihood isn't how far it is up on the bell curve, because for that to be true, you'd have to be like, okay, this person is exactly this many feet, this many inches, and this many nanometers, and this many everything high, right?

Probability Functions and Integrals

00:12:30
Speaker
Yeah. Because if you think about it, it's an exact height and nobody is exactly the height that somebody else is, or that somebody else would even guess that somebody is, right? Because if it's a random variable, then you'd have to be like, okay, this person's exactly like six feet, one inches and like 930 point, whatever nanometers, etc.
00:12:48
Speaker
I've seen a man at the carnival do that. Let's actually look at that. So to look at that, I'm gonna weave in the cumulative density function and the standard normal distribution. So the standard normal distribution is basically the bell curve, right? So for height, it would be like, you know, you'd see a bump at whatever, like, you know, five foot eight for American women.
00:13:08
Speaker
Yes. Let's say that you're a really, really lazy carny, right? Yeah. And you say, I'm going to guess everyone's height within one and a half inches or else you enterprise. So one and a half inches happens to be actually what's known as the standard deviation for height and women about.
00:13:25
Speaker
So what that means for a bell curve is that there's a, we've talked about on the show before, but it bears repeating, is called the 68, 97, 99.7 rule. Meaning that 68% of everyone is between negative one and one standard deviations away from the average, right? Yes.
00:13:45
Speaker
So what that would mean is that about 68% of people or about 70% of people are away from the average height. So if you make the prize worth just a teeny bit more than the entry fee, you could actually just keep guessing the same height for everyone and make a profit. Oh, interesting. Wow.
00:14:08
Speaker
Yeah, you'd just be like five foot eight? No, okay. Five foot eight? But I mean, so yeah, you could have somebody be like, you know, a completely blind hight teller. Oh, I get it now. It's a scam.
00:14:21
Speaker
Alright, we could also do a couple more things with a random variable defined on a real line. We could also do the expected value. And that's the value that is most likely or average to come out of a random variable. So for height, it would be basically the average of everybody's height because a bell curve is the same on both sides. To give a more concrete example,
00:14:44
Speaker
If you wanted to guess something that is the least far away from any random die roll, what number do you think you would choose? So like 2.5, even though you'd never get that. Something like that. But, um, yeah, what do you think? I just go with three since the mean.
00:15:00
Speaker
Yeah, well actually you're very close. The mean is actually one plus two plus three plus four plus five plus six. We actually will use the mean in this case. And the reason why is because the expected value is actually just the mean. Oh, really? Yeah. So basically it's one times one six plus two times one six all the way to six times one six, which is twenty one six, which is three and a half. I meant to say three and a half earlier, not two and a half. Sorry. I was close to the smart people. I was close to the smart people.
00:15:30
Speaker
Bye!
00:15:35
Speaker
Now that we know about expected value, right, because expected value is just some of the random variable times the domain variable, right? So like x times f of x, does that make sense? Yes. Yeah, so with continuous random variables, we use an integral. An integral is just a way of talking about chopping up a function into an infinite number of slices and then adding the area together under the function.
00:16:03
Speaker
So the area under the bell curve, the entire bell curve is always one on any bell curve. And can you guess why? Based on what we've said so far? Because that's the margin of error. Actually because if you think about it, you add together outcomes to get the total outcome, right? So the probability of something happening if we expect something to happen is one, right? Okay, yeah. And that's why. Yeah, okay, now I get it. I get it now.
00:16:31
Speaker
And don't feel bad for not getting it immediately. So that Spiderman thing, the bell curve would be one. Yeah, the probability that the probability that he'll have to fight anyone over time is one. Yeah, because I'm sure he just gets like shot at randomly. Like some days gets bricks thrown at him. And then that's the last time he deals with that guy. And each show one of those can be modeled as a statistical random variable. You could model the bullet as a random vector.
00:16:59
Speaker
Made out of random variables you could model whether it hits as a random variable. It's basically a weighted coin that and you can actually model it for either criminals as a whole or for each criminal individually the average amount of times they hit spider-man Well, that is a fun problem. I like it
00:17:18
Speaker
And of course, we have variance, which is the expected value that the random variable deviates from the expected value, square the difference of that random variable. Does that make sense to everyone? Yes, it does. So it's basically how far away from the mean on average. So for a die, OK, so the standard deviation of a die, for example, is you take how far away each one is from the expected value. So what's the expected value again? 3.5.
00:17:47
Speaker
Yeah, so one is two and a half away, two is one and a half away, three is half away, four is half away, and so on. And it turns out that if you add up the squares and divide by the amount of samples that are total, you get 17.5 divided by six, which is 2.916.
00:18:03
Speaker
So now we're going to talk about how to add two random variables together.

Adding Random Variables and Convolution

00:18:08
Speaker
If x is your first random variable and y is your second one, it's just known as x plus y. The expected value of this is the sum of the two expected values. So here's an example that we can give is with two dice, right? So if you throw two dice, do y'all know what the most common die roll is? Either. No, no, I don't. Well, check it out. How many ways are there to get with two dice? How many ways are there to get the number two?
00:18:32
Speaker
Oh, there's only one. You met with two dice. Yes. Yeah. Just one way. The most common I'd have to say is probably seven. It's probably seven. Yeah, it is actually. Yeah. Yeah. Because it goes to has one way. Three has two ways. Four has three ways, et cetera. But also twelve only has one way. Eleven has two ways. And those two numbers come together at seven. And if you crunch the numbers to get a two with two dice, you have about a two point eight percent chance.
00:18:58
Speaker
But to get a 7 you have about a 16.7% chance. Which I think is kind of fascinating. And the way that you do this, the way that you can represent this mathematically is known as convolution. So Millie, how familiar are you with the integral?
00:19:16
Speaker
not okay so basically what an integral is is it's like if you if we have a function is the area beneath a certain portion of the function right yeah so like if we have a line that's going zero zero at one it's one at two it's two etc right yeah if we put a wedge at one right it'll be a triangle that's one on each side right yeah
00:19:39
Speaker
And the area of this triangle would be half of the area of the square, right? That encompasses it. So the area would just be one half, which means that the integral of this line from zero to one is one half. Okay.
00:19:53
Speaker
And we talked about a tiny bit earlier and that's what we, that's the operation that we used for continuous random variables. So if we wanted to, if, if we have a function that represents our probability density function for height, if we want to know how many people are between four foot seven and five foot one, we take the integral from four foot seven to five foot one of that function. Okay.
00:20:14
Speaker
So, does that make sense? Kind of like a sum? Yeah, totally. Yeah, it's like the sum. Yeah. So, the convolution of two functions, the way that that's done is kind of interesting. Do you know what it means to multiply two functions? No, I do not. I mean, I do, but it's been like 15 years, so I don't.
00:20:34
Speaker
Oh yeah, so this one's actually super simple. The value of f times g, where those are two different functions, at some point x is just f at x times g at x. So you just multiply the graphs together at each point. And the convolution of two functions f and g is a brace for this. So you have your two functions, right? Let's say you graph them on the same line, so you have these two different functions. You flip one of them around.
00:21:03
Speaker
And then you multiply them and then that's your value at zero. You move the function over to like one or whatever, then you multiply them, you take the integral over the whole thing, that's your value at one. So it's basically like you slide this function over and you calculate the product at each point. And that's known as a convolution.
00:21:25
Speaker
okay i get it now and that's what you actually were doing that's what we were actually doing with the dice earlier because um if you think about it if you have like um if you put every number from uh two to twelve on a piece of paper and you just tally each one up you tally two three four five six then you tally three four five six seven then you tally four five six seven eight
00:21:45
Speaker
And you keep telling six things each time and you'll get the distribution 1 2 3 4 5 6 5 4 3 2 1 With 6 at on like you said the most likely value which is 7 and a convolution so the in the formula for anyone out there who wants to know is the integral over the real numbers of f of z times g of x minus z dz
00:22:11
Speaker
where x is the point at which we wanted to know the convolution. And discrete convolution is just the sum of the two functions. So it's just either the sum or the integral. And so the cool thing about the convolution, this is why I made sure to bring it up so much, is because let's say we take any random variable, right, whatsoever, and we convolve it with each other with itself enough times. No matter how spiky it starts off, it'll eventually turn into a bell curve.
00:22:40
Speaker
And believe it or not, that's deeply related to just the idea of probability as a concept, like the idea that there's an expected value of anything at all or that probability can be measured. We'll talk about that deep relationship at another episode, I think, too. But yeah, I thought it'd be worth touching on. So now we're going to talk about functions of random variables in general.
00:23:07
Speaker
So the function of a random variable is like you apply a function to the outcomes. So for example, you could have like, you know, y be one random variable and that you could say that's equal to x squared, right, where x is another random variable. And it's like the height thing where you add them two together, but now you're squaring things. But it turns out that to get the new probability density function, it's actually a little bit more convoluted than you might think.
00:23:33
Speaker
So the cumulative density function, right? Let's say that we have y equals g of x, right? And that the inverse of g is h. Millie, do you know what a functional inverse is?
00:23:44
Speaker
functional inverse, it's the opposite of something, right? Yeah. Basically, it's basically how you get back to where you got started for positive numbers. The inverse function for squaring is the square root. OK. Because it takes you back or like the inverse function for X plus three is X minus three because X because three plus three is six, but then six minus three is three. So you get back to where you started. OK.
00:24:05
Speaker
So you have the property that the function of the inverse of that function of some value x is always just x.
00:24:17
Speaker
Okay. So, and there are some functions that aren't invertible, but we're not going to be talking about them in this section because they'd require a little bit too much fussing and there's actually a pretty good Wikipedia article on that. But the cumulative density function of y, which is equal to, like we said, g of x at some point is equal to the probability that g of x is less than or equal to y, where x is the random variable that we're operating on. Is it clear why that's the case? Not entirely.
00:24:45
Speaker
So the reason why that's the case is because the cumulative density function is the probability that a value is less than a certain other value, right? Yes. And since we're doing the cumulative density function with respect to y, but we're doing a function on y, above y is a function on x, we need to apply the function that we are talking about.
00:25:03
Speaker
to X to make sure that's less than Y. So basically what we're doing is we're transforming the numbers from X space, X is kind of like space into Y space. So let's say we're doing like a relationship between like heights and BMIs. So we're translating from heights to BMIs and then we're just doing a new function based on that. Okay, yeah, and you'd inverse the two to see, okay, I get it now.
00:25:26
Speaker
Yeah and it turns out that the cumulative density function if it's increasing is just equal to the cumulative density function of y is equal to the cumulative function of in x's domain of the inverse function of g which is h of y. So you have f of y of y is equal to f of x of h of y.
00:25:48
Speaker
Which you know nobody needs to actually be able to remember that from speech but um, oh and and you just take you just take that value and you subtract it from one if h is decreasing Okay, but yeah, it's so but it turns out that if you want the probability density function on you just take the derivative of that and And Millie that the derivative is just the opposite of the integral. Yeah, so it's how fast something is changing versus The total value sum over time. Okay
00:26:18
Speaker
And so basically you have the probability density function of y is equal to probability density function of x of h of y. So basically you plug a function into a function.
00:26:30
Speaker
And then you take that and the multiple like that by the derivative of H with respect to Y. So, um, yeah, just, uh, I just thought I'd bring that up because, um, it's kind of weird to work with random variables sometimes because of how you think that just adding, you know, random variables would be easy, but then it's like, okay, the standard deviation is not just the sum of this two standard deviations, but you have to also add in their covariance and things like that. Yeah. Yeah. Oh yeah. I get it.
00:26:59
Speaker
So now we're going to talk a little bit about representing discrete random variables on the real domain.

Advanced Functions: Dirac and Heaviside

00:27:03
Speaker
So Gabriel, do you remember from grad school dealing with operational calculus? Oh, gosh. Brings me back. Yes, I do. And do you want to go over the Dirac function? Yes, absolutely. Dirac function. This is a very brilliant physicist, Paul Dirac. So basically, this is a function where it is on a line. It's infinity at zero, and it's zero everywhere else.
00:27:27
Speaker
Now the integral over the real line is defined as one. So basically, does that make sense so far?
00:27:35
Speaker
Yeah. And so if any of our listeners are having trouble following just to sum up, right, Gabriel, what you said is that this function is infinite at zero. It's not actually, you know, it's just this imaginary infinite value that has, it's basically, you could think about it as like a rectangle that's infinitely tall and zero wide, like one by one rectangle. So Gabriel, what if we want to move the direct function over?
00:28:01
Speaker
Oh, yeah, you can do that. Just simply add a minus whatever. How many degrees in x you want to move it over? Oh, yeah, yeah. So if you want the infinite part to be at, for example, 1, then we use Dirac of x minus 1. Exactly. And if we wanted the sum of over infinity to be like pi, we'd use pi times Dirac of x, right? Yes.
00:28:28
Speaker
Now, just so as to not make the same mistake that we often do, or the rather that I complain about that's done in math education, is where you explain what a concept is, but then you don't explain, well, why did Dr. Dirac think that the world needed this function? What's the purpose of it?
00:28:42
Speaker
Well, what's cool is that we could actually use this function to represent discrete random variables on the real domain, right? So like, for example, let's say the probability of we want to roll something less than a three and a half. If we had an infinite spike at one, two, and three, and each of those infinite spikes had a integral of one sixth, an area of one sixth, right? If we took the sum of everything together, we'd get one half, right? Yes.
00:29:09
Speaker
And so that allows us to talk about these integrals in terms of like steps. So it allows us to model steps. So for example, this heavy side step function is just the integral of the Dirac function. So it's zero from negative infinity to zero and then it's one onward. And Gabriel, you're actually talking about the stepped functions earlier. That can be represented as different heavy side functions. I mean a summation of heavy side functions.
00:29:36
Speaker
He's a very interesting guy to read about. I believe he was almost homeless most of his life, in fact. Oh, was he? I didn't know anything about Heaviside. Yeah, his brother was a very famous businessman in the world of electrical engineering, and he was often characterized as sort of a misfit. He wanted very little to do with business affairs. Yeah, and he was a brilliant mathematician, but just had a real hard time fitting in. Oliver Heaviside was his name. I have an entire book on him in my house, actually.
00:30:03
Speaker
And by the way, so if we wanted the distribution of two dice summed together, we could actually convolve using the integral formula from before. So then we get this fun-looking function, which is that the probability density function of two dice summed together is equal to the integral from negative infinity to infinity of the product of the sum from i equals 1 to 6 of the Dirac function of z minus i
00:30:26
Speaker
And then you take that summation and multiply it by another summation from j equals 1 to 6 of Dirac of z minus x minus j, d of z. Which is, I just think it's fun because it just looks so impenetrable. And yeah, but what that function will look like, the way that I
00:30:42
Speaker
graph the Dirac function when I'm graphing it actually is I just draw a line up to the number that it's talking about like a vertical line and I draw an x at that point and I just remember that that means Dirac function is infinite there but it has but it's multiplied by like for example two
00:30:59
Speaker
And so using this notation, you would just see, it would just be a spike at, it would be a little spike at two, then a bigger spike at three, four, five, six, five, four, three, two, one, basically. And yeah, if you wanted to work that out even further, it's left as an exercise to the reader. Yeah, I mean, it'll be kind of fun to do though. You might learn a thing or two about operational calculus during it, and you will need to know summation arithmetic.

Conclusion: Random Variables in Daily Life

00:31:25
Speaker
Random variables are a concrete way of talking about what might happen. They also allow us to interact with statistics that we have gathered in ways that can be analyzed mathematically. We interact with random variables every day, from how long it'll take to get to where we're going to who you'll see first. An intuitive understanding of random variables, at least to some degree, is therefore needed to interact with our world. If that weren't the case, then there would be no surprise or boredom.
00:31:50
Speaker
I'm Sophia. And I'm Gabriel. And this has been Breaking Math. With us, we had on our guest, Millicent Orianna. You want to plug your pluggables? Of course I want to plug my pluggables. I am Millicent Orianna, host of Nerd Forensics. And you can catch me anywhere you get this podcast. Just look up Nerd Forensics. You can also contact me at Twitter at Camp Pod Millie. And that's Camp with a K. Thank you.
00:32:14
Speaker
Any thoughts from either you about random variables after this episode? This lends itself very well to discussions both on critical thinking, skepticism, as well as many other fields with understanding and modeling our universe. Hopefully we'll do some great problems episodes that involve statistics and stochastic methods.
00:32:32
Speaker
Oh yeah, I know that the guy from Math with Bad Drawings, right? Oh, and we've had a couple of books that have a lot of stuff about the psychology of probability actually. That might be an episode that we get to at some point. Don't want to promise anything because in the past I've said we're going to do an episode and then we haven't done it before and I don't want that to happen again, but it's definitely in our thoughts. That's a statistics problem in and of itself. What's the probability that we're going to do an episode on probability? You know, a meta self-aware thing here. Tune in and find out.
00:33:00
Speaker
Or don't, if it's not too inevitable. But yeah, mentally, any final thoughts? I don't know why, but just all this talk of probabilities made me start thinking of ancient China, Chinese warfare, and for some reason I'll start thinking about people getting hit by random objects from space.
00:33:17
Speaker
Oh, I know actually a fun fact about that. There's an XKCD that points out that if you're a 30 percent free throw shooter, then the odds will be even for you making 30 shots in a row versus a meteor falling through the hoop. Isn't that kind of interesting? Yeah. Yeah. So if you have a higher free throw percentage, then it's different. But yeah, if you want to play basketball against a meteor, good luck scoring or even knowing who wins before anyone dies. Yeah.
00:34:21
Speaker
This is Sofia Baca and this has been the death cast.