WEBVTT 1 00:00:03.718 --> 00:00:07.709 Afternoon probability people. 2 00:00:07.709 --> 00:00:13.648 Okay, you had a good weekend. This is whatever it is. 3 00:00:13.648 --> 00:00:26.190 Last 22, Monday, April 19th, 2021 by the way, I, sometimes I get these dates these numbers wrong engage wrong. I eventually correct them. So. 4 00:00:26.190 --> 00:00:33.299 And I have a chat window open, so if you can hear me, could somebody. 5 00:00:33.299 --> 00:00:37.920 Just type a note and saying yes or whatever. 6 00:00:37.920 --> 00:00:40.950 Can you hear me. 7 00:00:42.479 --> 00:00:50.399 So, here me share work. 8 00:00:53.640 --> 00:00:57.780 Good and then you can see my screen. 9 00:00:57.780 --> 00:01:07.200 And I got to check and today I want to show you some Mathematica is enrichment material. There will be no exam question on it. 10 00:01:07.200 --> 00:01:19.349 But I'm using my hour as the course feature you, some stuff that I think is well worth your time. 11 00:01:19.349 --> 00:01:24.959 Does that mean Nicholas? 12 00:01:24.959 --> 00:01:30.420 That you cannot see me, or you cannot see the screen share. 13 00:01:30.420 --> 00:01:34.349 Or is it just you, it was just me. 14 00:01:35.489 --> 00:01:41.250 Went on here. 15 00:01:41.250 --> 00:01:46.109 Let's see. 16 00:01:48.780 --> 00:01:57.030 You say they're starting to show content. Let me stop and start again and see what's going. Let me just try 1 application. 17 00:01:57.030 --> 00:02:00.090 Let's see what is going on here. 18 00:02:01.620 --> 00:02:14.310 Just 1 window. 19 00:02:17.009 --> 00:02:23.759 See, you see the open window here. 20 00:02:23.759 --> 00:02:31.740 It should say, no engineering probability class 22. it's the window. It's my Firefox window. 21 00:02:31.740 --> 00:02:37.590 To the course blog, you cannot. 22 00:02:37.590 --> 00:02:42.090 Cannot see okay on. 23 00:02:45.534 --> 00:03:00.264 Quickest thing for me to do is I'm going to log in and log in again and maybe that will clear. I don't know if it's on my end. I don't know if it's on your end. What I'm going to do is log out and logged in again and we will see what happens. It's tapped out. 24 00:03:00.599 --> 00:03:04.500 So, we'll start out again later. 25 00:05:08.939 --> 00:05:14.788 We want again, I'm thinking that Cisco Webex was overloading itself. 26 00:05:14.788 --> 00:05:19.048 So. 27 00:05:19.048 --> 00:05:22.079 Let's try this 1 again. 28 00:05:24.178 --> 00:05:24.298 Okay, 29 00:05:24.353 --> 00:05:39.713 Eva. 30 00:05:41.338 --> 00:05:45.298 Take an attempt. 31 00:05:48.809 --> 00:05:53.639 Okay, I'm trying to share the whole screen now again. 32 00:05:54.838 --> 00:06:01.468 Can you hear me obviously, and if you can see my shared screen. 33 00:06:01.468 --> 00:06:05.399 Can, um. 34 00:06:05.399 --> 00:06:08.519 Silence. 35 00:06:11.459 --> 00:06:17.519 And you can hear me, but we're waiting on the screen. 36 00:06:18.569 --> 00:06:25.288 Okay, okay. 37 00:06:25.288 --> 00:06:37.228 Screen okay, good. I think cisco's overloading itself. Maybe it's time to start asking around the department for robust solutions. Okay. You got the screen. 38 00:06:37.228 --> 00:06:41.608 Okay, so this is, of course, blog. 39 00:06:41.608 --> 00:06:49.649 I want to teach you Mathematica I give you some examples. It's enrichment material and then. 40 00:06:49.649 --> 00:07:03.209 Continue into textbook, giving you highlights of that and 1st, you might wonder our courses any good. Can you make money from them? So I have here to. 41 00:07:03.209 --> 00:07:15.478 2 links to people who actually made money from probabilty. I've mentioned some of them before quickly. This is this Wired article on Mo, had who is. 42 00:07:15.478 --> 00:07:21.869 Consulted for mining companies in Canada and figured out how to crack the, the. 43 00:07:21.869 --> 00:07:26.939 The code in the scratch off game. 44 00:07:26.939 --> 00:07:30.209 A, while ago, there was 20 years ago, but you can read this. 45 00:07:30.504 --> 00:07:45.233 And I'm almost joking, he should be, I should invite him as a speaker at some point. So he, he's also written a book on geo statistics. So, this is 1 guy. And other 1 is Joan. Gunther. She's a Stanford pH. D. 46 00:07:46.494 --> 00:07:58.793 And what's going on here and she became a big winner in various lotteries, 4, different times in a small winter many, many times. 47 00:07:59.483 --> 00:08:04.403 And here are some links here, this up Philadelphian choir article and. 48 00:08:04.709 --> 00:08:09.059 And you can browse around this. Okay. 49 00:08:09.059 --> 00:08:14.428 So, there are people with probability used to probability skills to make. 50 00:08:14.428 --> 00:08:21.478 Well, can make money and so on you can have fun with that. There's other stories self. So you see, I've run out of. 51 00:08:21.478 --> 00:08:25.769 Comics self. Okay. 52 00:08:25.769 --> 00:08:35.009 So, let me show you some Mathematica, assuming it continues to work. I was trying it half an hour ago, but a lot can break and half an hour. 53 00:08:35.009 --> 00:08:39.149 I have it installed on my. 54 00:08:39.149 --> 00:08:47.698 In my computer, it talks to a license server at our PM at home now over loud unveil. So I've got. 55 00:08:47.698 --> 00:08:58.469 I've got a running is make it bigger 1 thing with Mathematica Matlab and a lot of other programs say do not understand high DPI screens. 56 00:08:58.469 --> 00:09:02.308 So, grumble, grumble, grumble, but. 57 00:09:02.308 --> 00:09:11.188 I can enlarge the body of the thing so you can do a simple arithmetic with Mathematica 1 plus 2. 58 00:09:11.188 --> 00:09:20.519 I'm typing, I'm hitting shift, enter on everything and by the way I've got the chat window open so I can. 59 00:09:20.519 --> 00:09:29.999 You know, I can see questions and just make it even bigger. You can find numerical values for pie. 60 00:09:33.509 --> 00:09:38.938 Um. 61 00:09:38.938 --> 00:09:46.528 And so on, you can integrate and differentiate it works with function. You can say plot. 62 00:09:47.639 --> 00:09:51.089 This in taxes. 63 00:09:53.129 --> 00:10:08.038 Functions take square brackets for their arguments lists. Hughes, curly, braces plot. That is a crazy function. I could differentiate just a big D. 64 00:10:08.038 --> 00:10:17.969 1st thing it works with formulas algebra differentiation, assigned as coastline integrate. 65 00:10:17.969 --> 00:10:21.808 Um. 66 00:10:22.134 --> 00:10:33.024 Ty next. Okay. Does that Here's a cool thing. Manipulate. We'll let you make any other expression into an interactive thing. 67 00:10:33.024 --> 00:10:37.224 So I can say, manipulate say plot, sign X. 68 00:10:37.499 --> 00:10:41.308 Ex comma. 69 00:10:41.308 --> 00:10:46.349 Say minus K to K case a free variable. 70 00:10:46.349 --> 00:10:50.188 And then. 71 00:10:52.379 --> 00:10:56.249 I know. 72 00:10:56.249 --> 00:11:01.318 So, what it did. 73 00:11:01.318 --> 00:11:07.649 Is that now is a slider for K and it's plodding for minus K to K and I can slide K. 74 00:11:10.678 --> 00:11:14.999 That's sort of cool. You can also put anything you want and then manipulate. 75 00:11:14.999 --> 00:11:19.948 So, you integrate. 76 00:11:19.948 --> 00:11:23.578 X. 77 00:11:23.578 --> 00:11:27.089 To the, and with respect to acts. 78 00:11:28.259 --> 00:11:33.178 And from 0 to. 79 00:11:33.178 --> 00:11:37.469 20 minutes of 1. okay. 80 00:11:37.469 --> 00:11:41.578 Now, as I now, as I slide, and it changes the integration. 81 00:11:44.548 --> 00:11:48.178 A crazy, um. 82 00:11:50.639 --> 00:11:56.938 Okay, now getting stuff closer to the course. So you can define. 83 00:11:56.938 --> 00:12:03.658 So you can, so what I just showed you, you can integrate differentiate plot. 84 00:12:03.658 --> 00:12:07.979 To put it into a new director, make anything else interactive. 85 00:12:07.979 --> 00:12:21.479 What else I can show you, you can define functions the function. Syntax is a little here. You give the argument with that followed by an underscore then colon equals and able to say exponential. 86 00:12:21.479 --> 00:12:28.979 I don't know say minus X squared divided by 2 or something. 87 00:12:28.979 --> 00:12:32.578 Now, we can look what access. 88 00:12:32.578 --> 00:12:41.849 Half of X X column, I say, minus 4 to 4, we got that. 89 00:12:41.849 --> 00:12:47.519 If we notice this is a Gaussian times too pie or something. 90 00:12:47.519 --> 00:12:52.078 We could go through here and make it exactly to Pi, going to be here. 91 00:12:52.078 --> 00:12:59.219 And go up to the previous thing, and let's make it exactly the galaxy and say. 92 00:13:02.548 --> 00:13:06.719 Um. 93 00:13:06.719 --> 00:13:13.109 Hey, minus minus X squared, divided by 2. 94 00:13:13.109 --> 00:13:16.558 Invited by square root. 95 00:13:16.558 --> 00:13:20.249 To hi. 96 00:13:21.269 --> 00:13:25.558 Now, we can. 97 00:13:31.649 --> 00:13:37.349 Well, now let's integrate it and see what we get to integrate. 98 00:13:38.609 --> 00:13:45.808 F X say X minus symphony do infinity. 99 00:13:51.839 --> 00:13:59.158 1, okay, well, let's say, you know, let's just integrate Tom part of the way. Let's say. 100 00:13:59.158 --> 00:14:02.219 And. 101 00:14:02.219 --> 00:14:06.778 I could cut and paste or something here. 102 00:14:08.908 --> 00:14:13.408 Set it to infinity well, you can check you just go halfway to 0. 103 00:14:13.408 --> 00:14:16.859 It's a half. 104 00:14:16.859 --> 00:14:20.369 Let's go say to 1 or something. 105 00:14:21.479 --> 00:14:24.479 Okay, so it's a. 106 00:14:24.479 --> 00:14:38.729 It cannot be integrated. Exactly. This is a problem with the Gaussian is earth is just a short hand for error function. It's just 1 to waste incomplete gallon. So we can get it as a number. Let's say a numerical value. 107 00:14:38.729 --> 00:14:43.948 And that's what it is and in fact, we could also. 108 00:14:45.089 --> 00:14:50.399 You know, put the thing inside of manipulate or something. I could take this just for fun. 109 00:14:50.399 --> 00:14:54.538 It starts getting crazy. 110 00:14:58.678 --> 00:15:05.068 Integrate up to just a, or something. 111 00:15:05.068 --> 00:15:10.889 Silence. 112 00:15:10.889 --> 00:15:15.629 Well, that values of AV, from, I don't know. 113 00:15:15.629 --> 00:15:18.989 Minus 3 to 3 units of 1. 114 00:15:18.989 --> 00:15:29.609 Oh, we want okay, so we want the thing as Chile numerical. So that's going to be. 115 00:15:33.448 --> 00:15:37.259 Okay, now I can slide it. 116 00:15:39.509 --> 00:15:49.889 And it's getting numerical values here now, maybe we also want to see a, the trouble is giving the out, but we also want to see a though. 117 00:15:49.889 --> 00:15:54.719 So, maybe I will have it as a, as well as the integral. 118 00:15:56.308 --> 00:15:59.849 Should be a brace there I think. 119 00:15:59.849 --> 00:16:03.239 Good, it's showing a nd and a girl so. 120 00:16:06.479 --> 00:16:13.828 And so on, so it's showing here, a couple of things with Mathematica is, you can. 121 00:16:13.828 --> 00:16:17.698 It will work with things that are very difficult for you to. 122 00:16:17.698 --> 00:16:22.918 Work by hand, say the Gaussian and we can look up fun stuff looking at this. And so. 123 00:16:25.139 --> 00:16:36.359 Um, in fact, I could define a continue, I could take this partial integral and define it to be the CD for something and plot it. So, let me see here. 124 00:16:37.739 --> 00:16:41.308 Going as far as. 125 00:16:41.308 --> 00:16:44.999 This, OK, so, let me say. 126 00:16:44.999 --> 00:16:50.369 F2 equals. 127 00:16:52.649 --> 00:16:57.119 And, Charlie. 128 00:16:57.119 --> 00:17:02.158 Ex. 129 00:17:06.088 --> 00:17:12.929 Now, let's just try if 2 of 0, it should be 1 half. 130 00:17:12.929 --> 00:17:16.618 Valid integration and I met. 131 00:17:26.068 --> 00:17:31.858 Oh, okay. Oh, I'm using X. 132 00:17:32.969 --> 00:17:36.598 I'm using X in 2 different ways. So that's my problem. 133 00:17:36.598 --> 00:17:40.439 It's called this thing X1. 134 00:17:40.439 --> 00:17:44.068 And X1. 135 00:17:49.679 --> 00:18:01.318 Your grade half of. 136 00:18:09.148 --> 00:18:13.769 Shy that's correct. 137 00:18:13.769 --> 00:18:22.318 Okay. 138 00:18:26.038 --> 00:18:30.028 Silence. 139 00:18:30.028 --> 00:18:39.898 Let's integrate up to 1 or something. It should be about point 8. 140 00:18:40.979 --> 00:18:46.439 Call 1 day. Okay. 141 00:18:46.439 --> 00:18:49.648 So, I could take this thing, and I could put in around it. 142 00:18:49.648 --> 00:18:54.058 Silence. 143 00:18:54.058 --> 00:18:58.558 By day, okay. And now I could define. 144 00:19:01.439 --> 00:19:06.419 A new function here to. 145 00:19:07.469 --> 00:19:10.888 Hey, underscore. 146 00:19:12.118 --> 00:19:18.028 Today, let's see how that works. 147 00:19:18.028 --> 00:19:30.419 Okay, that work. I don't know why. I think X. X1 they've been overloaded. Okay, so I have 2 is the CDF so I can do something like a plot. F2. 148 00:19:30.419 --> 00:19:34.048 Of anything. 149 00:19:34.048 --> 00:19:39.298 Queue or something can you name Q from. 150 00:19:42.479 --> 00:19:50.848 Silence. 151 00:19:55.528 --> 00:19:58.949 I think it's processing, but it's maybe thinking or something. 152 00:20:03.598 --> 00:20:11.278 It's trying to do a demo. It doesn't work it should to be plotting the hill to distribution function rather than normal. So. 153 00:20:16.318 --> 00:20:21.929 Yeah. 154 00:20:21.929 --> 00:20:27.719 something's processing, I think yeah, Mathematica is using a 100% of the CPO. So. 155 00:20:27.719 --> 00:20:33.479 It's having to evaluate, just send a girl too many times or something. So that's the problem. 156 00:20:34.858 --> 00:20:39.479 Keller. 157 00:20:47.159 --> 00:20:52.259 Yeah, it's still my sporadic. I still using. 158 00:20:55.618 --> 00:20:59.249 Yeah, it says running at the tone. 159 00:21:07.739 --> 00:21:11.009 Finally, it's a little more time than I thought. 160 00:21:11.009 --> 00:21:14.038 But there is doing the CWS. Okay. 161 00:21:14.038 --> 00:21:18.419 Show you some more stuff with how this is useful for the course here. 162 00:21:18.419 --> 00:21:22.138 Some other examples that I had. 163 00:21:22.138 --> 00:21:25.618 I feel like, um. 164 00:21:25.618 --> 00:21:29.219 It's got simple things like the binomial. 165 00:21:29.219 --> 00:21:33.179 Getting back because they call me to Clark's. 166 00:21:34.588 --> 00:21:37.769 Say, I could just say something like 10 and 5. 167 00:21:37.769 --> 00:21:44.519 I could also there's also the sum, I could say some binomial. 168 00:21:45.538 --> 00:21:49.739 Say, 10 to K and K for say. 169 00:21:49.739 --> 00:21:53.969 K from 0 to 10 to be 1024. 170 00:21:55.048 --> 00:21:59.338 I could plot binomial. 171 00:21:59.338 --> 00:22:03.028 Okay, okay. 172 00:22:03.028 --> 00:22:06.388 Say from K from. 173 00:22:06.388 --> 00:22:09.538 Okay, from 0 to 10. 174 00:22:09.538 --> 00:22:16.979 It suppose that outcome we can also do it as a step function. Mr. Graham. Okay. 175 00:22:16.979 --> 00:22:21.898 And what else I have that I want to show you functions. 176 00:22:21.898 --> 00:22:31.528 Oh, here's 1 show. Some of the fun. This is a 3 variable. It's from the textbook. I don't have the exact page number. 177 00:22:31.528 --> 00:22:36.209 And. 178 00:22:36.209 --> 00:22:40.588 Okay. 179 00:22:40.588 --> 00:22:46.259 So, it's a 3 variable Gaussian here and there's a certain correlation between 2 of the variables. 180 00:22:46.259 --> 00:22:54.479 Now, I could say I could integrate out some of the variables. 181 00:22:54.479 --> 00:23:02.308 1st, let's just we could just actually draw the thing nicely. Not just as I could say, I go. 182 00:23:02.308 --> 00:23:10.798 Yeah, there it looks nicely now. Okay up here. 183 00:23:10.798 --> 00:23:14.189 Okay, let me integrate out X3 and let's say. 184 00:23:14.189 --> 00:23:17.729 I could say X3. 185 00:23:22.048 --> 00:23:27.209 Calls integrate. 186 00:23:30.989 --> 00:23:34.199 Yeah. 187 00:23:34.199 --> 00:23:38.009 Silence. 188 00:23:38.009 --> 00:23:41.038 X3 from minus. 189 00:23:41.038 --> 00:23:44.159 Silence. 190 00:23:47.338 --> 00:23:50.398 Silence. 191 00:23:50.398 --> 00:23:56.128 And now I could look at. 192 00:23:56.128 --> 00:24:06.808 We could actually try to plot it. Actually, I could fix the value for half to fix. Just say products 1 or something could say plot. 193 00:24:08.848 --> 00:24:11.878 Just 0 or something. 194 00:24:11.878 --> 00:24:15.328 Silence. 195 00:24:16.558 --> 00:24:26.128 Everything's running slow today. 196 00:24:28.648 --> 00:24:35.519 Silence. 197 00:24:37.108 --> 00:24:47.939 Silence. 198 00:24:47.939 --> 00:24:53.489 Okay, I just want to look at what, if not 3 years actually. 199 00:24:54.929 --> 00:25:03.659 That's what it looks like. Okay, it's a 2 variable thing. I could then say, integrate out. 200 00:25:03.659 --> 00:25:13.108 X2 also and so this is something you begin to see why mathematical is faster than doing it by hand it did the integral of this thing up here out 35. 201 00:25:13.108 --> 00:25:16.949 If it's large enough for you to see integrated out X3. 202 00:25:16.949 --> 00:25:21.898 And gave this thing down here, I can integrate next 2. now. 203 00:25:23.219 --> 00:25:27.689 Silence. 204 00:25:27.689 --> 00:25:32.489 Great yeah. 205 00:25:32.489 --> 00:25:36.328 Top 3. 206 00:25:36.328 --> 00:25:41.489 To from minus. 207 00:25:41.489 --> 00:25:44.999 And it works in infinities. Okay. 208 00:25:46.828 --> 00:25:49.979 Silence. 209 00:25:52.469 --> 00:25:56.068 And see, what, if not 23 looks like. 210 00:25:59.459 --> 00:26:04.528 It's a 1 variable calcium. You see. 211 00:26:04.528 --> 00:26:11.368 And, um, so you see that. 212 00:26:11.368 --> 00:26:16.709 It works with algebra suppose I want to find what the mean of this thing is to integrate. 213 00:26:18.749 --> 00:26:22.138 So, let's just say, X1 times. 214 00:26:22.138 --> 00:26:26.219 If not 3 X1. 215 00:26:28.618 --> 00:26:31.739 For X1. 216 00:26:31.739 --> 00:26:34.828 Silence. 217 00:26:34.828 --> 00:26:41.489 Silence. 218 00:26:43.558 --> 00:26:52.439 0, it's center, that's an IC. So the mean, I just want to get to variances how we can take this thing. And let's. 219 00:26:52.439 --> 00:26:55.828 Let's just take this thing actually, and cut and paste. 220 00:26:57.929 --> 00:27:02.368 And it's integrate. Okay. X1 squared. Let's say. 221 00:27:03.838 --> 00:27:10.078 So now we're part way to getting the variance. So we can do stuff. That starts starts to get a little messy here. 222 00:27:10.078 --> 00:27:23.939 Okay, and the way the undergo works, what Mathematica does is if there's an actual closed formula, or it will use it if there isn't, it will do it numerically. So suppose I want to take this thing up here. 223 00:27:23.939 --> 00:27:30.838 And to infinity, let's make it up to. 224 00:27:30.838 --> 00:27:41.578 10 oh, it actually did integrate it. Well, I did not because here, it's just a short harm for. 225 00:27:41.578 --> 00:27:46.709 You know, an American thing, but I'll get this as a number here and there's a number. 226 00:27:46.709 --> 00:27:58.798 So, we can work with stuff so, mathematical is working with algebra and can it do stuff as formulas and also do stuff as numbers? What else can it do? What am I showing you. 227 00:27:58.798 --> 00:28:04.888 Oh, Here's something really hard to do by hand. This is a definition for a square way. Let's say. 228 00:28:04.888 --> 00:28:10.439 Uniform a uniform probably just okay. 229 00:28:10.439 --> 00:28:21.028 And say, function. So this is a condition also asked is a function. I've just defined it and if X is between 0 and 1, the output is 1, otherwise the output is 0. 230 00:28:21.028 --> 00:28:25.499 It's like, and it's like, and if then else and things like Excel and so on. 231 00:28:25.499 --> 00:28:28.618 Okay, let me part is. 232 00:28:28.618 --> 00:28:35.909 Silence. 233 00:28:35.909 --> 00:28:41.128 Okay square away between 0 and 1. 234 00:28:41.128 --> 00:28:47.519 Okay, well what can we do with it? Let's integrate it. 235 00:28:56.669 --> 00:29:01.199 For mine, so if any do infinity. 236 00:29:03.538 --> 00:29:07.169 I should write a shorthand for this sodium and grow by. 237 00:29:11.219 --> 00:29:15.028 And let's plot of acts or something. 238 00:29:21.118 --> 00:29:24.239 Silence. 239 00:29:24.239 --> 00:29:27.808 Okay, what did I do here? 240 00:29:34.558 --> 00:29:39.959 Silence. 241 00:29:44.398 --> 00:29:48.028 I got I feel anyway some overload here and say X and X here. 242 00:29:48.028 --> 00:29:53.189 Nope. 243 00:29:55.108 --> 00:30:14.489 Silence. 244 00:30:18.118 --> 00:30:23.398 I feel maybe okay, we do that. 245 00:30:28.739 --> 00:30:41.848 Okay, it's just getting annoying now. 246 00:30:41.848 --> 00:30:44.939 By say exon points to. 247 00:30:44.939 --> 00:30:49.528 Gives me 1, ask son. Terry gives me that. 248 00:30:49.528 --> 00:30:54.449 Okay, if I integrate. 249 00:30:54.449 --> 00:30:57.898 Silence. 250 00:31:01.288 --> 00:31:05.459 That works if I said here. 251 00:31:05.459 --> 00:31:09.959 Point 2 that would work. Okay. 252 00:31:13.288 --> 00:31:20.128 Silence. 253 00:31:24.209 --> 00:31:29.368 No, 1st of all I try 1 more thing. 254 00:31:29.368 --> 00:31:33.689 Assets from. 255 00:31:33.689 --> 00:31:38.429 X from minus infinity. 256 00:31:41.159 --> 00:31:45.838 2.3 that is correct. Okay. 257 00:31:45.838 --> 00:31:49.709 So, let me to find and assess. 258 00:31:51.239 --> 00:31:56.159 It cost. 259 00:31:57.838 --> 00:32:02.278 Silence. 260 00:32:05.548 --> 00:32:09.479 Silence. 261 00:32:09.479 --> 00:32:13.348 Say. 262 00:32:13.348 --> 00:32:17.939 That is not correct. 263 00:32:20.398 --> 00:32:26.848 Silence. 264 00:32:26.848 --> 00:32:31.138 Okay. 265 00:32:42.148 --> 00:32:47.219 Silence. 266 00:32:47.219 --> 00:32:55.528 Silence. 267 00:32:58.618 --> 00:33:02.128 Silence. 268 00:33:05.278 --> 00:33:13.108 Do a demo and it doesn't work. I'm trying to work up to show you the central limit there. Actually, that was the point of this series. 269 00:33:13.673 --> 00:33:14.304 So, 270 00:33:31.104 --> 00:33:34.433 we're going to start a new session and see what happens. 271 00:33:40.108 --> 00:33:46.378 Silence. 272 00:33:50.009 --> 00:33:55.888 Okay, good. And then I say SS. 273 00:34:00.058 --> 00:34:05.278 It's to the. 274 00:34:06.568 --> 00:34:09.989 Just integrating it. 275 00:34:09.989 --> 00:34:13.858 Silence. 276 00:34:13.858 --> 00:34:18.509 Affinity. 277 00:34:18.509 --> 00:34:22.498 To X to say. 278 00:34:38.099 --> 00:34:48.028 Good finally. Okay, so I integrate the square wave. I get this is the cable to distribution function by the uniform thing and that is completely correct. 279 00:34:48.028 --> 00:34:52.048 Okay, and. 280 00:34:52.048 --> 00:34:55.528 Okay, so and just to remind you, if I plot. 281 00:34:55.528 --> 00:34:59.009 As the facts. 282 00:34:59.009 --> 00:35:02.219 Silence. 283 00:35:02.219 --> 00:35:05.639 Minus 2 it's sorry. 284 00:35:06.414 --> 00:35:19.193 Okay, good. So this is a square way. What? If I define a new random variable that is the sum up to up 2 square way. 285 00:35:19.193 --> 00:35:22.014 So this is now drawing on material that I've. 286 00:35:22.349 --> 00:35:33.599 Sort of wandering through in the last week or so. So some of 2 random variables and so the sum of 2, random variables, the effect is actually a convolution. 287 00:35:33.599 --> 00:35:36.958 So. 288 00:35:36.958 --> 00:35:45.449 So, if I and I mentioned it, I think, possibly in the blog page here, wherever it went. 289 00:35:48.358 --> 00:35:55.018 Write down here point 9 here the sum of some of 2 uniforms is this here. 290 00:35:55.018 --> 00:35:59.128 So, it's in and let's try this and see what happens. So. 291 00:36:02.369 --> 00:36:05.789 I'll just copy it. 292 00:36:07.528 --> 00:36:12.568 And I could try plotting it. 293 00:36:16.528 --> 00:36:20.068 Silence. 294 00:36:20.068 --> 00:36:25.259 What do we get. 295 00:36:27.148 --> 00:36:31.048 Should be a triangle wave, if thing ever right to triangle. 296 00:36:32.278 --> 00:36:43.648 Cut off the thing didn't scale right? So cut off a little at the top. So the square wave, if we add to uniform random variables, the sum is. 297 00:36:43.648 --> 00:36:48.659 Triangle wave here suppose I add to of those. 298 00:36:55.798 --> 00:37:01.378 Silence. 299 00:37:09.119 --> 00:37:12.898 It's plot as for. 300 00:37:12.898 --> 00:37:19.588 Silence. 301 00:37:20.699 --> 00:37:25.619 So 1 uniform. 302 00:37:26.639 --> 00:37:33.958 And nothing is happening here. Okay. 303 00:37:35.789 --> 00:37:40.438 Silence. 304 00:37:40.438 --> 00:37:50.068 Silence. 305 00:37:52.199 --> 00:37:55.918 Silence. 306 00:37:55.918 --> 00:38:01.679 1, okay. 307 00:38:01.679 --> 00:38:04.949 Silence. 308 00:38:10.619 --> 00:38:15.539 Okay, 2 is working it's for. 309 00:38:18.510 --> 00:38:24.090 I may have got to use different. I'm feeling I have to use different variable names all the time. 310 00:38:24.090 --> 00:38:27.119 Now, let's see what happens here. 311 00:38:27.119 --> 00:38:32.039 Maybe they make why different. 312 00:38:32.039 --> 00:38:37.409 Silence. 313 00:38:37.409 --> 00:38:40.409 Oh, okay. 314 00:38:40.409 --> 00:38:44.969 Let's try here. 315 00:38:48.389 --> 00:38:55.710 Oh. 316 00:39:01.949 --> 00:39:17.219 Silence. 317 00:39:17.219 --> 00:39:22.530 I thought the explicit multiplication might be causing some problems here. 318 00:39:28.349 --> 00:39:38.250 All right. 319 00:39:40.260 --> 00:39:46.949 Okay, it's working. Yeah, so flooding is for. 320 00:39:48.510 --> 00:39:52.590 Try and work. 321 00:39:52.590 --> 00:40:00.119 Quality 2, just to pick something different. 322 00:40:02.550 --> 00:40:08.969 Running. 323 00:40:10.019 --> 00:40:22.320 So, 1, random variables uniform, it was a score wave. I added to uniforms. I got a triangle wave. I'm adding 2 triangle ways now by doing a convolution of the 2 random variables. 324 00:40:24.510 --> 00:40:27.869 And it is taking a long time for some reason. 325 00:40:27.869 --> 00:40:33.090 But the thing here that makes it complicated causes a conditional that the. 326 00:40:33.090 --> 00:40:41.789 Uniform it was 1 for maximum 0 to 1 and outside. That was the 3 different cases. And then I do the convolution. 327 00:40:41.789 --> 00:40:44.909 It makes it mess here. Okay good. 328 00:40:44.909 --> 00:40:49.679 I just get cut off, I should have made it a wider, but okay. But you see. 329 00:40:50.699 --> 00:40:53.849 So this is the. 330 00:40:53.849 --> 00:40:57.630 The sum of 4 uniforms of some of 4 square waves. 331 00:40:57.630 --> 00:41:01.679 It ain't bad. Okay. It looks quite like a. 332 00:41:01.679 --> 00:41:05.400 Um, so. 333 00:41:05.400 --> 00:41:11.070 So this is an example of the law of large numbers that you take things. 334 00:41:11.070 --> 00:41:22.079 And you, you know, you start adding random variables and they start looking like a like a like a normal. 335 00:41:23.309 --> 00:41:28.500 Um, yeah, I could even do the thing with, um. 336 00:41:28.500 --> 00:41:35.730 You know, you say it was it scar we might say square way. It looks fairly. 337 00:41:35.730 --> 00:41:44.429 I don't know 2 regular. Well, I could start with something else. I could try. Let me try it exponentially. Even. 338 00:41:44.429 --> 00:41:49.079 It's also excuse to show there start a new notebook just to avoid. 339 00:41:49.079 --> 00:41:54.539 Confusions or something. Okay, let's let's look at an exponential. 340 00:41:56.130 --> 00:41:59.820 So say minus X or something. 341 00:42:01.619 --> 00:42:06.510 From. 342 00:42:08.610 --> 00:42:12.059 Here. 343 00:42:14.699 --> 00:42:25.320 All right cat, coughing 0 to 50 to 5 or something. Okay. Good. 344 00:42:26.489 --> 00:42:31.829 So, let me, um, just define an f, just to be quicker. 345 00:42:34.860 --> 00:42:44.039 X p6. Okay. Well, we can do things like, suppose you want the mean and so on said to me, you just integrate. 346 00:42:44.039 --> 00:42:50.280 Well, 1st, let's make sure this as a PDF to make sure to integrates from. 347 00:42:50.280 --> 00:43:00.809 It integrates out to 1, so let's say from 0 to infinity, because finally for positive X. 348 00:43:00.809 --> 00:43:03.960 Good. 349 00:43:03.960 --> 00:43:08.099 Let's let's see what the mean is just for fun. 350 00:43:08.099 --> 00:43:12.630 Not apply X times that. 351 00:43:12.630 --> 00:43:20.460 Is 1 okay we could also try more general things like, suppose. 352 00:43:20.460 --> 00:43:23.489 Et cetera, et cetera minus ex supposes. 353 00:43:23.489 --> 00:43:30.119 X P. A. X for some constant day, or something like that now to integrate it. 354 00:43:30.119 --> 00:43:38.460 Okay, so Mathematica as being particular, it says if a is a real number than this is 1. 355 00:43:38.460 --> 00:43:46.679 As a real component of a is positive, it could be complex. Then it's 1 over 8, for example. So it's being particular here. 356 00:43:46.679 --> 00:43:54.179 Being very precise. Okay so go to f, again, back to the old thing and the meeting is. 357 00:43:54.179 --> 00:44:00.989 Okay, so now suppose I just do a convolution of 2 of them. So. 358 00:44:00.989 --> 00:44:10.110 Of acts integrate. 359 00:44:10.110 --> 00:44:14.579 Okay, so it's going to be. 360 00:44:15.780 --> 00:44:19.440 Half of X times f of. 361 00:44:20.699 --> 00:44:28.349 Why minus X integrate for X. okay. Now I'm not going to. 362 00:44:28.349 --> 00:44:36.179 To avoid all those conditions. Like, I should have said for f condition Don next being positive. Let me just pick the right thing here. 363 00:44:37.889 --> 00:44:41.789 X has to be between 0 and Y. 364 00:44:41.789 --> 00:44:47.250 Okay. 365 00:44:49.260 --> 00:44:53.219 That's plot and see. 366 00:44:57.570 --> 00:45:01.769 Silence. 367 00:45:01.769 --> 00:45:14.789 Okay, so you see, I didn't I did not put all those conditions in the definition of X. what instead I'm doing is I'm remembering them and being careful here and this makes mathematical a lot faster. 368 00:45:14.789 --> 00:45:23.610 So, you see, f was just modifying down g. 369 00:45:23.610 --> 00:45:28.050 You know, it looks a little smoother. Okay. Um. 370 00:45:29.880 --> 00:45:35.309 You know, that's the sum of 2 exponential suppose, the sum of 4 exponentials. 371 00:45:36.780 --> 00:45:42.300 So you see, this is a convolution here you see. Okay. Call it H or something. 372 00:45:42.300 --> 00:45:45.480 And a great g, X type. 373 00:45:46.889 --> 00:45:51.449 Let's see what happens. 374 00:45:51.449 --> 00:45:55.440 H, via now. 375 00:46:04.139 --> 00:46:11.519 In the title bar, it's running, so. 376 00:46:16.769 --> 00:46:31.619 Yeah, try to use parallel here. 377 00:46:39.780 --> 00:46:53.909 It's doing only 1. 378 00:46:55.230 --> 00:46:59.219 It's still running I don't know why it's taking so long here. 379 00:47:03.780 --> 00:47:08.460 But this is going to do the summer for exponential random variables. 380 00:47:08.460 --> 00:47:11.639 Okay. 381 00:47:16.260 --> 00:47:31.105 Touch weird mean and say something funny going 382 00:47:31.105 --> 00:47:31.675 on here. 383 00:47:32.125 --> 00:47:35.184 Some of the for exponentials, the main should before. 384 00:47:35.670 --> 00:47:39.000 So, it should be telling down or if I try something for them. 385 00:47:39.000 --> 00:47:46.289 I see. 386 00:47:46.289 --> 00:47:50.010 Exactly. 387 00:47:57.210 --> 00:48:03.059 I don't know very case you see, even from some of to the thing starts looking a little. 388 00:48:03.059 --> 00:48:15.570 Smooth there and if there's some affords look even slightly closer and you can half dozen or a dozen some, then then it doesn't matter that the original random variable was really weird. Like. 389 00:48:15.570 --> 00:48:20.730 Say this exponential that it starts looking. 390 00:48:22.019 --> 00:48:28.409 Like, a normal okay, that's what I'm talking about there so. 391 00:48:28.409 --> 00:48:37.860 Now, there are things. So, here I showed you a ghost in typing in the formula. 392 00:48:38.909 --> 00:48:45.300 Mathematics also has ways to work with probability distributions just more as. 393 00:48:46.769 --> 00:48:55.590 As it looked like distributions as object as abstract object and. 394 00:48:58.139 --> 00:49:06.780 And show you some of this actually, so something much returns on call. 395 00:49:06.780 --> 00:49:10.619 A function. 396 00:49:10.619 --> 00:49:18.239 Silence and. 397 00:49:18.239 --> 00:49:27.780 So, this will return a distribution as an abstract object. So, I mean, maybe I'll make, I don't mean to insider DVS and 1 or something. 398 00:49:27.780 --> 00:49:36.869 Now, what I can do, so, Andy, it's a normal distribution goes, I mean, to San Diego, and I can do things like, I can ask, what's the mean of it? 399 00:49:38.130 --> 00:49:45.840 Tell me 2, I can do a plot so now is a function actually. So I can say plot and D X. 400 00:49:45.840 --> 00:49:48.960 For X from. 401 00:49:48.960 --> 00:49:51.960 Find this. 402 00:49:51.960 --> 00:49:55.949 Silence. 403 00:49:55.949 --> 00:50:09.059 Okay, let me think about that. I can say N, D3. 404 00:50:14.219 --> 00:50:18.780 Okay, this worked in by demo. 405 00:50:34.110 --> 00:50:39.150 Motor, so Anna, because so I can do a mean. 406 00:50:40.380 --> 00:50:44.190 1, because I could do variance. 407 00:50:46.710 --> 00:50:52.679 Oh, I could get defeated the density do PDF of Andy. 408 00:50:54.300 --> 00:51:01.860 And there it is here, it's a function like this. Okay. That's it. Okay so this is a density function. 409 00:51:01.860 --> 00:51:06.809 And I could get a PDF if. 410 00:51:06.809 --> 00:51:10.679 And D, and then get a value at 3, let's say. 411 00:51:12.210 --> 00:51:16.260 And I could get it numerically if I wanted, of course, by putting it in. 412 00:51:18.780 --> 00:51:30.000 Yeah, and I could take the PDF that I could I guess I could plot the PDF. Sorry the distribution is something I've talked about, I can talk to PDF so I can do plot PDF. 413 00:51:30.000 --> 00:51:33.030 And the cracks. 414 00:51:34.079 --> 00:51:38.820 X common minus 3 2 3. good. 415 00:51:38.820 --> 00:51:41.969 I can get the CDF of. 416 00:51:47.250 --> 00:51:50.429 And so on and evaluate it. 417 00:51:50.429 --> 00:51:55.110 And so. 418 00:51:55.110 --> 00:52:03.000 And and a lot of the common distributions are defined in mathematics, you're going to work with them as distributions. So. 419 00:52:03.000 --> 00:52:08.429 So, I mentioned that sort of thing to get a multi variable and whatever. 420 00:52:09.929 --> 00:52:20.280 Okay, so this is this is Mathematica and some of the examples in the book. 421 00:52:20.280 --> 00:52:26.010 Would go a lot faster into girls and so on. So. 422 00:52:26.010 --> 00:52:31.800 So, it takes a little getting used to. It's weird, but an extremely powerful. 423 00:52:33.000 --> 00:52:39.329 And it's the world's most powerful algebraic when a creator has got piles of other features. I haven't talked about. 424 00:52:39.329 --> 00:52:53.639 And if something can be integrated, it will integrate it as a formula as algebra. If it cannot be integrated as algebra, then it will. 425 00:52:53.639 --> 00:52:57.269 Do it numerically? So. 426 00:52:57.269 --> 00:53:00.599 Oh, okay. 427 00:53:00.599 --> 00:53:06.179 And my children touch more of that later and also, maybe show you some more math lab. 428 00:53:07.980 --> 00:53:20.394 The difference is, so, of course, the thing with these tools in the real world is their license products that cost money, but they're very powerful products and Mathematica also has ties into a lot of real world data sets. 429 00:53:20.724 --> 00:53:30.925 It does really nice plots and different applications and has a very large amount of help information available. We can introductory diamonds, all sorts of stuff. So. 430 00:53:31.289 --> 00:53:34.980 So, if you want to work with it, you can hit some. 431 00:53:36.090 --> 00:53:40.500 Any questions on this and again. 432 00:53:40.500 --> 00:53:48.929 I'm showing it to you as a tool to help making more probability easier, but There'll be no exam questions on it. 433 00:53:48.929 --> 00:53:56.789 And things, well, 1 thing, as I showed you, it does very much easier is these intervals, these conditional things like the square away. 434 00:53:56.789 --> 00:54:00.989 Okay. 435 00:54:06.000 --> 00:54:11.010 To show you a little more of the textbook. 436 00:54:13.530 --> 00:54:27.599 So this is chapter sadness talking about some random variables and I was showing you examples of this. So. 437 00:54:27.599 --> 00:54:30.659 And. 438 00:54:30.659 --> 00:54:41.909 I want to jump ahead of chapter 8 then I'll come back to jump back and forth in the textbook. The reason is this? No, it's not just to confuse you, but. 439 00:54:41.909 --> 00:54:46.440 Honestly, being good at surviving confusion. 440 00:54:46.440 --> 00:54:52.050 Is not is a powerful scale, but let me just ask. 441 00:54:52.050 --> 00:54:55.500 Right. 442 00:54:55.500 --> 00:54:59.730 Anyone still. 443 00:54:59.730 --> 00:55:04.260 Okay, so. 444 00:55:04.260 --> 00:55:15.000 It's 1 of the license pieces of software, get us an API student. What you do is here, you can install it on your computer and then it talks back to a license server. 445 00:55:15.000 --> 00:55:19.769 Okay, what I want to do now for a few minutes is just introduce you. 446 00:55:19.769 --> 00:55:26.309 To statistics, or the joke, as they call it sadistics But statistics. 447 00:55:26.309 --> 00:55:35.010 So, it is sort of the opposite direction, causal relationship as probably probability. We know a distribution. 448 00:55:35.010 --> 00:55:45.389 Like, it's normal or something and mean 0 and standard deviation 1 and then we plug in things. Ask what is. 449 00:55:45.389 --> 00:55:53.519 You know, the density function for X, because of X. so we know the distribution and we want to calculate probabilities. 450 00:55:53.519 --> 00:55:56.670 Statistics is we have. 451 00:55:56.670 --> 00:56:04.679 And we do not know the distribution, or we know something about it, but we do not know critical parameters. 452 00:56:04.679 --> 00:56:10.289 So, maybe we, and we have a real, a population of. 453 00:56:10.289 --> 00:56:18.750 Observations in the real world, and we want to determine some of these parameters. This is called parametric statistics. So. 454 00:56:18.750 --> 00:56:30.360 Well, my example from last time 7,000 students, and we assume the heights are normal calcium distribution, but we do not know the mean. 455 00:56:30.360 --> 00:56:34.769 And then we take a sample, maybe 1%, 70 students. 456 00:56:34.769 --> 00:56:49.079 And from the end, then we want to learn something about the meaning of the whole population from the statistics that means the, what the mean and standard deviation of this sample that statistics for, you. 457 00:56:49.079 --> 00:56:54.329 And real world examples. 458 00:56:54.329 --> 00:57:00.000 See, there, it's better real world examples. 459 00:57:00.000 --> 00:57:05.099 Well, the Guinness brewery thing, what's the alcohol content of the current batch of beer? 460 00:57:05.099 --> 00:57:12.150 You know, you're polling, what do you how do you think people, you know. 461 00:57:12.150 --> 00:57:16.349 We'll vote in the next election 2 examples. 462 00:57:17.610 --> 00:57:26.250 Or any, so you're doing observation. Another thing is this your observations might be very expensive. 463 00:57:26.250 --> 00:57:29.789 All your I've mentioned who was. 464 00:57:29.789 --> 00:57:40.590 Crack the interior that that numbers game. So he was consulting such a, you still around consulting status that he owns his own company. Now, a company statistician. 465 00:57:40.590 --> 00:57:47.400 Advising mining companies and Ontario. Well, you know, there's a lot of money being spent here so you want to. 466 00:57:47.400 --> 00:57:57.570 Infer what you can about where the gold is, but not for stuff that doesn't make it. So that's statistics. So, base here you gather, and you analyze data. 467 00:57:57.570 --> 00:58:02.219 And you try to do conclusions and inferences from the data. 468 00:58:03.690 --> 00:58:08.130 Okay, some buzz words here. 469 00:58:09.420 --> 00:58:19.110 The population. Okay so this is the collection of objects that we're studying our students folders in the United States, whatever. 470 00:58:19.110 --> 00:58:23.579 Bottles will get a spear. 471 00:58:27.570 --> 00:58:32.340 You're all under 21 so the greatest example is a fairly theoretical example. You'll understand. 472 00:58:32.340 --> 00:58:41.760 Okay, so we've got the random sample here. 473 00:58:41.760 --> 00:58:46.710 So you're picking again, the students you're picking. 474 00:58:46.710 --> 00:58:51.539 70 students at random, and that's creates a sample now. 475 00:58:51.539 --> 00:58:59.730 And we talk about real world stuff in the real world. The hardest part of your whole job might be that random sample. Actually. 476 00:58:59.730 --> 00:59:07.800 If you're a pollster, getting a random sample of voters is really hard. 477 00:59:07.800 --> 00:59:14.909 There's a classical example taught when polling was 1st, started in the 19 thirties. 478 00:59:14.909 --> 00:59:20.670 It was, I believe the 1936 elect United States presidential election. 479 00:59:20.670 --> 00:59:26.099 And it was Roosevelt Democrats versus Republicans his name. I can't remember. 480 00:59:26.099 --> 00:59:29.159 And a magazine wanted. 481 00:59:29.159 --> 00:59:38.880 To determine who's going to win the election. So, what they did is, I took a phone book at that time, people's phone numbers listed in things called phone books. 482 00:59:38.880 --> 00:59:45.389 I've been ironic now, but it just alphabetically list everyone in the city and name address phone number. 483 00:59:45.389 --> 00:59:52.409 And so they picked random people in the phone book. 484 00:59:52.409 --> 00:59:56.519 And telephone them and said, you know, I'm doing a Paul who are you going to vote for? 485 00:59:56.519 --> 01:00:03.989 And and they added it off, and most of the people they called. 486 01:00:03.989 --> 01:00:08.610 We're going to vote Republican. Now there's a thing here you have to assume that people are going to. 487 01:00:08.610 --> 01:00:12.630 Answer honest answer the pollster honestly. 488 01:00:12.630 --> 01:00:23.579 That's that's outside this course but, uh, but the thing is, if we assume that's correct. Here's the thing is that the magazine said, well, gee, most of the people we telephoned. 489 01:00:23.579 --> 01:00:29.070 Said they're going to vote Republican, so big new star Republicans going to sweep the next to 36. 490 01:00:29.070 --> 01:00:34.380 Election, but, of course, what happened in the real universe is the Democrats. 491 01:00:34.380 --> 01:00:37.559 So, after the election was about was reelected landslide. 492 01:00:37.559 --> 01:00:44.219 What happened? Well, this was 1936 it was, um. 493 01:00:44.219 --> 01:00:48.449 You know, whatever, 67 years into the Great Depression. 494 01:00:48.449 --> 01:01:01.980 And poor people did not have telephones as often as rich people. So if you'd been laid off of your job, you didn't have a telephone you weren't in the phone book. 495 01:01:01.980 --> 01:01:05.519 If you didn't have an address, if you're living in a, you know. 496 01:01:05.519 --> 01:01:10.949 Whatever if you're a young man working civilian conservation corps building. 497 01:01:10.949 --> 01:01:15.030 Whatever is, you didn't have enough a phone and. 498 01:01:15.030 --> 01:01:22.019 So, you see the problem with the round of sample, the magazine kid, it was biased towards people rich enough to have telephones. 499 01:01:22.019 --> 01:01:26.550 So, random sampling is hard, but that's not this course. Okay. 500 01:01:26.550 --> 01:01:29.909 You got your population, you do the random sample. 501 01:01:29.909 --> 01:01:33.179 Okay, I'm giving you a notation here. 502 01:01:33.179 --> 01:01:45.599 I still centered. Yeah. Okay. So now you calculate. So the random sample call X banner or something, it's got in observations, then you calculate a statistic. 503 01:01:45.599 --> 01:01:58.224 So a statistic definition, it's a function of a random factor. So the random vector is your sample of say, 70 students, and a statistic is a, some function of the state of that thing. 504 01:01:58.224 --> 01:02:02.574 So, if we're doing Heights, the statistic could be the main height of this sample. 505 01:02:02.849 --> 01:02:13.980 Another statistic would be the standard deviation of the heights and the sample a 3rd statistic could be the polished version. A 4 statistic could be the median, any function at all. Okay. 506 01:02:13.980 --> 01:02:25.800 Other random vector and the statistic, it's a random variable itself. Okay you take your 70 stood and say you take 10 times 70 different sets of 70 students. 507 01:02:25.800 --> 01:02:36.900 10 different sets. Each 1 has a sample beans. He got 710 different sample means then different sample mediums, 10 different sample Maxima and so on. 508 01:02:36.900 --> 01:02:40.980 The statistic it's a function of the random factor. The random stuff. 509 01:02:42.119 --> 01:02:48.000 Okay, now scroll down here properly. 510 01:02:49.320 --> 01:02:52.590 Okay. 511 01:02:54.510 --> 01:03:01.650 And you might hear had mentioned the sample mean let's say so, it's the mean of that Sam followups to. 512 01:03:04.739 --> 01:03:08.130 Lots of things gypsy. 513 01:03:08.130 --> 01:03:15.630 Come on good. So this sample mean, it's a random variable itself so it. 514 01:03:15.630 --> 01:03:26.400 Itself has a mean understand deviation the sample mean has a mean you got to sit and think about that a little. So you have. 515 01:03:26.400 --> 01:03:29.670 You a sample of somebody students as a mean. 516 01:03:29.670 --> 01:03:37.650 Each time you take 70 different students, you get a different sample mean so the sample mean bounces around a little the sample mean has a mean. 517 01:03:37.650 --> 01:03:41.699 Okay, the sample mean has a standard deviation. 518 01:03:41.699 --> 01:03:49.139 Okay, and we can get ranges and things so. 519 01:03:49.139 --> 01:03:52.710 So, the state, it was a little hat on it. 520 01:03:52.710 --> 01:03:56.070 That would be a sample, a sample statistic. 521 01:03:59.099 --> 01:04:09.539 Now, the thing is that the sample means of the 70 students, it bounces around as we take different groups of 70 students, but it doesn't bounce around as much as the original mean. 522 01:04:09.539 --> 01:04:14.280 And if the samples bigger, it doesn't bounce around bounce around blasts. Okay. 523 01:04:14.280 --> 01:04:19.110 So here example, 8, 1. 524 01:04:19.110 --> 01:04:23.639 Were throwing some, some algebra at this idea. 525 01:04:23.639 --> 01:04:28.829 So, the original 7,000 students. 526 01:04:28.829 --> 01:04:32.010 Has a mean going to call it expected value effects. 527 01:04:32.010 --> 01:04:37.559 X is a random student hype so the whole population 7,000 students has I mean, you. 528 01:04:37.559 --> 01:04:41.070 As a variance Sigma squared. 529 01:04:41.070 --> 01:04:48.750 That's who the whole population what about our samples and you get each samples different but what about. 530 01:04:48.750 --> 01:04:52.559 How is the mean of the 70 students mean? Height. 531 01:04:53.730 --> 01:05:03.329 What can we say about it? Well, 1st, thing we can say is that its mean is the whole sample of the whole population. So, in this case. 532 01:05:04.440 --> 01:05:07.739 The sample mean is the population means so. 533 01:05:07.739 --> 01:05:14.369 So, we take we take a random 70 students, we measure their the height, take the average. 534 01:05:14.369 --> 01:05:18.929 That average the mean of that average will be the meat of the whole population. 535 01:05:18.929 --> 01:05:26.460 So, because means, do this expectations do this? What about the variance of the. 536 01:05:27.414 --> 01:05:41.094 Of this sample well, we're going to do is we're going to bring in a formula. I just sort of passed over quickly previous chapter. I think that if you have independent. 537 01:05:41.909 --> 01:05:47.130 Variables then the variances will add if they're independent. 538 01:05:47.130 --> 01:05:59.639 It's positively correlated the variants will get larger if they're negatively correlated the variance of the summit smaller. But if they're independent and I'm assuming that I'm randomly picking students. 539 01:05:59.639 --> 01:06:02.730 Then there are. 540 01:06:02.730 --> 01:06:08.760 They're independent in that case of variances ads. So so so, what's the variance of my. 541 01:06:08.760 --> 01:06:13.619 Of the mean well, the variance of the mean is just. 542 01:06:13.619 --> 01:06:21.809 1, over N, squared the variance of the sub, and it'll net out that the variance goes down by a factor of van. If there's any students in the sample. 543 01:06:23.519 --> 01:06:29.340 Where Sigma squared is apparent to the original population of students so. 544 01:06:29.340 --> 01:06:35.489 If I take 100 students, the variants of the mean of this 100 students is 1. 545 01:06:35.489 --> 01:06:38.880 Hence, the variants of the whole population. 546 01:06:38.880 --> 01:06:41.940 Decided to look like a lot of large numbers here. 547 01:06:41.940 --> 01:06:50.369 So the more students, so, in other words, the more students in our sample, the less the mean of the sample bounces around. 548 01:06:50.369 --> 01:06:57.360 And we're bound where I'm bouncing around is informal way of talking about it. The variance of the mean of the sample. 549 01:06:57.360 --> 01:07:04.349 Okay, and this is something going to proving seems like every chef. 550 01:07:04.349 --> 01:07:11.670 Okay um, now. 551 01:07:13.920 --> 01:07:17.099 Now, where this can be used. 552 01:07:19.590 --> 01:07:23.639 All we're talking here is about confidence intervals. 553 01:07:26.250 --> 01:07:32.519 And 1, K and probability distributions so. 554 01:07:33.750 --> 01:07:36.960 I said getting on my hands here. 555 01:07:37.980 --> 01:07:43.889 But for populations, like, let's say, for our students. 556 01:07:45.539 --> 01:07:50.519 Maybe we don't need to know the mean directive, but maybe we want to know. 557 01:07:50.519 --> 01:07:55.170 What's the probability that the students are. 558 01:07:56.219 --> 01:07:59.579 That American underground of student is less than 6 feet high. 559 01:07:59.579 --> 01:08:07.440 Because maybe we're going to design 1 of these centuries. We're going to update the Darren communication center, those yellow seats. 560 01:08:07.440 --> 01:08:12.030 That are older than your parents, perhaps. 561 01:08:12.030 --> 01:08:19.770 Because they were installed some of them in the mid seventies. I think actually some of them, maybe the early eighties. So. 562 01:08:19.770 --> 01:08:28.409 I'm not joking about older than your parents. Okay. So, let's suppose they're going to say replace seats and the Darren. 563 01:08:28.409 --> 01:08:37.649 Communication center, and we want the seats to be big enough for current students and let's say working with Heights since I'm talking about. So we'd like to know. 564 01:08:37.649 --> 01:08:42.720 Let's suppose we have a seat that can comfortably fit a 6 foot student or a smaller. 565 01:08:42.720 --> 01:08:50.130 So we'd want to know how many students or what fraction are more than 6 feet high. 566 01:08:51.329 --> 01:08:58.979 And let's suppose that we're going to do that by picking a random sample of students, say 70 students and look at their heights. 567 01:08:58.979 --> 01:09:02.729 And from the heights distribution of this sample. 568 01:09:02.729 --> 01:09:09.989 We want to get a confidence interval on how many students that are more than 6 feet high. 569 01:09:12.864 --> 01:09:26.484 So, and we're getting things in here, I'm just waving my hands, but I just want to give you an executive summary. I'll drill down at the math and these critical thing, these confidence some of these critical values as they talk about here are important. 570 01:09:28.470 --> 01:09:35.939 To give you an economic example, you have a business. Okay the business needs some cash to survive. If your business has. 571 01:09:35.939 --> 01:09:40.140 You know, doesn't sell enough widgets. You're going to run out of cash and go bankrupt. Maybe. 572 01:09:40.585 --> 01:09:55.375 Well, see, you doing economic, you're big business, you're doing economic modeling about the economy and interest rates and inflation and blah, blah, blah, blah. And so you can use this economic modeling to get a confidence animal to get a probability that you'll still stay in business. 573 01:09:56.939 --> 01:10:00.600 The confidence interval there so that was 2 examples. 574 01:10:00.600 --> 01:10:04.529 I don't suppose you get us have fun with us. 575 01:10:04.529 --> 01:10:11.369 Maybe what Guinness the customers really would hate is a batch of beer was reduced with 2 little alcohol. 576 01:10:11.369 --> 01:10:16.859 May that may not be true, but, you know, just having fun. Now, it's late in the day. So. 577 01:10:16.859 --> 01:10:24.029 So, goodness wants so, the critical thing for goodness is that they not sell beer that is too little alcohol. 578 01:10:24.029 --> 01:10:28.350 Or maybe not too much. It is too much then maybe the taxes will go up. 579 01:10:28.350 --> 01:10:38.609 So, again, so there's sampling from taking a small sample of the production run and from that, they want to get a confidence interval. 580 01:10:38.609 --> 01:10:43.199 That the true concentration of alcohol is within these limits. 581 01:10:43.199 --> 01:10:46.289 Or you're the poster. 582 01:10:48.210 --> 01:10:54.689 You know, it's, you know, you'll see these things that they surveyed and the purple party's going to get. 583 01:10:54.984 --> 01:11:06.984 You know, more votes, then the orange party 98 times out of 100, whatever that's confidence intervals. That's what we're talking about here statistics calcium's come into this. 584 01:11:06.984 --> 01:11:11.604 It comes into things like these tale probabilities for the calcium and there's a table. 585 01:11:12.479 --> 01:11:17.880 I gave you a page number was a while when you could calculate it and Matt, and I for Mathematica. So. 586 01:11:19.229 --> 01:11:23.369 Sampling distribution. 587 01:11:23.369 --> 01:11:27.659 Again, communications. 588 01:11:27.659 --> 01:11:35.729 I know we have our communications example again. You want to find the probability that a packet is lost. 589 01:11:35.729 --> 01:11:43.949 So the problem and maybe your error correction code can that suppose your air correction code can handle up to 3 errors of packet? 590 01:11:43.949 --> 01:11:50.970 More than that, it fails. So now you need to know that tail distribution of there being more than 3 errors. 591 01:11:50.970 --> 01:11:54.300 And the packet, so it says confidence terrible thing. 592 01:11:54.300 --> 01:12:03.090 Okay, and okay, so that's the parameter estimation is want to estimate the mean or something. 593 01:12:04.229 --> 01:12:11.520 I don't know airplanes, the heavier the passengers are the more fuel. 594 01:12:11.520 --> 01:12:18.449 They need so they want to estimate and estimate for the mean mass of the passengers on the plane. 595 01:12:21.444 --> 01:12:36.114 And how they're distributed, if he flies small commuter aircraft, you know, the 1 where they wind up the rubber band before they take off, they made I've been on somebody they've actually been told the passengers to move forward or move backward in the aircraft even out the. 596 01:12:36.390 --> 01:12:46.439 Actually, the moment of their mass. Really? No. Okay. So sample means sample to you on an estimate for the variance of the. 597 01:12:46.439 --> 01:12:50.279 Population given the variance of the sample, so. 598 01:12:50.279 --> 01:12:53.880 Talk about that. 599 01:12:53.880 --> 01:13:05.640 And error, estimators and errors, and so on things may not be normal things may be exponential, exponential service times or something. Customers arriving. 600 01:13:05.640 --> 01:13:16.890 At a window packets, arriving at a package switch the arrival time between the packets might be exponential. 601 01:13:16.890 --> 01:13:23.729 And again, if the customers, the packets arrived to quickly, There'll be a backlog. 602 01:13:24.085 --> 01:13:37.345 Maybe a packet will be dropped, so you'd like, so the probability of packet is dropped is probably in her arrival time is less than a certain amount. So you may not care about the manager arrival time. You care about the probability of it being less than a certain amount. 603 01:13:37.345 --> 01:13:41.664 So estimators you want to estimate what the end arrival time is there something. 604 01:13:42.000 --> 01:13:45.659 Talking about that here um. 605 01:13:45.659 --> 01:13:50.729 Some consistency now, it turns out there are different types of estimators. 606 01:13:50.729 --> 01:13:55.770 If I had my students and 7,000 students and take 70. 607 01:13:57.060 --> 01:14:01.170 I look at the height of the 70 students, and I from them, I want to estimate. 608 01:14:01.170 --> 01:14:05.609 The whole the original whole population, and I was talking about using the mean here. 609 01:14:05.609 --> 01:14:11.069 Maybe you don't want to use, I mean, maybe I'll use the media, and for some purposes, a median might be better than the mean. 610 01:14:11.069 --> 01:14:15.689 Maybe the average of the high of the tallest and Florida students. 611 01:14:17.760 --> 01:14:22.529 The median would be better if the original population is not calcium perhaps. 612 01:14:22.529 --> 01:14:27.119 Maybe, there's some reason it's not calcium. 613 01:14:27.119 --> 01:14:35.399 Okay, talking about finding good estimators maximum likelihood. I hadn't spent enough time on. I'll talk about more than that plus on. 614 01:14:35.399 --> 01:14:39.180 Okay, so that's. 615 01:14:39.180 --> 01:14:46.529 We talking about that more. That's enough new stuff. So, let's just rehash. Do where is the. 616 01:14:46.529 --> 01:14:55.680 Don't know where I put the other page in any case. 617 01:14:55.680 --> 01:14:58.859 So, what I was talking about today. 618 01:14:58.859 --> 01:15:12.475 Was I spent most of the time on Mathematica showing how it can work with algebra we can integrate functions. We can plot functions. We can differentiate functions. We can evaluate things as numbers. 619 01:15:12.475 --> 01:15:15.505 We can do convolution, which would be the summer random variables. 620 01:15:16.079 --> 01:15:23.399 Work with densities part and so on. So, mathematics is a very good tool and then I went in to. 621 01:15:25.319 --> 01:15:34.439 And went into the textbook getting into chapter 8 statistics, and by the way RPI has the standard dexterity initiative to. 622 01:15:34.439 --> 01:15:37.560 And I happened to be the CO chair of the engineering. 623 01:15:37.560 --> 01:15:45.060 Ad hoc committee, looking at how we should put that into into. 624 01:15:45.060 --> 01:15:52.140 Our courses, you know, I don't actually know what that dexterity means. I'm only the CO chair of the committee. 625 01:15:52.140 --> 01:15:55.289 Well, I'm joking in any case, so. 626 01:15:55.289 --> 01:16:09.119 For probability, we're talking a little statistics in the course and that's what I'm doing now and I'll be for the rest of the semester. I'll be bouncing around back and forth some probability some statistics and frigging in real world examples. 627 01:16:10.350 --> 01:16:15.029 So, if there's any questions, if not. 628 01:16:16.949 --> 01:16:23.010 Time to go out and relax and I will see you on Thursday. 629 01:16:23.010 --> 01:16:29.189 Questions no. 630 01:16:29.189 --> 01:16:33.090 Okay, yeah, bye.