WEBVTT 1 00:00:29.754 --> 00:00:43.825 Okay, good afternoon. 2 00:00:43.854 --> 00:00:45.204 So. 3 00:00:57.149 --> 00:01:00.270 Probability class 24. 4 00:01:00.270 --> 00:01:03.869 Let me start a. 5 00:01:06.000 --> 00:01:11.040 It is. 6 00:01:11.040 --> 00:01:21.719 Mm, hmm. 7 00:01:21.719 --> 00:01:25.230 Okay. 8 00:01:27.269 --> 00:01:33.239 So, good to have today, a couple of things 1st, for people curious about the exam. 9 00:01:33.239 --> 00:01:36.629 This is a scatter plot. 10 00:01:36.629 --> 00:01:43.500 Of time spent on the exam verses, the grade achieved and. 11 00:01:43.500 --> 00:01:50.129 I would say there's no correlation at all like this could, this could be a homework question maybe of, um. 12 00:01:50.129 --> 00:01:53.969 What's the correlation coefficient there? So. 13 00:01:55.980 --> 00:02:03.090 Person who finished quick has got a full points, for example, uh, personal finished, um, you know. 14 00:02:03.090 --> 00:02:08.849 But then people who finished relatively quickly, got very few points and so. 15 00:02:08.849 --> 00:02:12.810 You know, the 2 slowest people. 1 was excellent. 1 was awful. 16 00:02:12.810 --> 00:02:19.710 Okay, this is a probability course. So, statistics course so we got to do statistics on you guys. 17 00:02:19.710 --> 00:02:26.430 Okay, um, couple of things today, um. 18 00:02:26.664 --> 00:02:41.544 I'll be continuing chapter 8, which is statistics and I had some blurbs to classes are gone. I'll be going from getting things from the book, but 1st, I would like to show you, um, mathematic. 19 00:02:41.544 --> 00:02:44.455 I've talked about it before if I can get it working. 20 00:02:44.669 --> 00:02:51.659 Um, so I'm going to have to do for this is going to switch over. 21 00:02:52.800 --> 00:02:56.610 Um, which means, it's not this part is not going to get. 22 00:02:56.610 --> 00:03:00.330 Recorded because they'll be on a different computer, um. 23 00:03:00.330 --> 00:03:08.250 Right, but I have some notes on it. 24 00:03:23.789 --> 00:03:28.229 Okay, so. 25 00:03:29.310 --> 00:03:34.289 What this is is an algebraic manipulation package. It's the world's best. 26 00:03:34.289 --> 00:03:38.069 Um, math and numerical, so, for example. 27 00:03:38.069 --> 00:03:43.740 I could type, um, um. 28 00:03:50.610 --> 00:03:53.699 Syntax is a little weird, um. 29 00:03:55.830 --> 00:04:00.569 Okay, here. 30 00:04:00.569 --> 00:04:09.360 Um, I left out a comma. 31 00:04:13.139 --> 00:04:18.509 So, we couldn't go work with formulas like that. We could, um, and I may say that. 32 00:04:18.509 --> 00:04:25.620 Some saying, I don't know something fancy. Um. 33 00:04:34.259 --> 00:04:39.718 That 1, it couldn't simplify anything. Um, let me put in let's say some. 34 00:04:45.778 --> 00:04:53.548 I don't know, I could put in a K here or something. 35 00:04:58.079 --> 00:05:03.269 Get for me, so you said that for this is something to execute they do formulas like that. 36 00:05:03.269 --> 00:05:07.108 I can do, um, integration. 37 00:05:08.819 --> 00:05:21.384 Um, I do differentiation. Yeah. 38 00:05:21.413 --> 00:05:24.324 Give me something horrible differentiation. Um. 39 00:05:42.899 --> 00:05:46.288 See stuff like that um. 40 00:05:46.374 --> 00:05:59.213 And it can do, um, I can do things I can define functions for example, I mean calcium is built in, but I could define a Gaussian, um, syntax little hard to. 41 00:05:59.213 --> 00:06:02.394 But I'll define I'd say, let's say, um. 42 00:06:07.319 --> 00:06:18.838 Um, 1 hour and, uh, okay, so this is your guys, um. 43 00:06:18.838 --> 00:06:30.269 Let me throw in and actually divide by. Okay. 44 00:06:30.269 --> 00:06:35.369 So, I can, um, launch it or something. 45 00:06:44.519 --> 00:06:51.569 Like, a go soon should look like, um, sorry, I was saying, I could try integrating it. Um. 46 00:07:06.598 --> 00:07:16.499 I don't know, that's a -1 to 1 or something. It should be about 2 thirds. Um, okay. So that says a fraction and get the numerical value. 47 00:07:16.499 --> 00:07:23.968 That so, for -1 Sigma, 2 Sigma, um, I could integrate it Tom say 0, 2. 48 00:07:31.949 --> 00:07:43.949 Infinity, so it will do, um, it'll work with numerica and I'll work with things. So, um. 49 00:07:43.949 --> 00:07:47.069 What else would I want to do? So this is. 50 00:07:47.069 --> 00:07:51.298 So do the, um, again, if I want say, half of. 51 00:07:51.298 --> 00:07:55.769 2, okay, that's a, as a, um. 52 00:07:55.769 --> 00:08:00.418 Expression exact expression I wanted America value. That would be that. 53 00:08:00.418 --> 00:08:08.548 And stuff like that, um, and let me show you, it's also good for doing things. It'd be a mess to do by hand. 54 00:08:08.548 --> 00:08:12.389 Let me do a square way function. 55 00:08:17.848 --> 00:08:25.798 Um, and let's see, what's the square away? Probably I'm going to do that. Um. 56 00:08:27.629 --> 00:08:35.639 I could put conditionals in, um. 57 00:08:38.278 --> 00:08:47.188 Checking the syntax, um, X greater than -1. 58 00:08:47.188 --> 00:08:50.548 And X, less than 1. 59 00:08:50.548 --> 00:08:54.629 That'll be 1 otherwise it will be 0. 60 00:08:54.629 --> 00:09:01.168 Okay, so, let me plot it to see what it looks like. 61 00:09:08.698 --> 00:09:14.698 This might not work. We'll try it. Yeah. 62 00:09:14.698 --> 00:09:24.089 Um, yeah, SH, to square away --1, half, 2 and half and so on. Okay. Now, um. 63 00:09:24.089 --> 00:09:30.808 1 thing I told you is that when you start adding up or combining, or. 64 00:09:30.808 --> 00:09:36.418 Most other density functions I start looking like a, um. 65 00:09:36.418 --> 00:09:44.038 Calcium, so this is 1 square way. What? If I have the sum of 2 scopes squared away? So I'm going to find. 66 00:09:44.038 --> 00:09:47.369 Um, and. 67 00:09:49.318 --> 00:09:55.739 Get a different name, um, and it's going to be, let's say. 68 00:09:56.999 --> 00:10:02.339 A convolution of to g, so to be to say, integrate. 69 00:10:04.168 --> 00:10:11.308 Um, okay, so that will be, um. 70 00:10:16.528 --> 00:10:19.798 Y, times. 71 00:10:29.519 --> 00:10:36.568 Oops, what happens is the most keeps jumping back. 72 00:10:36.568 --> 00:10:43.019 Um, I from minus infinity, um. 73 00:10:46.288 --> 00:10:52.828 Okay, what am I doing? 74 00:10:56.818 --> 00:11:08.129 You plot G2, um, Y2 from minus um. 75 00:11:08.129 --> 00:11:19.288 Are you to 3? Let's say, okay good. 76 00:11:19.288 --> 00:11:28.229 So, is it triangle wave here? Let me try to plot g and G2 together and see if I can do that. 77 00:11:28.229 --> 00:11:32.308 Since I'm trying to do that as an example, it'll probably. 78 00:11:32.308 --> 00:11:43.349 But that's live, um, I said the cursor keeps jumping around as I'm typing. 79 00:11:56.399 --> 00:12:01.678 Yeah. Okay. Um, touch hard to see here. Um. 80 00:12:10.109 --> 00:12:16.198 Okay, so the blue curve is the square way the. 81 00:12:16.198 --> 00:12:24.298 Goes up the orange is I involved 2 square waves. It's a triangle function. It's getting a little smoother. 82 00:12:24.298 --> 00:12:30.899 Suppose I involve to triangle functions. I'll get something which starts looking smooth. 83 00:12:30.899 --> 00:12:36.328 And by the way, um, if we look at the definition for G2, um. 84 00:12:37.708 --> 00:12:43.589 Here what's going, um. 85 00:12:46.798 --> 00:12:55.678 It's a little more there's the actual definition for it. Okay so the square wave had 2 cases. I'll show you what the square away was. Um. 86 00:13:03.839 --> 00:13:11.578 So that's the square wave um, the con, convolution of the 2 squared away that's 23 out. 23 is a square away. 87 00:13:11.578 --> 00:13:16.168 You could have conditionals out. 22 is the convolution of 2 square ways. 88 00:13:16.168 --> 00:13:20.129 And it's not just it's got lines in it. Okay. And again. 89 00:13:20.129 --> 00:13:25.349 Look up here, the plot, um, that was, um. 90 00:13:26.668 --> 00:13:31.619 You see the triangle function now, let me involved 2 triangle functions. Um. 91 00:13:32.698 --> 00:13:37.889 And you're beginning to see an advantage of Mathematica we can do experiments on it. Um. 92 00:13:37.889 --> 00:13:42.389 Okay, so so let me, um, define. 93 00:13:42.389 --> 00:13:52.438 Down bottom g G4, um. 94 00:13:52.438 --> 00:13:59.219 The names, I'm just trying to keep them unique. There's some sort of problem I run into if I use the same variable name more than 1. 95 00:13:59.219 --> 00:14:03.178 It's going to be a convolution integrate. 96 00:14:05.129 --> 00:14:11.399 2 of, um, you know, X4 or something. 97 00:14:11.399 --> 00:14:15.778 Time is G2 of, um. 98 00:14:18.119 --> 00:14:22.708 By 4. 99 00:14:27.629 --> 00:14:33.778 From x4 from minus infinity. 100 00:14:33.778 --> 00:14:39.808 It doesn't, you know, um, Saturday. 101 00:14:43.739 --> 00:14:47.009 Close to that. 102 00:14:47.009 --> 00:14:51.599 Let's see what happened. 103 00:15:08.818 --> 00:15:18.749 Here balance see here. 104 00:15:32.519 --> 00:15:37.229 Okay. 105 00:15:45.058 --> 00:15:55.408 See, I'm missing that balance. 106 00:15:58.739 --> 00:16:05.938 Um, is not balanced here. 107 00:16:14.849 --> 00:16:20.489 It's complaining about this. 108 00:16:36.749 --> 00:16:38.009 Balances 109 00:16:38.033 --> 00:17:00.413 okay. 110 00:17:00.413 --> 00:17:01.464 Try it again. 111 00:17:11.999 --> 00:17:16.378 Probably, as I keep hitting at, um, let's see. 112 00:17:23.368 --> 00:17:27.298 There's a weird syntax, I'm not gonna take time to just, um. 113 00:17:27.298 --> 00:17:35.878 It was okay integrate. 114 00:17:35.878 --> 00:17:39.538 82 6, 4. 115 00:17:39.538 --> 00:17:43.499 X5 just to be safe um. 116 00:18:15.269 --> 00:18:18.719 Okay, it's and see what it looks like. 117 00:18:37.318 --> 00:18:51.598 Uh, talk their staff computers can be slow sometimes. Um. 118 00:19:04.348 --> 00:19:12.269 See, if this thing is working oh, it was just incredibly slow. Okay. 119 00:19:12.269 --> 00:19:15.808 Okay, so this here is the sum. 120 00:19:15.808 --> 00:19:20.669 A 4 step function so we make a touch smaller for you. Um. 121 00:19:20.669 --> 00:19:24.118 Oops. 122 00:19:26.219 --> 00:19:32.159 There, you know, it's looking really close to a normal, let's say so, if I can. 123 00:19:32.159 --> 00:19:38.249 And 1 system is slow. Um. 124 00:19:39.659 --> 00:19:44.578 Okay, but in any case, so I showed you things starting to look like a Gaussian. 125 00:19:44.578 --> 00:19:53.729 Um, that took a while to compute. Okay. And you wonder why I installed computers. 126 00:19:53.729 --> 00:19:57.989 It can do some things faster than me. That's not 1 of them. Um. 127 00:19:57.989 --> 00:20:01.048 So, if I may be plot, um. 128 00:20:03.209 --> 00:20:06.298 I don't know. Gee. 129 00:20:08.459 --> 00:20:14.788 Colleagues 5, it doesn't matter and then. 130 00:20:23.999 --> 00:20:38.003 And G4, X5, um, Brad curly braces did not indicate that notation in mathematics and indicate a list, um, from . 131 00:20:40.348 --> 00:20:49.588 For for something, and the way I enter a line, you can't see me doing it. I'm typing shift to enter. 132 00:21:11.398 --> 00:21:18.479 Okay um, and it's not plotting it very well. Um. 133 00:21:21.358 --> 00:21:24.778 To do all 3 of them together. 134 00:21:33.358 --> 00:21:44.429 To be a call right here it's growing up, but. 135 00:21:46.409 --> 00:21:49.949 What it's supposed to plot the square away to try and go function and this. 136 00:21:49.949 --> 00:21:53.429 Herby thing up here altogether, but basically. 137 00:21:53.429 --> 00:22:03.898 So you can see because the basic so you see, it's the local thing I'm showing you is that we start adding up several, um, Square ways. 138 00:22:03.898 --> 00:22:08.459 It starts looking like, um, a, and even if I add 4 of them. 139 00:22:08.459 --> 00:22:11.759 The broader thing I'm trying to show you. 140 00:22:11.759 --> 00:22:15.179 Is that mathematics is very good at algebra. 141 00:22:15.179 --> 00:22:19.828 And it's good at things that are very difficult to do by hand. 142 00:22:19.828 --> 00:22:23.368 Such as, you know, lots of different cases and so on. 143 00:22:23.368 --> 00:22:30.419 Um. 144 00:22:30.419 --> 00:22:33.659 Other things I can do with it, um. 145 00:22:33.659 --> 00:22:37.499 Well, I can work with distributions and so on. So. 146 00:22:40.528 --> 00:22:49.469 Um, I can say something oh, there is all 3 finally took a while. 147 00:22:51.898 --> 00:22:58.888 Smaller here no bad, small, necessarily, but, um. 148 00:23:05.189 --> 00:23:13.709 Okay, oh, that is nice. I'm dragging on the graph. 149 00:23:16.588 --> 00:23:25.919 Okay, so square wave, it's the blue you can hardly see to try and go away. That's the orange. And then the next 1 up, it's the green. So. 150 00:23:25.919 --> 00:23:31.828 And we could look and see what what for is actually, um. 151 00:23:38.608 --> 00:23:42.058 Probably, I guess I'll get some value here. 152 00:23:42.058 --> 00:23:53.219 There it's now getting AC, fairly messy. Okay. 153 00:23:53.219 --> 00:23:57.479 But it doesn't matter it can handle these different cases and stuff. 154 00:23:57.479 --> 00:24:04.499 Okay um, so that's fun stuff I can do. And you notice it handles things like Infinity. 155 00:24:04.499 --> 00:24:08.189 Um, or numbers, or I could also say. 156 00:24:08.189 --> 00:24:13.648 You know, I, I could also say get specific. I could say G4. Um. 157 00:24:14.699 --> 00:24:20.249 You know, 2 or something and, um, that's too easy. 158 00:24:20.249 --> 00:24:23.548 Point 3 or something. 159 00:24:23.548 --> 00:24:28.019 Whatever okay, so that's Mathematica. Um. 160 00:24:29.489 --> 00:24:34.048 It also works with, um, multiple variables. Of course. 161 00:24:34.048 --> 00:24:39.929 Can stay flock and has all the obvious functions. Um. 162 00:24:46.919 --> 00:24:51.058 Okay, um, I could say plot Tom. 163 00:24:54.058 --> 00:24:59.818 Hello. 164 00:25:07.618 --> 00:25:17.909 I don't know if this works. Um. 165 00:25:26.368 --> 00:25:30.719 It's gonna complain, but I want to see how it complaints. 166 00:25:35.368 --> 00:25:42.749 Uh, 3, D, let's say. 167 00:25:45.683 --> 00:25:59.243 Very nice, very nice. 3 dimensional plots, all sorts of cool things, counterparts, shaded plots. So this is also a nice tool for producing publication quality, you know, graphs and so on. 168 00:25:59.544 --> 00:26:02.304 And this thing is also a. 169 00:26:04.858 --> 00:26:12.179 Go and drag and that sort of thing. So okay. 170 00:26:12.179 --> 00:26:17.308 Um, it will work with. 171 00:26:22.229 --> 00:26:29.308 It'll work with, um, distributions probability functions. Um. 172 00:26:29.308 --> 00:26:33.659 Let me see, um. 173 00:26:35.489 --> 00:26:40.618 Um. 174 00:26:51.509 --> 00:26:52.108 Uh, 175 00:26:52.134 --> 00:26:52.824 let me see, 176 00:26:52.824 --> 00:26:53.844 I can say, 177 00:27:04.374 --> 00:27:04.493 oh, 178 00:27:04.493 --> 00:27:07.344 I gotta probability density function of that or something. 179 00:27:07.344 --> 00:27:07.762 Um. 180 00:27:13.078 --> 00:27:16.888 The syntax right here. Um. 181 00:27:25.618 --> 00:27:33.898 Okay, cool. Um, so I could create a normal distribution of as an abstract concept. 182 00:27:33.898 --> 00:27:38.219 Here with some mean and standard deviation I'm leaving them as. 183 00:27:38.219 --> 00:27:41.249 And I can get the density function of it here. 184 00:27:41.249 --> 00:27:47.398 And the PDF, and I put in some value for X, which is 3, and this is the output down here. 185 00:27:47.398 --> 00:27:56.338 And it does not so it's the 1 over square root of, you know, to a square, blah, blah, blah, blah, you can recognize it as being the correct thing. There. 186 00:27:56.338 --> 00:28:02.278 Um, and of course, if I put in values for. 187 00:28:02.278 --> 00:28:06.209 Then it would, um. 188 00:28:08.189 --> 00:28:11.189 You know, it would do it. Let me send me. 189 00:28:11.189 --> 00:28:17.788 Is there a Sigma 1 or something, and now calculate this here? 190 00:28:19.348 --> 00:28:23.249 And that has an expression I get it as a value. Um. 191 00:28:25.949 --> 00:28:29.638 On. 192 00:28:29.638 --> 00:28:33.058 And I could take the thing and Claude at, um. 193 00:28:37.409 --> 00:28:43.709 Um, PDF and comma. Ex, um. 194 00:28:50.699 --> 00:28:58.288 Right because I need a call right here. 195 00:29:01.169 --> 00:29:04.169 That's your normal. Yeah, so. 196 00:29:04.169 --> 00:29:08.699 Um, integrate and all that good Kim of distribution function. 197 00:29:08.699 --> 00:29:13.138 Instead a PDF I said, um, came out of, um. 198 00:29:13.138 --> 00:29:16.138 You got that and so on. 199 00:29:16.138 --> 00:29:19.288 Any good specific values if I want, um. 200 00:29:19.288 --> 00:29:31.709 Not XX. 201 00:29:34.588 --> 00:29:40.919 And that's an expression of what the American value I can put down here. So that's 1 of the thing. 202 00:29:40.919 --> 00:29:45.239 Okay, um, I can get the mean and variants of, um. 203 00:29:46.013 --> 00:30:00.834 So, various, whatever, um. 204 00:30:04.618 --> 00:30:19.403 That was the weird 1. um, and again, this will be 1 because I defined it to be 1 actually. So. 205 00:30:19.769 --> 00:30:29.278 Okay um, and I can do multi multivariate, normal distributions. Um. 206 00:30:31.048 --> 00:30:39.239 So, um, I could do. 207 00:30:45.269 --> 00:30:49.919 Multi normal distribution, just 2 variables let's say. 208 00:30:49.919 --> 00:30:54.058 Well, let me just make it, um, means 0 and 0. 209 00:30:55.108 --> 00:31:03.148 And I have to give it the, um, various matrix sort of, um, with the variances and the, um. 210 00:31:04.739 --> 00:31:09.419 And just make it, let me make a little correlation. Um. 211 00:31:09.419 --> 00:31:23.429 I dunno. Okay. 212 00:31:27.898 --> 00:31:36.209 I don't know how this works. Um, so I might if I tried plotting it, um. 213 00:31:39.449 --> 00:31:44.759 Yes, um. 214 00:31:53.638 --> 00:31:56.699 And I have to be PDF, of course, um. 215 00:32:07.074 --> 00:32:21.923 This works probably gonna 216 00:32:21.923 --> 00:32:22.314 fail, 217 00:32:22.314 --> 00:32:23.814 but let's see how it failed. 218 00:32:28.318 --> 00:32:40.888 Okay, um, probably, let's do something like this and see what happens. 219 00:32:42.929 --> 00:32:46.169 Good. Okay. Um. 220 00:32:46.169 --> 00:32:52.858 So, what I defined here, grab this and shrink it. 221 00:32:56.729 --> 00:33:00.538 You can see it. 222 00:33:00.538 --> 00:33:06.568 Okay. 223 00:33:07.919 --> 00:33:13.558 Okay, um. 224 00:33:13.558 --> 00:33:20.729 Okay, so what I did here is this is a 2 variable, normal calcium distribution. 225 00:33:20.729 --> 00:33:26.278 Or the 2 variables are correlated somewhat so it's not a circle. It's a little bit of a rich. 226 00:33:26.278 --> 00:33:36.148 And, um, come on here. 227 00:33:36.148 --> 00:33:41.489 There now you can see it a little better. Okay. So the way I get it, um. 228 00:33:42.538 --> 00:33:46.318 I can back up a little is that. 229 00:33:46.318 --> 00:33:52.108 There's a function and Mathematica to define a multi variable normal distribution. 230 00:33:52.108 --> 00:33:55.288 And line 56, I defined it. 231 00:33:55.288 --> 00:33:59.009 And I said, I made the 2 means to be 0. 232 00:33:59.009 --> 00:34:08.278 And for the 2, by 2 matrix of, um, variances and covariances, I made the matrix not to be an agile, which, I mean, they wouldn't be correlated. 233 00:34:08.278 --> 00:34:21.809 But I made the off, um, diagnose 3.5 instead of 0. so I made the code, the variances I made 1, but the CO variances between the 1st and 2nd variable. I made to be point 5. 234 00:34:21.809 --> 00:34:28.469 And so, in 3, it's a distribution as an abstract concept to do something with it. 235 00:34:28.469 --> 00:34:34.139 I do call it on PDF, which gets the density function, or CDF gets the cable to function. 236 00:34:34.139 --> 00:34:39.389 And so, so down here, if you look online 59. 237 00:34:39.389 --> 00:34:45.838 Pdf and I give it the name of a distribution and then I give it a list of arguments and that's a list of being racist. 238 00:34:46.373 --> 00:34:59.844 And so just the arguments that just pick some new names for variables and then Todd does a 3 D plot. The 1st argument is the function and the 2nd and 3rd argument is the ranges for the 2 variables. 239 00:34:59.844 --> 00:35:01.884 I'm plotting and -2 to 2. 240 00:35:02.878 --> 00:35:07.289 And, um, that's that you say. 241 00:35:07.289 --> 00:35:16.438 So, um, and so the stuff is getting a little too complicated too by hand, you see, then I could start doing things. 242 00:35:16.438 --> 00:35:24.059 Like, I have the distribution, um, I can do stuff, which is going back to chapter 6. I guess now or. 243 00:35:24.059 --> 00:35:32.278 Um, which is a L, there's some examples of the book, but they're a little too hard for me to work in class, but I can do them in class. 244 00:35:32.278 --> 00:35:37.708 When I have the, um, Mathematica, so I've got in here. 245 00:35:37.708 --> 00:35:42.208 And I can look at that see what it is. 246 00:35:47.998 --> 00:35:52.199 That's the function right there. Um. 247 00:35:52.199 --> 00:35:55.679 Too variable function um. 248 00:35:57.748 --> 00:36:01.949 I could do something, uh. 249 00:36:07.079 --> 00:36:11.068 Yeah, I'm not serving so we know what's happening here. 250 00:36:12.179 --> 00:36:18.329 10 3 my mistake. 251 00:36:23.338 --> 00:36:33.898 Let me get some new variables here. Yeah, so that's. 252 00:36:33.898 --> 00:36:39.659 And then I, this is the, the 2 variable calcium that I define now, I could do something. 253 00:36:39.659 --> 00:36:46.949 And I could say, I could integrate it or something. I could integrate out 1 of the variables. Um. 254 00:36:46.949 --> 00:36:52.349 So, I could say integrate yeah. 255 00:36:53.668 --> 00:37:01.739 And bring it down it integrate, um. 256 00:37:04.289 --> 00:37:07.498 Integrate that last thing. 257 00:37:08.909 --> 00:37:18.869 And integrate or something um. 258 00:37:20.634 --> 00:37:21.534 Infinity 259 00:37:37.193 --> 00:37:40.344 okay and it's a 1 variable. 260 00:37:41.849 --> 00:37:48.088 With some mean and standard deviation I don't know what they are here. Um. 261 00:37:48.088 --> 00:37:51.119 Okay, so fun with North America. 262 00:37:51.119 --> 00:38:00.298 So, anything, you'd like little algebra, like, to give me to see if you can stop it. Um. 263 00:38:01.708 --> 00:38:07.318 And a little algebra expressions. Oh, okay. 264 00:38:09.329 --> 00:38:13.170 It will when integrating if the. 265 00:38:13.170 --> 00:38:17.969 Function has a closed form it will always guarantee to integrate it. If. 266 00:38:17.969 --> 00:38:26.250 There is a closed form into grow if there's not that it will give you an American formula, and it will always be able to differentiate stuff. 267 00:38:26.250 --> 00:38:35.130 And it is very careful about things like polls and complex numbers and stuff like that. 268 00:38:35.130 --> 00:38:38.820 So, um. 269 00:38:38.820 --> 00:38:45.599 You know, it's very careful about legal ranges, so if I said something like differentiate square root of X. 270 00:38:47.280 --> 00:38:56.820 X, um, okay, didn't say there. Okay. I was expecting to say, provided access, not negative or something, but, um. 271 00:38:57.840 --> 00:39:01.320 I guess I turned off some of that. Okay. 272 00:39:02.909 --> 00:39:10.559 So real world tools to help you do integrations. So you don't have to memorize all those integral cables and so on. You can do it online. 273 00:39:10.559 --> 00:39:15.090 You have to install it on your computer, but. 274 00:39:16.409 --> 00:39:22.260 So, next part of today. 275 00:39:23.940 --> 00:39:28.469 I'll see if I can say this worksheet. 276 00:39:30.150 --> 00:39:35.429 And, um, so. 277 00:39:42.300 --> 00:39:51.420 Let's save if I can save it, I'll upload it to the. 278 00:39:51.420 --> 00:39:54.449 That's website, uh. 279 00:40:07.135 --> 00:40:08.514 Let's see if this worked, 280 00:40:08.545 --> 00:40:09.235 um, 281 00:40:18.954 --> 00:40:28.614 where did it save it? 282 00:40:32.369 --> 00:40:37.170 I just wanted to save it now less, uh, you know, in case something. 283 00:40:38.219 --> 00:40:48.090 Oh, I see where it might have gone just a 2nd. 284 00:40:53.730 --> 00:40:58.949 Cool. Let me just show you and see if it works. 285 00:41:10.050 --> 00:41:15.599 Okay, there's some stuff at the start. 286 00:41:15.599 --> 00:41:21.840 Computers are slow. 287 00:41:21.840 --> 00:41:25.590 Um, yeah. Okay, so you have to get that. 288 00:41:27.690 --> 00:41:30.900 Okay, so. 289 00:41:30.900 --> 00:41:35.699 As regards the course this is enrichment material. 290 00:41:35.699 --> 00:41:42.510 Um, and see. 291 00:41:43.619 --> 00:41:51.000 Webex is still going, um, yeah. Okay. Transcribing me. So, it looks like it's. 292 00:41:51.000 --> 00:41:55.679 Possibly conceivably working. Is it recording? It's recording. 293 00:41:55.679 --> 00:42:03.150 Okay, so as regards the course the mathematic is enrichment material. 294 00:42:03.150 --> 00:42:15.119 You're not required to know what you will not be examined on it, but I think it's useful for you as an engineer. If you have more tools, you can do better work. And this is a tool. 295 00:42:15.119 --> 00:42:23.429 That I recommend, you, you know, it exists now. So if you have a problem, which where you have to do algebra. 296 00:42:23.429 --> 00:42:27.989 We work with stuff then, you know, this success, you can maybe use it. 297 00:42:27.989 --> 00:42:33.719 So, um, now how it competes to Matlab. 298 00:42:33.719 --> 00:42:38.159 Is that Matt lab? 299 00:42:38.159 --> 00:42:42.869 Has better numeric stuff just, um. 300 00:42:42.869 --> 00:42:48.030 Things out here it's a 2nd. Okay. Um. 301 00:42:48.030 --> 00:42:52.170 Matlab is better for numerical stuff you wanted to. 302 00:42:52.170 --> 00:42:56.849 Program transforms and stuff. It's got a lot of engineering toolkits added to it. 303 00:42:56.849 --> 00:43:07.559 So, Matt Labs better at that, but Matlab by itself doesn't do algebra at all. What has add ons it may do. So you want to do algebra and beautiful plot. 304 00:43:07.559 --> 00:43:14.039 Use Mathematica, you want to work with formulas as formulas use Mathematica you just want to work with. 305 00:43:14.039 --> 00:43:20.070 Matrices of numbers, whatever you wanted for your transforms whatever then then Matlab is better. 306 00:43:20.070 --> 00:43:26.190 Also, I think Matt loves thoughts look awful, but that's just me. 307 00:43:27.239 --> 00:43:30.840 Hello? Hello? Hello? 308 00:43:30.840 --> 00:43:38.130 This actually works. Okay, so we're back to chapter 8 now, um, statistics. 309 00:43:38.130 --> 00:43:45.809 And. 310 00:43:46.614 --> 00:44:00.625 Okay, so no further questions that we might want to have. 311 00:44:00.869 --> 00:44:07.440 Um, so. 312 00:44:10.409 --> 00:44:17.280 Um, population. 313 00:44:17.280 --> 00:44:20.519 Say, whatever's, um. 314 00:44:20.519 --> 00:44:23.579 Whatever is. 315 00:44:23.579 --> 00:44:27.750 You know, number widget so I never. 316 00:44:28.889 --> 00:44:38.639 Is being generated by some random process. 317 00:44:40.079 --> 00:44:47.190 By some random distribution with unknown parameters. 318 00:44:52.409 --> 00:44:57.090 Okay, um, IJ, um. 319 00:45:02.760 --> 00:45:07.289 Generate random uniform. 320 00:45:07.289 --> 00:45:13.260 Variables in the range. 321 00:45:15.000 --> 00:45:18.300 Um, say, low to high. Okay. 322 00:45:21.329 --> 00:45:25.380 So, we we know it's a uniform distribution. 323 00:45:27.599 --> 00:45:33.539 But don't know L. L. H. okay. 324 00:45:34.559 --> 00:45:44.340 So the question is what, our L. H, let's say, um, this one's really simple. Um, so we, you know, we observed. 325 00:45:45.960 --> 00:45:50.610 101 up to 10,100. 326 00:45:50.610 --> 00:45:54.030 And now, um, estimate. 327 00:45:56.309 --> 00:46:00.090 H, so, um. 328 00:46:00.804 --> 00:46:15.295 This is a crazy thing. You ask you a question time to wake up. Um, we know we know the from a uniform distribution from so. So the, um, they're all uniform from L to H. 329 00:46:15.659 --> 00:46:23.489 Low and high, we have the exercise we don't have Allen. H what is a good estimate for L. 330 00:46:23.489 --> 00:46:29.969 Let's say, you think might be any idea. 331 00:46:29.969 --> 00:46:37.590 They've been pulled from a uniform distribution. We have 100 x size there from a uniform distribution. 332 00:46:37.590 --> 00:46:43.320 What's the best guess the lower bound to the uniform distribution? What's a good common sense? Guess? 333 00:46:43.320 --> 00:46:49.050 For a lower bound for the uniform distribution any ideas. 334 00:46:52.139 --> 00:46:57.119 Um, let's suppose I pick say so, here here are some exercise. 335 00:46:58.949 --> 00:47:02.099 310 2. 336 00:47:02.099 --> 00:47:06.360 25 1. 337 00:47:06.360 --> 00:47:10.230 1714, let's say. 338 00:47:11.670 --> 00:47:17.969 Um, so could, uh, could L, be 3. 339 00:47:17.969 --> 00:47:26.730 Could it could possibly be 3 if, um, could could the range possibly. 340 00:47:26.730 --> 00:47:32.400 So, he is the range 310 possible. 341 00:47:35.429 --> 00:47:40.019 Are generating 310 to 251,714. 342 00:47:40.019 --> 00:47:43.710 Could those numbers have been selected from the range? 3 to 10. 343 00:47:47.610 --> 00:47:55.469 What do you think? Um, if the range is 310. 344 00:47:57.090 --> 00:48:00.449 Could it produce the number? 5? Is that legal. 345 00:48:00.449 --> 00:48:05.280 Could you reduce the number 1? No. 346 00:48:05.280 --> 00:48:08.280 So, if we're seeing these numbers here. 347 00:48:08.280 --> 00:48:13.619 What do you think what might be a common sense range for that? 348 00:48:13.619 --> 00:48:19.590 I'm seeing numbers 3 to 10 to 222 5 to 1 to 17 to 14. 349 00:48:19.590 --> 00:48:24.300 What might be a common sense value for the lower end of the range. 350 00:48:26.250 --> 00:48:30.780 Nothing tricky here. Any idea. 351 00:48:35.219 --> 00:48:42.420 Well, you agreed that, um, 3 could not possibly be a lower value for the range. Okay. 352 00:48:42.420 --> 00:48:48.179 Um, because we have the numbers there that are smaller than 3. okay. 353 00:48:48.179 --> 00:48:54.869 So, 3 is not a lower value if we're reducing numbers smaller than that. So, um. 354 00:48:54.869 --> 00:48:59.400 What could be a reasonable lower value? Any idea. 355 00:49:01.110 --> 00:49:06.690 1, yeah, thank you. So, um, so, so good value. 356 00:49:09.119 --> 00:49:12.239 Or could be 1. okay, so those. 357 00:49:12.239 --> 00:49:16.019 It could be less than 1. it cannot be bigger than 1. okay so. 358 00:49:19.469 --> 00:49:26.070 Greater than what about age what about common sense value for the high end of the range? Maybe. 359 00:49:27.900 --> 00:49:34.889 And the idea someone else is it false with the high end of the range might be 10. 360 00:49:34.889 --> 00:49:39.090 Is that even legal? Why not? 361 00:49:40.769 --> 00:49:53.340 Someone else, okay maybe 2020. perhaps it could be large at 2130, but it cannot be less than 20 cause we produced the 20. okay. So. 362 00:49:55.289 --> 00:49:58.800 So here's some sort of common sense thing. Okay. 363 00:50:01.139 --> 00:50:12.570 Common sense guess it doesn't mean it's correct, but we might estimate that the low thing would be the minimum of all the exercise and the high end of the range would be the maximum of all the exercise. Okay. 364 00:50:12.570 --> 00:50:18.389 Um, so this is not, you know, maybe maybe not the best perhaps. Um. 365 00:50:21.780 --> 00:50:29.155 Pretty good. Okay, but you see, we got a concept here. I would distribution. 366 00:50:29.155 --> 00:50:37.614 I know that the numbers are being selected from a uniform distribution, but I don't know the bounds, but I select a file of numbers here. 367 00:50:37.920 --> 00:50:43.710 And I want to estimate the, the unknown parameters of that distribution, the unknown parameters of the low. 368 00:50:43.710 --> 00:50:48.690 And the high end. Okay. Um. 369 00:50:49.769 --> 00:50:54.929 Yeah, I play a personal little game like that sometimes. Um. 370 00:50:54.929 --> 00:50:59.130 I go skiing occasionally in the winter and, um. 371 00:50:59.130 --> 00:51:05.010 I'm disappointed we probably won't be getting more than another month of snow. That's been Troy. Um. 372 00:51:06.900 --> 00:51:12.539 You think I'm joking. 1st year. President Jackson was president it's snow today before graduation. 373 00:51:12.539 --> 00:51:27.239 Um, okay, so I'm sitting in the chair lift, you know, I'm looking at the numbers on the chairs that pass the other direction. I can board sitting on nothing else to do. 374 00:51:27.239 --> 00:51:35.130 So, I'm trying to guess how many, you know, what's the highest number on a chair and I'm seeing the numbers on the chairs that passed me. So I'll try to guess. 375 00:51:35.130 --> 00:51:42.090 You know, it's the highest chair number, let's say, or how many chairs there are 3 number 1 up. Okay. So. 376 00:51:42.090 --> 00:51:48.539 So, that's that, um, that's question 1 what are some unknown values? Um. 377 00:51:49.980 --> 00:51:53.969 So question, so that was question. 1 question 1. 378 00:51:53.969 --> 00:51:57.210 Is what are the unknown parameters. 379 00:52:03.900 --> 00:52:12.659 Question too is my assume distribution. Correct? 380 00:52:15.329 --> 00:52:22.889 So, um, so, let's suppose the exercise or something like this um. 381 00:52:24.179 --> 00:52:27.780 Suppose the exercise are, I don't know. Um. 382 00:52:30.329 --> 00:52:34.079 Uh, 1, 5, 2. 383 00:52:34.079 --> 00:52:37.199 1, 7, 3, 2. 384 00:52:37.199 --> 00:52:45.630 Or something, 1 and either, and they're really packed to the left. They really buys to the left. 385 00:52:45.630 --> 00:52:52.409 Um, so so this is perhaps not uniform. Okay. 386 00:52:56.159 --> 00:52:59.760 Cause they're packed to the left, so, um. 387 00:52:59.760 --> 00:53:06.269 So, we might not even know the distribution, we guess it uniform and we see. 388 00:53:06.269 --> 00:53:18.690 Yeah, you know, I plot them. I like plots a lot. You plot them. The numbers are all packed. You know, 7 is big 5, not quite as big, and all these, you know, ones and twos that they've left. So. 389 00:53:18.690 --> 00:53:23.309 So we can say, maybe uniforms the wrong idea here. 390 00:53:23.309 --> 00:53:28.500 So, um, oops. 391 00:53:28.500 --> 00:53:33.570 Are a little trickier question 3 um. 392 00:53:35.579 --> 00:53:41.579 Um, so we guess the parameter. 393 00:53:46.559 --> 00:53:53.730 You know, uh, but it is this guess. 394 00:53:55.559 --> 00:53:59.610 Reasonable, um, where I'm using a common sense term. Okay. 395 00:54:02.280 --> 00:54:05.909 Guessing it to mean, um. 396 00:54:05.909 --> 00:54:12.090 Now, there is a particular way these questions are worded. 397 00:54:12.090 --> 00:54:15.360 I'm jumping around in the book a little, um. 398 00:54:15.360 --> 00:54:18.809 So. 399 00:54:18.809 --> 00:54:27.090 Okay. 400 00:54:30.239 --> 00:54:33.809 Okay. 401 00:54:33.809 --> 00:54:37.590 Hello. 402 00:54:39.840 --> 00:54:43.769 And a nasty feeling, it just stopped recording and let me just check. 403 00:54:52.320 --> 00:54:58.079 Let's see, it's recording, I think, is it sharing the screen? 404 00:55:03.030 --> 00:55:08.849 Possibly not. Oh, sorry. It was start. 405 00:55:11.369 --> 00:55:22.889 Okay, um, okay, um, there's a particular way. These questions are sometimes worded. 406 00:55:22.889 --> 00:55:23.639 Um, 407 00:55:47.215 --> 00:55:48.355 and this is for the yes, 408 00:55:48.355 --> 00:55:49.164 no one's. 409 00:55:51.750 --> 00:55:55.260 For the yes, no questions. 410 00:55:56.820 --> 00:56:02.849 Um, give an example, um. 411 00:56:05.789 --> 00:56:10.530 You say, Todd, I'll do it by example, like, um. 412 00:56:12.900 --> 00:56:19.230 We have a coin maybe it's there. 413 00:56:20.730 --> 00:56:28.679 Hey, we know and so there are the observations so. 414 00:56:29.699 --> 00:56:33.539 We toss it San equals 100 times. 415 00:56:34.619 --> 00:56:41.909 The is, you know, say, 0100 whatever. So 0, being killed in 1 being heads. 416 00:56:41.909 --> 00:56:50.070 Um, and so, let's say we see 60 heads and 40 tails. 417 00:56:51.300 --> 00:56:58.739 Is it fair? Well, who knows? Um, so the way it's worded is if. 418 00:57:00.269 --> 00:57:08.429 It is fair. What's the probability? 419 00:57:11.849 --> 00:57:15.449 I was seeing this outcome. 420 00:57:19.980 --> 00:57:24.360 And so is precisely 60, 40 is. 421 00:57:24.360 --> 00:57:32.940 A little, you know, that's a very precise outcome. Very small probability. So we might word it as saying the probability. 422 00:57:32.940 --> 00:57:40.829 Of seeing greater than equal to 60 heads it's probably is a better thing. 423 00:57:41.880 --> 00:57:47.190 It's a, it's a better outcome here. Okay. Okay. 424 00:57:49.590 --> 00:57:53.730 So, you know, I don't know if the coins there or not fair. Um. 425 00:57:54.809 --> 00:57:58.349 Even though, so I said, you know, if I talk to a 100 times, maybe. 426 00:57:58.349 --> 00:58:03.360 I get 100 heads and no tails That'll happen to to the -100timesbut. It could happen. 427 00:58:03.360 --> 00:58:11.190 So, but what I asked myself is, if the coin is fair, what's the probability of seeing 60 or more ads? 428 00:58:11.190 --> 00:58:16.199 40 or fewer tales now there's the question I can answer. Okay. 429 00:58:16.199 --> 00:58:21.869 Um, so that's, um, so I. 430 00:58:21.869 --> 00:58:27.869 So this is the particular way that we, um, word these things. 431 00:58:27.869 --> 00:58:38.070 It's the ways it's a little contorted, but it's worded that way. So now we've got something we can actually do mathematics on. We can tell you a yes or no. So. 432 00:58:39.420 --> 00:58:46.500 And I got things relating to that. Like, I typed up on the blog well, you think of political polling um. 433 00:58:46.500 --> 00:58:58.829 You know, they say you would see these results, you know, 95 times out of 100 or something. They're talking about that. So, let's talk about the specific let me run with this point. Example. Okay. Um. 434 00:59:02.639 --> 00:59:05.639 To run with this coin example. Okay. 435 00:59:09.539 --> 00:59:15.150 Okay, um, so, you know, so I'm. 436 00:59:15.150 --> 00:59:21.210 Okay, so the experiment cost 100 times. 437 00:59:22.920 --> 00:59:26.369 The random variable that I'm going to observe. 438 00:59:28.650 --> 00:59:33.030 Is, um, exits a number of heads. 439 00:59:35.610 --> 00:59:40.320 And just as a refresher, um, the expected value of X. 440 00:59:40.320 --> 00:59:44.010 Is going to be 50, um. 441 00:59:45.900 --> 00:59:51.510 Cause it and P, and it's 151 half. 442 00:59:51.510 --> 00:59:57.480 Okay, um, the standard deviation. 443 00:59:59.400 --> 01:00:03.389 Is going to be the square root of. 444 01:00:03.389 --> 01:00:06.989 Square root of 100 times 1, half times 1 half. 445 01:00:06.989 --> 01:00:10.980 Which is, um. 446 01:00:12.449 --> 01:00:16.530 5, if I got it right call me on an error is okay. 447 01:00:16.530 --> 01:00:27.840 So this means, um, so the probability that X is say, um. 448 01:00:28.344 --> 01:00:39.505 Call this mean, and call it a Sigma. So the probabilty that mean minus Sigma less than X less than plus Sigma is about 2 thirds. Okay. 449 01:00:39.505 --> 01:00:46.255 I'm being very real so, this would be the probability that so, is that from 45. 450 01:00:47.070 --> 01:00:53.070 That's the next less than 55 is about 2 thirds. Okay. Um. 451 01:00:53.070 --> 01:00:56.760 Roughly, okay, it's, um, if I use the values, it's. 452 01:00:56.760 --> 01:00:59.880 Um, Z scores, it's, um. 453 01:01:04.980 --> 01:01:08.699 Say, Z, being a right hand distribution of the, um. 454 01:01:08.699 --> 01:01:13.349 Or whatever it is, my mind is going on. 455 01:01:14.369 --> 01:01:25.050 Queue or something, um, -1-or, something like that. Okay. Now. Okay. Going back to the specific thing of 60. 456 01:01:25.050 --> 01:01:33.719 Um, so I want the probability of X is greater than, um. 457 01:01:33.719 --> 01:01:37.530 60 or 60 is new +2 Sigma. 458 01:01:37.530 --> 01:01:40.980 So, if I have my and distribution here. 459 01:01:40.980 --> 01:01:47.579 Um, that's the mean, plus Sigma +2 segment and so on. 460 01:01:47.579 --> 01:01:52.289 And we want the probability that we're over in this right hand tail here. 461 01:01:52.289 --> 01:02:01.769 And, um, I can't remember it's a couple percent. Uh, so. 462 01:02:01.769 --> 01:02:07.739 Basically, I could go back to. 463 01:02:07.739 --> 01:02:09.474 It's actually. 464 01:02:27.750 --> 01:02:41.010 Hello hi. 465 01:02:41.010 --> 01:02:49.170 Okay, um, so what's the thing? Uh, would it be. 466 01:02:54.210 --> 01:02:57.389 And and so I could find, um. 467 01:02:57.389 --> 01:03:01.380 I want is like the, um. 468 01:03:05.699 --> 01:03:10.650 Uh, and then and 2. 469 01:03:10.650 --> 01:03:16.230 And it will be 1-that miracle value. 470 01:03:19.920 --> 01:03:24.269 Okay, so 1-that so it's 2% basically. 471 01:03:26.670 --> 01:03:34.769 Okay, um. 472 01:03:57.389 --> 01:04:07.289 Okay, so I'm going a little slow, but I'm trying to nail down the things. So, let me put this in words. Okay. Um. 473 01:04:09.659 --> 01:04:16.320 So, it's this point is fair. 474 01:04:18.719 --> 01:04:23.369 And we toss at 100 times. 475 01:04:28.800 --> 01:04:32.880 Probability we'll see. 476 01:04:32.880 --> 01:04:39.480 Period equal to 60 heads. It's 2%. 477 01:04:39.480 --> 01:04:42.900 Okay, that's mathematics. Okay. 478 01:04:44.639 --> 01:04:49.829 That's math. Is it fair now? 479 01:04:49.829 --> 01:04:54.090 You know, that sort of, you might say that's policy or something. 480 01:04:56.010 --> 01:05:09.900 Okay, so what you see, the way we word these things you can, you can calculate what you can do is you can give a probability of seeing something as bad. Now. What you have to do is say, um. 481 01:05:09.900 --> 01:05:13.559 I could also say, um. 482 01:05:13.559 --> 01:05:18.809 You know, the question, what are my um, no so this is called. 483 01:05:20.940 --> 01:05:25.679 Fine is fair. This is called the hypothesis. 484 01:05:31.710 --> 01:05:37.079 Okay, and going not there. 485 01:05:38.820 --> 01:05:46.199 Is an alternative hypothesis that I'll try to do a hypothesis. Okay. 486 01:05:47.489 --> 01:05:59.909 Okay, now, you know, you have some freedom and selecting the alternative hypothesis. Um. 487 01:06:01.260 --> 01:06:16.014 So the alternative 488 01:06:16.045 --> 01:06:16.764 okay. 489 01:06:18.960 --> 01:06:23.969 And so on, um, you know, I might have said, you know, I, I might have. 490 01:06:28.469 --> 01:06:33.179 I might have asked so the probability. 491 01:06:33.179 --> 01:06:39.780 That the, um, the number of heads. 492 01:06:43.619 --> 01:06:47.429 Is more than 10 off fair. 493 01:06:50.519 --> 01:06:57.449 Either way. Okay. And so just more, you know. 494 01:06:57.449 --> 01:07:02.789 Um, I was asking, what's the probability to the number of heads is more than 60. 495 01:07:02.789 --> 01:07:07.949 So, this would be the probability that the number of hats -50. 496 01:07:07.949 --> 01:07:19.260 Is greater than 10, so no greater than 60 or less than 40. I could have done that. And that would be another. And this would give me, um, different numbers. 497 01:07:19.260 --> 01:07:25.409 So there is some policy thinking when you're formulating these questions, but. 498 01:07:26.909 --> 01:07:34.139 Would you now, you can tie this now down to current events, and, you know, drug tests, whatever. 499 01:07:34.139 --> 01:07:39.780 Example, I use a long time, but, you know, you have a drug which claims to cure, um. 500 01:07:39.780 --> 01:07:48.510 Boldness let's say, and you put it on 10 professors and, you know, 5 of the professors get more hair part of the professors. 501 01:07:48.510 --> 01:07:53.909 Get balder or something, then you can start asking questions. So. 502 01:07:53.909 --> 01:08:01.590 Okay, so I'm trying to nail down the fundamentals of, of some of this. So you see what's happening. 503 01:08:02.849 --> 01:08:05.969 Um, so this is just saying. 504 01:08:05.969 --> 01:08:14.369 That, you know, s, so is this parameter? We're thinking that the P, for the coin toss is 1 half. 505 01:08:14.369 --> 01:08:18.630 And we're saying we do an observation to some experiments that we're getting. 506 01:08:18.630 --> 01:08:21.720 The probability that we have seen something, at least this bad. 507 01:08:21.720 --> 01:08:27.779 If P were in fact, 1 half. Okay. Um, let me pull up the book again. 508 01:08:28.949 --> 01:08:34.229 Okay, um, distribution and so on, um. 509 01:08:36.630 --> 01:08:39.899 Hey. 510 01:08:39.899 --> 01:08:43.079 Now, um. 511 01:08:44.609 --> 01:08:58.140 Hold on okay. Cause that was testing. Now the next thing is, another question is, um, say we have a coin. 512 01:09:04.529 --> 01:09:11.010 It's unknown P, we tasks at end times. 513 01:09:14.670 --> 01:09:20.520 X heads estimate P. 514 01:09:22.890 --> 01:09:27.720 Because a good estimate, um, is the notation. 515 01:09:29.130 --> 01:09:39.479 Say, it's good estimator. So it's actually the best. Um, I know some. 516 01:09:40.590 --> 01:09:45.420 Okay, so we so what we want is, um. 517 01:09:51.180 --> 01:10:00.449 Estimator say functions okay for the distribution say. 518 01:10:05.189 --> 01:10:13.500 So, if it's the coin toss, um, it just the fraction of heads we see is a good Estimator for P. 519 01:10:13.500 --> 01:10:18.810 Under some, some reasonable assumptions, it's the best. So. 520 01:10:18.810 --> 01:10:23.550 Okay, um. 521 01:10:23.550 --> 01:10:34.770 So this is called parameter estimation. 522 01:10:38.279 --> 01:10:41.310 Up there that's section 8.2. 523 01:10:50.220 --> 01:10:58.770 The unknown the, the unknown P that's a parameter. We don't know what it is we want to estimate it's value after some observations. 524 01:10:58.770 --> 01:11:03.510 Okay um, so. 525 01:11:06.630 --> 01:11:10.140 And there's things about bias and so on, um. 526 01:11:15.420 --> 01:11:23.159 Some estimators are better than others. Um. 527 01:11:27.960 --> 01:11:33.180 Or better. Okay, so. 528 01:11:35.670 --> 01:11:41.699 So what's better mean? Okay. 529 01:11:46.949 --> 01:11:52.979 Word mean, that could be confusing. What's better? How about that? Okay. 530 01:11:52.979 --> 01:12:00.449 Um, so, let me give you an example. Um. 531 01:12:04.500 --> 01:12:10.289 It. 532 01:12:11.430 --> 01:12:16.229 Yeah, or something, um. 533 01:12:19.500 --> 01:12:26.729 So, our distribution, let's say, end with, um. 534 01:12:29.399 --> 01:12:38.970 So, unknown mean unknown mean Sigma equals 1 and that means. 535 01:12:40.439 --> 01:12:45.840 Okay, so, uh. 536 01:12:45.840 --> 01:12:48.960 We sample, um, 100 numbers. 537 01:12:51.989 --> 01:12:56.819 Exercise and. 538 01:12:58.590 --> 01:13:04.409 We want to estimate the mean, which is the main. 539 01:13:04.409 --> 01:13:09.869 Okay, and there's there there are, there's choices here. Um. 540 01:13:13.859 --> 01:13:22.529 The choices for the Estimator function choice. 1. 541 01:13:22.529 --> 01:13:28.920 1, for choice, 1 would be, we could say the, um. 542 01:13:30.899 --> 01:13:35.460 Some of all the over and what you call that the sample mean. 543 01:13:38.340 --> 01:13:44.430 Choice 2 might be all, um, the median of all the exercise. 544 01:13:46.470 --> 01:13:50.819 Choice 3 might be the maximum. 545 01:13:50.819 --> 01:13:56.609 Minus the minimum of exercise or something um. 546 01:13:56.609 --> 01:14:02.159 Maximum plus the minimum divided by 2. okay. Um. 547 01:14:03.329 --> 01:14:08.850 So, there's different ways, we could estimate what the mean of this population is. 548 01:14:08.850 --> 01:14:14.699 From looking at 100 observations. Um, so. 549 01:14:14.699 --> 01:14:18.539 Um, how do we tell which ones are the better. 550 01:14:18.539 --> 01:14:23.520 Um, so. 551 01:14:27.930 --> 01:14:35.640 These estimators our random functions. 552 01:14:39.329 --> 01:14:48.329 Of the population. Okay. And they have property so they the estimators. 553 01:14:50.100 --> 01:14:55.979 That means and standard deviations themselves. 554 01:14:55.979 --> 01:15:01.470 Themselves they do. Okay. And. 555 01:15:01.470 --> 01:15:06.479 The standard deviation talks about how much the Estimator itself jumps around. 556 01:15:06.479 --> 01:15:15.869 So, the FCC of the standard deviation. 557 01:15:22.470 --> 01:15:26.880 How much the Estimator itself. 558 01:15:27.960 --> 01:15:33.810 Jumps around with different samples. 559 01:15:35.250 --> 01:15:41.489 I I mentioned a little of this before I mentioned again, because it's worth saying twice. Okay. 560 01:15:42.899 --> 01:15:49.979 Um, so, you know, I measure 100 numbers and take the. 561 01:15:49.979 --> 01:15:54.810 Mean, it might be here here here here here, piling up or something. 562 01:15:54.810 --> 01:15:58.289 If I take the media and. 563 01:15:58.289 --> 01:16:05.310 Um, and I take lots of samples of 100 numbers, the meeting of each sample. 564 01:16:05.310 --> 01:16:11.340 It was spread around some more if I take the average of the high and the low. 565 01:16:11.340 --> 01:16:15.510 It might actually, um, we. 566 01:16:16.710 --> 01:16:20.159 We'll actually be bouncing around more so. 567 01:16:22.500 --> 01:16:26.880 So, in other words, if I take the mean of my. 568 01:16:26.880 --> 01:16:33.539 100 numbers that I observed that's a that's a better Estimator the mean of the whole population, because it's. 569 01:16:33.539 --> 01:16:38.369 It's more accurate it's not gonna jump around as much. So. 570 01:16:38.369 --> 01:16:44.369 So, um, I mean. 571 01:16:44.369 --> 01:16:49.500 Media and this is the. 572 01:16:49.500 --> 01:16:57.479 Max plus min or 2. okay, so this is the way we can look at the, um. 573 01:16:57.479 --> 01:17:03.390 Goodness of an Estimator it's an estimator. Who's variant whose own? Stack variance is small. 574 01:17:03.390 --> 01:17:13.770 So, whose own standard deviation. 575 01:17:15.210 --> 01:17:18.600 Is small is better. 576 01:17:19.829 --> 01:17:24.210 Okay, so now I've got a way to quantify how good an Estimator is. 577 01:17:24.210 --> 01:17:31.710 And in for this case is this case mean, it's best. 578 01:17:34.079 --> 01:17:38.100 Okay, so, um. 579 01:17:39.359 --> 01:17:45.930 But there's 1 other thing, however, I'm on. 580 01:17:47.430 --> 01:17:53.159 Up get go um, but now I'm getting a little more sophisticated. 581 01:17:53.159 --> 01:17:58.529 But what if the distribution. 582 01:17:58.529 --> 01:18:05.670 Is not then, um. 583 01:18:10.590 --> 01:18:16.920 No, I dunno. Maybe plus on or something. 584 01:18:16.920 --> 01:18:21.239 It's it's, you know, maybe say bias, like plus on. 585 01:18:24.960 --> 01:18:30.329 The media might be better. 586 01:18:36.720 --> 01:18:44.760 What I'm saying, in other words is that the Estimator that's the best when we know the distribution may be sensitive. 587 01:18:44.760 --> 01:18:50.970 To our assumption about the distribution so if I know the distribution is. 588 01:18:52.020 --> 01:18:57.899 Um, Kelsey, and then, yeah, the main of my samples is the best Estimator for the meaning of the distribution. 589 01:18:57.899 --> 01:19:04.739 But maybe I'm not so certain it's cousy maybe I've got some reason to think it's biased or something in median would be better. 590 01:19:04.739 --> 01:19:11.609 Perhaps, and if it's a totally crazy distribution, like a. 591 01:19:11.609 --> 01:19:17.850 Or something, maybe average of the high in the low might be better. Well, bad example, but. 592 01:19:17.850 --> 01:19:21.539 You know, so this is your trade off here so. 593 01:19:21.539 --> 01:19:36.449 Any case, chapter eight's talking about ways to estimate things means estimate the variance if you don't know the variance or the mean, um, estimators for other things like exponential, random variables. 594 01:19:36.449 --> 01:19:45.689 Get to that sort of stuff on Thursday and whatever, um, finding good estimators and it will get to something called maximum likelihood estimation. 595 01:19:45.689 --> 01:19:48.840 A way to estimate parameters. Okay. 596 01:19:48.840 --> 01:19:59.189 Let me just remind you what we did today. I spent about half the class demonstrating Mathematica to you, which is the world's best algebraic manipulation package. 597 01:19:59.189 --> 01:20:12.329 You have access to it as an RPA student, and it works with complicated functions that have case statements in them in multiple choices. You know, if X greater than 0 than this else, that sort of thing. 598 01:20:12.329 --> 01:20:15.359 It can differentiate anything. 599 01:20:15.359 --> 01:20:24.510 It can integrate anything that has a closed integral guaranteed. If it doesn't have a closed integral it will do it numerically for you. 600 01:20:24.510 --> 01:20:28.140 And it also produces very nice plots. 601 01:20:28.140 --> 01:20:31.439 And it also does works with. 602 01:20:31.439 --> 01:20:37.079 A lot of probability distributions as distributions you don't have to call them in. 603 01:20:37.079 --> 01:20:41.039 That knows about calcium and those, but multiple variable calcium and. 604 01:20:41.039 --> 01:20:46.859 And I showed you that you can do fun stuff, a lot easier in mathematic. I like, I gave it to variable and. 605 01:20:46.859 --> 01:20:58.079 With the correlation, and then integrated out 1 of the variables. It was very easy. And Mathematica other half of the class I going into chapter 8. I did a little bit. 606 01:20:58.079 --> 01:21:02.880 Before the exam, so I'm refreshing. Some of that and doing it again. 607 01:21:02.880 --> 01:21:14.250 Chapter 8, this is the refreshes statistics where we don't know the parameters of a function. So the 1st, half part of the course. 608 01:21:14.250 --> 01:21:19.109 Is we had these 10 distributions, um, binomial and. 609 01:21:19.109 --> 01:21:33.930 Gaussian an exponential with parameters slammed as analysis and mean whatevers and you calculate it produce round numbers here. We don't know these parameters of the distribution. So we have a galaxy and we don't know the mean, maybe don't know the variance. 610 01:21:33.930 --> 01:21:37.859 We do observations and we went to. 611 01:21:37.859 --> 01:21:46.500 Estimate the parameters, like the mean and variance and maybe we're not even certain about the distribution. So we have a guess. 612 01:21:46.500 --> 01:21:56.340 We do observations and we want to find if our guess is correct. What's the probability that we're going to see something as weird as we just saw. 613 01:21:56.340 --> 01:22:01.590 So, and we'll do, so we'll be getting more in that statistics. 614 01:22:01.590 --> 01:22:06.750 And what I haven't walked you through in class I put on the blog. 615 01:22:06.750 --> 01:22:12.750 Is some other paradoxes in statistics you get some crazy things happening. 616 01:22:12.750 --> 01:22:18.449 Um, so the, they call substance paradox collectively. 617 01:22:18.449 --> 01:22:22.020 1, crazy thing that can confuse people is. 618 01:22:22.020 --> 01:22:28.409 You're testing some hypothesis and you do 2 separate experiments, like, is a drug effective. 619 01:22:28.409 --> 01:22:32.550 And you did 2 separate trials in each trial separately. 620 01:22:32.550 --> 01:22:38.579 Says, yes, the drug is probably effective, but you amalgamate the 2 trials. 621 01:22:38.579 --> 01:22:43.260 And Amalgamated together, they say, no, the drug is not a. 622 01:22:43.260 --> 01:22:46.649 Effective and that sounds like it cannot happen. 623 01:22:46.649 --> 01:22:52.920 But, yeah, it can happen when the 2 trials are looking at different aspects. Each trial separately says the drug works. 624 01:22:52.920 --> 01:23:01.229 The 2 trials together, meta analysis, whatever you wanna call say that looked at it together. No, the drug does not work. 625 01:23:01.229 --> 01:23:04.229 So these are the sorts of things that, you know. 626 01:23:04.229 --> 01:23:16.920 Get crazy, but well, I gave him an example involving admission statistics to colleges on the blog. I'll walk you through them on Thursday or something. Okay. Well, have a good weeks. 627 01:23:16.920 --> 01:23:25.770 I'll hang around if there's questions, if you've got questions about the exam itself, best to talk to the teaching assistants on and so on. 628 01:23:25.770 --> 01:23:28.949 They created the exam and asked for them. 629 01:23:28.949 --> 01:23:32.729 So, you Thursday. 630 01:23:36.539 --> 01:23:47.220 Okay. 631 01:23:47.220 --> 01:23:52.079 Period the 2nd. 632 01:23:53.159 --> 01:23:59.430 Okay, yes. 633 01:23:59.430 --> 01:24:00.648 Well, there'll be.